aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.eslintrc.json7
-rw-r--r--package-lock.json306
-rw-r--r--package.json18
-rw-r--r--src/components/ContentSection/ContentSection.js2
-rw-r--r--src/components/Header/Header.js4
-rw-r--r--src/components/Loading/Loading.js4
-rw-r--r--src/components/SolutionCard/SolutionCard.js6
-rw-r--r--src/components/Window/Window.js4
-rw-r--r--src/components/Window/WindowSurface/WindowSurface.js2
-rw-r--r--src/index.js14
-rw-r--r--src/pages/Contribute/Contribute.js6
-rw-r--r--src/pages/Profile/Profile.js14
-rw-r--r--src/pages/Profile/Registration/Registration.js6
-rw-r--r--src/pages/Scoreboard/Scoreboard.js12
-rw-r--r--src/pages/Timer/Timer.js12
-rw-r--r--src/pages/Timer/TimerButton/TimerButton.js27
16 files changed, 339 insertions, 105 deletions
diff --git a/.eslintrc.json b/.eslintrc.json
new file mode 100644
index 0000000..8c9d6d9
--- /dev/null
+++ b/.eslintrc.json
@@ -0,0 +1,7 @@
+{
+ "extends": "react-app",
+ "rules": {
+ "jsx-quotes": ["error", "prefer-double"],
+ "quotes": ["error", "single"]
+ }
+}
diff --git a/package-lock.json b/package-lock.json
index 4ccbf15..3972c8d 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -937,9 +937,9 @@
}
},
"@babel/runtime-corejs3": {
- "version": "7.7.7",
- "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.7.7.tgz",
- "integrity": "sha512-kr3W3Fw8mB/CTru2M5zIRQZZgC/9zOxNSoJ/tVCzjPt3H1/p5uuGbz6WwmaQy/TLQcW31rUhUUWKY28sXFRelA==",
+ "version": "7.8.0",
+ "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.8.0.tgz",
+ "integrity": "sha512-5XaME/D4hTkUclw4BW+FeDyfUcxN5/Fox/+9UiWUqdyU33zsLxDAE74IexAmLccuHSQyFbIzF5+Yb4E6obVOSg==",
"requires": {
"core-js-pure": "^3.0.0",
"regenerator-runtime": "^0.13.2"
@@ -1662,11 +1662,11 @@
"integrity": "sha512-gCubfBUZ6KxzoibJ+SCUc/57Ms1jz5NjHe4+dI2krNmU5zCPAphyLJYyTOg06ueIyfj+SaCUqmzun7ImlxDcKg=="
},
"@typescript-eslint/eslint-plugin": {
- "version": "2.14.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.14.0.tgz",
- "integrity": "sha512-sneOJ3Hu0m5whJiVIxGBZZZMxMJ7c0LhAJzeMJgHo+n5wFs+/6rSR/gl7crkdR2kNwfOOSdzdc0gMvatG4dX2Q==",
+ "version": "2.15.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.15.0.tgz",
+ "integrity": "sha512-XRJFznI5v4K1WvIrWmjFjBAdQWaUTz4xJEdqR7+wAFsv6Q9dP3mOlE6BMNT3pdlp9eF1+bC5m5LZTmLMqffCVw==",
"requires": {
- "@typescript-eslint/experimental-utils": "2.14.0",
+ "@typescript-eslint/experimental-utils": "2.15.0",
"eslint-utils": "^1.4.3",
"functional-red-black-tree": "^1.0.1",
"regexpp": "^3.0.0",
@@ -1674,30 +1674,30 @@
}
},
"@typescript-eslint/experimental-utils": {
- "version": "2.14.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.14.0.tgz",
- "integrity": "sha512-KcyKS7G6IWnIgl3ZpyxyBCxhkBPV+0a5Jjy2g5HxlrbG2ZLQNFeneIBVXdaBCYOVjvGmGGFKom1kgiAY75SDeQ==",
+ "version": "2.15.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.15.0.tgz",
+ "integrity": "sha512-Qkxu5zndY5hqlcQkmA88gfLvqQulMpX/TN91XC7OuXsRf4XG5xLGie0sbpX97o/oeccjeZYRMipIsjKk/tjDHA==",
"requires": {
"@types/json-schema": "^7.0.3",
- "@typescript-eslint/typescript-estree": "2.14.0",
+ "@typescript-eslint/typescript-estree": "2.15.0",
"eslint-scope": "^5.0.0"
}
},
"@typescript-eslint/parser": {
- "version": "2.14.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.14.0.tgz",
- "integrity": "sha512-haS+8D35fUydIs+zdSf4BxpOartb/DjrZ2IxQ5sR8zyGfd77uT9ZJZYF8+I0WPhzqHmfafUBx8MYpcp8pfaoSA==",
+ "version": "2.15.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.15.0.tgz",
+ "integrity": "sha512-6iSgQsqAYTaHw59t0tdjzZJluRAjswdGltzKEdLtcJOxR2UVTPHYvZRqkAVGCkaMVb6Fpa60NnuozNCvsSpA9g==",
"requires": {
"@types/eslint-visitor-keys": "^1.0.0",
- "@typescript-eslint/experimental-utils": "2.14.0",
- "@typescript-eslint/typescript-estree": "2.14.0",
+ "@typescript-eslint/experimental-utils": "2.15.0",
+ "@typescript-eslint/typescript-estree": "2.15.0",
"eslint-visitor-keys": "^1.1.0"
}
},
"@typescript-eslint/typescript-estree": {
- "version": "2.14.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.14.0.tgz",
- "integrity": "sha512-pnLpUcMNG7GfFFfNQbEX6f1aPa5fMnH2G9By+A1yovYI4VIOK2DzkaRuUlIkbagpAcrxQHLqovI1YWqEcXyRnA==",
+ "version": "2.15.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.15.0.tgz",
+ "integrity": "sha512-L6Pog+w3VZzXkAdyqA0VlwybF8WcwZX+mufso86CMxSdWmcizJ38lgBdpqTbc9bo92iyi0rOvmATKiwl+amjxg==",
"requires": {
"debug": "^4.1.1",
"eslint-visitor-keys": "^1.1.0",
@@ -2100,6 +2100,16 @@
"resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz",
"integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg="
},
+ "array.prototype.flat": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.3.tgz",
+ "integrity": "sha512-gBlRZV0VSmfPIeWfuuy56XZMvbVfbEUnOXUvt3F/eUUUSyzlgLxhEX4YAEpxNAogRGehPSnfXyPtYyKAhkzQhQ==",
+ "dev": true,
+ "requires": {
+ "define-properties": "^1.1.3",
+ "es-abstract": "^1.17.0-next.1"
+ }
+ },
"arrify": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz",
@@ -4024,9 +4034,9 @@
}
},
"core-js-pure": {
- "version": "3.6.1",
- "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.6.1.tgz",
- "integrity": "sha512-yKiUdvQWq66xUc408duxUCxFHuDfz5trF5V4xnQzb8C7P/5v2gFUdyNWQoevyAeGYB1hl1X/pzGZ20R3WxZQBA=="
+ "version": "3.6.3",
+ "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.6.3.tgz",
+ "integrity": "sha512-4LhJ4fw0sC4/8X5krM9hI5oQ3cgYHYojWwwWnQKjC6k6vf/qIVS9d0r3+Bdn+FUADgRpD0xzPFQ9P7cOeuIwlA=="
},
"core-util-is": {
"version": "1.0.2",
@@ -5104,12 +5114,12 @@
}
},
"eslint-import-resolver-node": {
- "version": "0.3.2",
- "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.2.tgz",
- "integrity": "sha512-sfmTqJfPSizWu4aymbPr4Iidp5yKm8yDkHp+Ir3YiTHiiDfxh69mOUsmiqW6RZ9zRXFaF64GtYmN7e+8GHBv6Q==",
+ "version": "0.3.3",
+ "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.3.tgz",
+ "integrity": "sha512-b8crLDo0M5RSe5YG8Pu2DYBj71tSB6OvXkfzwbJU2w7y8P4/yo0MyF8jU26IEuEuHF2K5/gcAJE3LhQGqBBbVg==",
"requires": {
"debug": "^2.6.9",
- "resolve": "^1.5.0"
+ "resolve": "^1.13.1"
},
"dependencies": {
"debug": {
@@ -5124,6 +5134,14 @@
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
+ },
+ "resolve": {
+ "version": "1.14.2",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.14.2.tgz",
+ "integrity": "sha512-EjlOBLBO1kxsUxsKjLt7TAECyKW6fOh1VRkykQkKGzcBbjjPIxBqGh0jf7GJ3k/f5mxMqW3htMD3WdTUVtW8HQ==",
+ "requires": {
+ "path-parse": "^1.0.6"
+ }
}
}
},
@@ -5140,9 +5158,9 @@
}
},
"eslint-module-utils": {
- "version": "2.5.0",
- "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.5.0.tgz",
- "integrity": "sha512-kCo8pZaNz2dsAW7nCUjuVoI11EBXXpIzfNxmaoLhXoRDOnqXLC4iSGVRdZPhOitfbdEfMEfKOiENaK6wDPZEGw==",
+ "version": "2.5.1",
+ "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.5.1.tgz",
+ "integrity": "sha512-GcNwsYv8MfoEBSbAmV+PSVn2RlhpCShbLImtNviAYa/LE0PgNqxH5tLi1Ld9yeFwdjHsarXK+7G9vsyddmB6dw==",
"requires": {
"debug": "^2.6.9",
"pkg-dir": "^2.0.0"
@@ -5209,6 +5227,12 @@
}
}
},
+ "eslint-plugin-eslint-plugin": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-eslint-plugin/-/eslint-plugin-eslint-plugin-2.2.0.tgz",
+ "integrity": "sha512-X5+NT9a2GuwWyb3sHJdEEe6aD/30Fhi3/9XCmYHe/OSnWKUhmKOxFTfFM1AXZfJXjAoX7811bnoLI3fZr5AX5Q==",
+ "dev": true
+ },
"eslint-plugin-flowtype": {
"version": "3.13.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-flowtype/-/eslint-plugin-flowtype-3.13.0.tgz",
@@ -5218,27 +5242,30 @@
}
},
"eslint-plugin-import": {
- "version": "2.18.2",
- "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.18.2.tgz",
- "integrity": "sha512-5ohpsHAiUBRNaBWAF08izwUGlbrJoJJ+W9/TBwsGoR1MnlgfwMIKrFeSjWbt6moabiXW9xNvtFz+97KHRfI4HQ==",
+ "version": "2.20.0",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.20.0.tgz",
+ "integrity": "sha512-NK42oA0mUc8Ngn4kONOPsPB1XhbUvNHqF+g307dPV28aknPoiNnKLFd9em4nkswwepdF5ouieqv5Th/63U7YJQ==",
+ "dev": true,
"requires": {
"array-includes": "^3.0.3",
+ "array.prototype.flat": "^1.2.1",
"contains-path": "^0.1.0",
"debug": "^2.6.9",
"doctrine": "1.5.0",
"eslint-import-resolver-node": "^0.3.2",
- "eslint-module-utils": "^2.4.0",
+ "eslint-module-utils": "^2.4.1",
"has": "^1.0.3",
"minimatch": "^3.0.4",
"object.values": "^1.1.0",
"read-pkg-up": "^2.0.0",
- "resolve": "^1.11.0"
+ "resolve": "^1.12.0"
},
"dependencies": {
"debug": {
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "dev": true,
"requires": {
"ms": "2.0.0"
}
@@ -5247,6 +5274,7 @@
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz",
"integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=",
+ "dev": true,
"requires": {
"esutils": "^2.0.2",
"isarray": "^1.0.0"
@@ -5256,6 +5284,7 @@
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",
"integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=",
+ "dev": true,
"requires": {
"locate-path": "^2.0.0"
}
@@ -5264,6 +5293,7 @@
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz",
"integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=",
+ "dev": true,
"requires": {
"graceful-fs": "^4.1.2",
"parse-json": "^2.2.0",
@@ -5275,6 +5305,7 @@
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz",
"integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=",
+ "dev": true,
"requires": {
"p-locate": "^2.0.0",
"path-exists": "^3.0.0"
@@ -5283,12 +5314,14 @@
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
+ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
+ "dev": true
},
"p-limit": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz",
"integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==",
+ "dev": true,
"requires": {
"p-try": "^1.0.0"
}
@@ -5297,6 +5330,7 @@
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz",
"integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=",
+ "dev": true,
"requires": {
"p-limit": "^1.1.0"
}
@@ -5304,12 +5338,14 @@
"p-try": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz",
- "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M="
+ "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=",
+ "dev": true
},
"parse-json": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz",
"integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=",
+ "dev": true,
"requires": {
"error-ex": "^1.2.0"
}
@@ -5318,6 +5354,7 @@
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz",
"integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=",
+ "dev": true,
"requires": {
"pify": "^2.0.0"
}
@@ -5325,12 +5362,14 @@
"pify": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
- "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw="
+ "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
+ "dev": true
},
"read-pkg": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz",
"integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=",
+ "dev": true,
"requires": {
"load-json-file": "^2.0.0",
"normalize-package-data": "^2.3.2",
@@ -5341,6 +5380,7 @@
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz",
"integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=",
+ "dev": true,
"requires": {
"find-up": "^2.0.0",
"read-pkg": "^2.0.0"
@@ -5372,28 +5412,40 @@
}
},
"eslint-plugin-react": {
- "version": "7.16.0",
- "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.16.0.tgz",
- "integrity": "sha512-GacBAATewhhptbK3/vTP09CbFrgUJmBSaaRcWdbQLFvUZy9yVcQxigBNHGPU/KE2AyHpzj3AWXpxoMTsIDiHug==",
+ "version": "7.17.0",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.17.0.tgz",
+ "integrity": "sha512-ODB7yg6lxhBVMeiH1c7E95FLD4E/TwmFjltiU+ethv7KPdCwgiFuOZg9zNRHyufStTDLl/dEFqI2Q1VPmCd78A==",
+ "dev": true,
"requires": {
"array-includes": "^3.0.3",
"doctrine": "^2.1.0",
+ "eslint-plugin-eslint-plugin": "^2.1.0",
"has": "^1.0.3",
- "jsx-ast-utils": "^2.2.1",
+ "jsx-ast-utils": "^2.2.3",
"object.entries": "^1.1.0",
- "object.fromentries": "^2.0.0",
+ "object.fromentries": "^2.0.1",
"object.values": "^1.1.0",
"prop-types": "^15.7.2",
- "resolve": "^1.12.0"
+ "resolve": "^1.13.1"
},
"dependencies": {
"doctrine": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz",
"integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==",
+ "dev": true,
"requires": {
"esutils": "^2.0.2"
}
+ },
+ "resolve": {
+ "version": "1.14.2",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.14.2.tgz",
+ "integrity": "sha512-EjlOBLBO1kxsUxsKjLt7TAECyKW6fOh1VRkykQkKGzcBbjjPIxBqGh0jf7GJ3k/f5mxMqW3htMD3WdTUVtW8HQ==",
+ "dev": true,
+ "requires": {
+ "path-parse": "^1.0.6"
+ }
}
}
},
@@ -6843,9 +6895,9 @@
"integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw=="
},
"inquirer": {
- "version": "7.0.1",
- "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.0.1.tgz",
- "integrity": "sha512-V1FFQ3TIO15det8PijPLFR9M9baSlnRs9nL7zWu1MNVA2T9YVl9ZbrHJhYs7e9X8jeMZ3lr2JH/rdHFgNCBdYw==",
+ "version": "7.0.3",
+ "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.0.3.tgz",
+ "integrity": "sha512-+OiOVeVydu4hnCGLCSX+wedovR/Yzskv9BFqUNNKq9uU2qg7LCcCo3R86S2E7WLo0y/x2pnEZfZe1CoYnORUAw==",
"requires": {
"ansi-escapes": "^4.2.1",
"chalk": "^2.4.2",
@@ -11409,6 +11461,163 @@
"webpack-dev-server": "3.9.0",
"webpack-manifest-plugin": "2.2.0",
"workbox-webpack-plugin": "4.3.1"
+ },
+ "dependencies": {
+ "debug": {
+ "version": "2.6.9",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "requires": {
+ "ms": "2.0.0"
+ }
+ },
+ "doctrine": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz",
+ "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=",
+ "requires": {
+ "esutils": "^2.0.2",
+ "isarray": "^1.0.0"
+ }
+ },
+ "eslint-plugin-import": {
+ "version": "2.18.2",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.18.2.tgz",
+ "integrity": "sha512-5ohpsHAiUBRNaBWAF08izwUGlbrJoJJ+W9/TBwsGoR1MnlgfwMIKrFeSjWbt6moabiXW9xNvtFz+97KHRfI4HQ==",
+ "requires": {
+ "array-includes": "^3.0.3",
+ "contains-path": "^0.1.0",
+ "debug": "^2.6.9",
+ "doctrine": "1.5.0",
+ "eslint-import-resolver-node": "^0.3.2",
+ "eslint-module-utils": "^2.4.0",
+ "has": "^1.0.3",
+ "minimatch": "^3.0.4",
+ "object.values": "^1.1.0",
+ "read-pkg-up": "^2.0.0",
+ "resolve": "^1.11.0"
+ }
+ },
+ "eslint-plugin-react": {
+ "version": "7.16.0",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.16.0.tgz",
+ "integrity": "sha512-GacBAATewhhptbK3/vTP09CbFrgUJmBSaaRcWdbQLFvUZy9yVcQxigBNHGPU/KE2AyHpzj3AWXpxoMTsIDiHug==",
+ "requires": {
+ "array-includes": "^3.0.3",
+ "doctrine": "^2.1.0",
+ "has": "^1.0.3",
+ "jsx-ast-utils": "^2.2.1",
+ "object.entries": "^1.1.0",
+ "object.fromentries": "^2.0.0",
+ "object.values": "^1.1.0",
+ "prop-types": "^15.7.2",
+ "resolve": "^1.12.0"
+ },
+ "dependencies": {
+ "doctrine": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz",
+ "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==",
+ "requires": {
+ "esutils": "^2.0.2"
+ }
+ }
+ }
+ },
+ "find-up": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",
+ "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=",
+ "requires": {
+ "locate-path": "^2.0.0"
+ }
+ },
+ "load-json-file": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz",
+ "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=",
+ "requires": {
+ "graceful-fs": "^4.1.2",
+ "parse-json": "^2.2.0",
+ "pify": "^2.0.0",
+ "strip-bom": "^3.0.0"
+ }
+ },
+ "locate-path": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz",
+ "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=",
+ "requires": {
+ "p-locate": "^2.0.0",
+ "path-exists": "^3.0.0"
+ }
+ },
+ "ms": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
+ },
+ "p-limit": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz",
+ "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==",
+ "requires": {
+ "p-try": "^1.0.0"
+ }
+ },
+ "p-locate": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz",
+ "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=",
+ "requires": {
+ "p-limit": "^1.1.0"
+ }
+ },
+ "p-try": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz",
+ "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M="
+ },
+ "parse-json": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz",
+ "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=",
+ "requires": {
+ "error-ex": "^1.2.0"
+ }
+ },
+ "path-type": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz",
+ "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=",
+ "requires": {
+ "pify": "^2.0.0"
+ }
+ },
+ "pify": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
+ "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw="
+ },
+ "read-pkg": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz",
+ "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=",
+ "requires": {
+ "load-json-file": "^2.0.0",
+ "normalize-package-data": "^2.3.2",
+ "path-type": "^2.0.0"
+ }
+ },
+ "read-pkg-up": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz",
+ "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=",
+ "requires": {
+ "find-up": "^2.0.0",
+ "read-pkg": "^2.0.0"
+ }
+ }
}
},
"react-transition-group": {
@@ -13301,6 +13510,11 @@
"resolved": "https://registry.npmjs.org/typeface-roboto/-/typeface-roboto-0.0.75.tgz",
"integrity": "sha512-VrR/IiH00Z1tFP4vDGfwZ1esNqTiDMchBEXYY9kilT6wRGgFoCAlgkEUMHb1E3mB0FsfZhv756IF0+R+SFPfdg=="
},
+ "typescript": {
+ "version": "3.7.4",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.4.tgz",
+ "integrity": "sha512-A25xv5XCtarLwXpcDNZzCGvW2D1S3/bACratYBx2sax8PefsFhlYmkQicKHvpYflFS8if4zne5zT5kpJ7pzuvw=="
+ },
"uglify-js": {
"version": "3.4.10",
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.10.tgz",
diff --git a/package.json b/package.json
index ed322ca..a808511 100644
--- a/package.json
+++ b/package.json
@@ -16,7 +16,8 @@
"react-scripts": "3.3.0",
"react-virtualized-auto-sizer": "^1.0.2",
"react-window": "^1.8.5",
- "typeface-roboto": "0.0.75"
+ "typeface-roboto": "0.0.75",
+ "typescript": "^3.7.4"
},
"scripts": {
"start": "react-scripts start",
@@ -26,9 +27,6 @@
"predeploy": "npm run build",
"deploy": "gh-pages -d build"
},
- "eslintConfig": {
- "extends": "react-app"
- },
"browserslist": {
"production": [
">0.2%",
@@ -40,5 +38,17 @@
"last 1 firefox version",
"last 1 safari version"
]
+ },
+ "devDependencies": {
+ "@typescript-eslint/eslint-plugin": "^2.15.0",
+ "@typescript-eslint/parser": "^2.15.0",
+ "babel-eslint": "^10.0.3",
+ "eslint": "^6.8.0",
+ "eslint-config-react-app": "^5.1.0",
+ "eslint-plugin-flowtype": "^3.13.0",
+ "eslint-plugin-import": "^2.20.0",
+ "eslint-plugin-jsx-a11y": "^6.2.3",
+ "eslint-plugin-react": "^7.17.0",
+ "eslint-plugin-react-hooks": "^1.7.0"
}
}
diff --git a/src/components/ContentSection/ContentSection.js b/src/components/ContentSection/ContentSection.js
index 99e76aa..5108ce0 100644
--- a/src/components/ContentSection/ContentSection.js
+++ b/src/components/ContentSection/ContentSection.js
@@ -4,7 +4,7 @@ import {
Typography,
Divider,
makeStyles
-} from "@material-ui/core";
+} from '@material-ui/core';
const useStyles = makeStyles(theme => ({
diff --git a/src/components/Header/Header.js b/src/components/Header/Header.js
index d6294db..1595141 100644
--- a/src/components/Header/Header.js
+++ b/src/components/Header/Header.js
@@ -1,4 +1,4 @@
-import React from "react";
+import React from 'react';
import {
AppBar,
@@ -6,7 +6,7 @@ import {
Tab,
Typography,
Toolbar,
-} from "@material-ui/core";
+} from '@material-ui/core';
import { makeStyles } from '@material-ui/core/styles';
import TimerIcon from '@material-ui/icons/Timer';
diff --git a/src/components/Loading/Loading.js b/src/components/Loading/Loading.js
index 632142b..e8b9701 100644
--- a/src/components/Loading/Loading.js
+++ b/src/components/Loading/Loading.js
@@ -3,9 +3,9 @@ import React from 'react';
import {
Card,
CardHeader,
-} from "@material-ui/core";
+} from '@material-ui/core';
-import { makeStyles } from "@material-ui/core/styles";
+import { makeStyles } from '@material-ui/core/styles';
import CircularProgress from '@material-ui/core/CircularProgress';
diff --git a/src/components/SolutionCard/SolutionCard.js b/src/components/SolutionCard/SolutionCard.js
index 1fff873..8252347 100644
--- a/src/components/SolutionCard/SolutionCard.js
+++ b/src/components/SolutionCard/SolutionCard.js
@@ -10,13 +10,13 @@ import {
Grid,
Menu,
MenuItem,
-} from "@material-ui/core";
+} from '@material-ui/core';
-import { makeStyles } from "@material-ui/core/styles";
+import { makeStyles } from '@material-ui/core/styles';
import TimerIcon from '@material-ui/icons/Timer';
import MoreVertIcon from '@material-ui/icons/MoreVert';
-import { del } from "../../requests";
+import { del } from '../../requests';
const DATE_FORMAT = {
diff --git a/src/components/Window/Window.js b/src/components/Window/Window.js
index 63bd6ba..0ba2454 100644
--- a/src/components/Window/Window.js
+++ b/src/components/Window/Window.js
@@ -1,8 +1,8 @@
import React from 'react';
-import { Typography, Divider, makeStyles } from "@material-ui/core";
+import { Typography, Divider, makeStyles } from '@material-ui/core';
-import WindowSurface from "./WindowSurface/WindowSurface";
+import WindowSurface from './WindowSurface/WindowSurface';
const useStyles = makeStyles(theme => ({
diff --git a/src/components/Window/WindowSurface/WindowSurface.js b/src/components/Window/WindowSurface/WindowSurface.js
index c4e6b3d..26fea01 100644
--- a/src/components/Window/WindowSurface/WindowSurface.js
+++ b/src/components/Window/WindowSurface/WindowSurface.js
@@ -1,6 +1,6 @@
import React from 'react';
-import { Paper, makeStyles } from "@material-ui/core";
+import { Paper, makeStyles } from '@material-ui/core';
const useStyles = makeStyles(theme => ({
diff --git a/src/index.js b/src/index.js
index 6563c60..869ec3d 100644
--- a/src/index.js
+++ b/src/index.js
@@ -5,14 +5,14 @@ import CssBaseline from '@material-ui/core/CssBaseline';
import { ThemeProvider } from '@material-ui/core/styles';
import 'typeface-roboto';
-import theme from "./theme";
+import theme from './theme';
import Header from './components/Header/Header';
-import Timer from "./pages/Timer/Timer";
-import Scoreboard from "./pages/Scoreboard/Scoreboard";
-import Contribute from "./pages/Contribute/Contribute";
-import Profile from "./pages/Profile/Profile";
+import Timer from './pages/Timer/Timer';
+import Scoreboard from './pages/Scoreboard/Scoreboard';
+import Contribute from './pages/Contribute/Contribute';
+import Profile from './pages/Profile/Profile';
-import { get } from "./requests";
+import { get } from './requests';
const App = () => {
@@ -65,5 +65,5 @@ const App = () => {
);
};
-document.body.style.overflow = "hidden";
+document.body.style.overflow = 'hidden';
ReactDOM.render(<App />, document.getElementById('root'));
diff --git a/src/pages/Contribute/Contribute.js b/src/pages/Contribute/Contribute.js
index 6837f59..d94cc80 100644
--- a/src/pages/Contribute/Contribute.js
+++ b/src/pages/Contribute/Contribute.js
@@ -9,14 +9,14 @@ import {
Avatar,
Divider,
makeStyles,
-} from "@material-ui/core";
+} from '@material-ui/core';
import TrendingUpIcon from '@material-ui/icons/TrendingUp';
import BugReportIcon from '@material-ui/icons/BugReport';
import NewReleasesIcon from '@material-ui/icons/NewReleases';
-import Window from "../../components/Window/Window";
-import ContentSection from "../../components/ContentSection/ContentSection";
+import Window from '../../components/Window/Window';
+import ContentSection from '../../components/ContentSection/ContentSection';
const useStyles = makeStyles(theme => ({
diff --git a/src/pages/Profile/Profile.js b/src/pages/Profile/Profile.js
index 861e58e..783d497 100644
--- a/src/pages/Profile/Profile.js
+++ b/src/pages/Profile/Profile.js
@@ -1,17 +1,17 @@
import React, { useState, useEffect } from 'react';
-import Window from "../../components/Window/Window";
+import Window from '../../components/Window/Window';
import {
Button,
makeStyles,
-} from "@material-ui/core";
+} from '@material-ui/core';
-import Registration from "./Registration/Registration";
-import ContentSection from "../../components/ContentSection/ContentSection";
-import SmartList from "../../components/SmartList/SmartList";
+import Registration from './Registration/Registration';
+import ContentSection from '../../components/ContentSection/ContentSection';
+import SmartList from '../../components/SmartList/SmartList';
-import { get } from "../../requests";
-import SolutionCard from "../../components/SolutionCard/SolutionCard";
+import { get } from '../../requests';
+import SolutionCard from '../../components/SolutionCard/SolutionCard';
const useStyles = makeStyles(theme => ({
diff --git a/src/pages/Profile/Registration/Registration.js b/src/pages/Profile/Registration/Registration.js
index 45c83bc..af4ec30 100644
--- a/src/pages/Profile/Registration/Registration.js
+++ b/src/pages/Profile/Registration/Registration.js
@@ -6,10 +6,10 @@ import {
Checkbox,
FormControlLabel,
Grid,
-} from "@material-ui/core";
+} from '@material-ui/core';
-import ContentSection from "../../../components/ContentSection/ContentSection";
-import {get, post} from "../../../requests";
+import ContentSection from '../../../components/ContentSection/ContentSection';
+import {get, post} from '../../../requests';
const Registration = ({ setUser }) => {
diff --git a/src/pages/Scoreboard/Scoreboard.js b/src/pages/Scoreboard/Scoreboard.js
index 29d26c8..335c06b 100644
--- a/src/pages/Scoreboard/Scoreboard.js
+++ b/src/pages/Scoreboard/Scoreboard.js
@@ -1,13 +1,13 @@
import React, { useEffect, useState } from 'react';
-import { makeStyles } from "@material-ui/core/styles";
+import { makeStyles } from '@material-ui/core/styles';
-import { get } from "../../requests";
+import { get } from '../../requests';
-import SmartList from "../../components/SmartList/SmartList";
-import SolutionCard from "../../components/SolutionCard/SolutionCard";
-import Loading from "../../components/Loading/Loading";
-import Window from "../../components/Window/Window";
+import SmartList from '../../components/SmartList/SmartList';
+import SolutionCard from '../../components/SolutionCard/SolutionCard';
+import Loading from '../../components/Loading/Loading';
+import Window from '../../components/Window/Window';
const useStyles = makeStyles(theme => ({
diff --git a/src/pages/Timer/Timer.js b/src/pages/Timer/Timer.js
index a41c47b..1323d97 100644
--- a/src/pages/Timer/Timer.js
+++ b/src/pages/Timer/Timer.js
@@ -2,13 +2,13 @@ import React from 'react';
import { post } from '../../requests';
-import Window from "../../components/Window/Window";
-import ContentSection from "../../components/ContentSection/ContentSection";
-import TimerButton from "./TimerButton/TimerButton";
-import SmartList from "../../components/SmartList/SmartList";
-import SolutionCard from "../../components/SolutionCard/SolutionCard";
+import Window from '../../components/Window/Window';
+import ContentSection from '../../components/ContentSection/ContentSection';
+import TimerButton from './TimerButton/TimerButton';
+import SmartList from '../../components/SmartList/SmartList';
+import SolutionCard from '../../components/SolutionCard/SolutionCard';
-import { Button, makeStyles } from "@material-ui/core";
+import { Button, makeStyles } from '@material-ui/core';
const useStyles = makeStyles(theme => ({
diff --git a/src/pages/Timer/TimerButton/TimerButton.js b/src/pages/Timer/TimerButton/TimerButton.js
index 76bb65d..0f43c5a 100644
--- a/src/pages/Timer/TimerButton/TimerButton.js
+++ b/src/pages/Timer/TimerButton/TimerButton.js
@@ -1,7 +1,7 @@
import React, { useState, useEffect } from 'react';
import { Paper, Typography } from '@material-ui/core';
-import { makeStyles } from "@material-ui/core/styles";
+import { makeStyles } from '@material-ui/core/styles';
const useStyles = makeStyles(theme => ({
root: {
@@ -19,21 +19,25 @@ const TimerButton = ({ registerResult }) => {
const maxCountdown = 15000;
const [time, setTime] = useState('00:00:00');
const [mode, setMode] = useState('idle');
- const [repeater, setRepeater] = useState(0);
useEffect(()=> {
- clearInterval(repeater);
const timestamp = Date.now();
- if (mode === 'countdown') setRepeater(setInterval(() => {
- const timeDelta = maxCountdown - (Date.now() - timestamp);
- if (timeDelta <= 0) setMode('over');
- setTime(convertTimeToString(timeDelta));
- }, 10));
+ if (mode === 'countdown') {
+ const repeater = setInterval(() => {
+ const timeDelta = maxCountdown - (Date.now() - timestamp);
+ if (timeDelta <= 0) setMode('over');
+ setTime(convertTimeToString(timeDelta));
+ }, 10);
+ return () => clearInterval(repeater);
+ }
- if (mode === 'running') setRepeater(setInterval(() => {
- setTime(convertTimeToString(Date.now() - timestamp));
- }, 10));
+ if (mode === 'running') {
+ const repeater = setInterval(() => {
+ setTime(convertTimeToString(Date.now() - timestamp));
+ }, 10);
+ return () => clearInterval(repeater);
+ }
if (mode === 'over') {
setTime('00:00:00');
@@ -46,7 +50,6 @@ const TimerButton = ({ registerResult }) => {
};
const handleKeyUp = event => {
- clearInterval(repeater);
if (event.keyCode === SPACE) {
if (mode === 'running') {
registerResult(time);