Skip to content

Commit d256808

Browse files
committed
ci: fix build, update eslint rules
1 parent 7916b38 commit d256808

File tree

4 files changed

+27
-8
lines changed

4 files changed

+27
-8
lines changed

.eslintrc.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"eslint:recommended",
99
"plugin:react/recommended",
1010
"plugin:@typescript-eslint/recommended",
11-
"standard"
11+
"standard",
12+
"prettier"
1213
],
1314
"parser": "@typescript-eslint/parser",
1415
"parserOptions": {
@@ -21,13 +22,12 @@
2122
},
2223
"plugins": ["react", "@typescript-eslint"],
2324
"rules": {
25+
"react/jsx-closing-bracket-location": "off",
2426
"@typescript-eslint/no-explicit-any": "off",
2527
"@typescript-eslint/explicit-module-boundary-types": "off",
26-
"@typescript-eslint/no-var-requires": "off",
27-
"@typescript-eslint/explicit-function-return-type": "warn",
28+
"@typescript-eslint/explicit-function-return-type": "error",
2829
"prefer-const": 2,
2930
"semi": [2, "always"],
30-
"react/jsx-closing-bracket-location": [1, "after-props"],
3131
"space-before-function-paren": [
3232
"error",
3333
{

package-lock.json

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,19 @@
4646
"react-scripts": "4.0.3"
4747
},
4848
"devDependencies": {
49-
"@types/react": "16.9.49",
50-
"@types/webpack-env": "1.16.0",
51-
"@typescript-eslint/eslint-plugin": "4.0.1",
52-
"@typescript-eslint/parser": "4.0.1",
5349
"@testing-library/jest-dom": "4.2.4",
5450
"@testing-library/react": "9.5.0",
5551
"@testing-library/user-event": "7.2.1",
5652
"@types/jest": "24.9.1",
5753
"@types/node": "12.12.62",
54+
"@types/react": "16.9.49",
5855
"@types/react-dom": "16.9.8",
5956
"@types/react-router-dom": "5.1.5",
57+
"@types/webpack-env": "1.16.0",
58+
"@typescript-eslint/eslint-plugin": "4.0.1",
59+
"@typescript-eslint/parser": "4.0.1",
6060
"eslint": "7.24.0",
61+
"eslint-config-prettier": "10.1.5",
6162
"eslint-config-standard": "14.1.1",
6263
"eslint-plugin-import": "2.22.0",
6364
"eslint-plugin-jsx-a11y": "6.3.1",

src/data/DataReader.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ class DataReader {
4444
const context = require.context('./', true, / *.json$/);
4545
context.keys().forEach((key: string) => {
4646
const fileName = key.replace('./', '');
47+
// eslint-disable-next-line @typescript-eslint/no-var-requires
4748
const resource = require(`./${fileName}`);
4849
const namespace = fileName.replace('.json', '');
4950
this.insert(namespace, JSON.parse(JSON.stringify(resource)));

0 commit comments

Comments
 (0)