Skip to content

Commit 79447c3

Browse files
committed
Add ESLint and Lefthook
1 parent 83feb27 commit 79447c3

16 files changed

+1841
-375
lines changed

.eslintignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.idea/
2+
.vscode/
3+
.docusaurus/
4+
node_modules/
5+
build/

.eslintrc

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
{
2+
"extends": [
3+
"eslint:recommended",
4+
"plugin:import/recommended",
5+
"plugin:react/recommended",
6+
"plugin:react/jsx-runtime",
7+
"plugin:react-hooks/recommended",
8+
"plugin:jsx-a11y/recommended",
9+
"plugin:@typescript-eslint/recommended",
10+
"plugin:@typescript-eslint/recommended-requiring-type-checking",
11+
"plugin:prettier/recommended"
12+
],
13+
"parser": "@typescript-eslint/parser",
14+
"parserOptions": {
15+
"project": "tsconfig.json",
16+
"tsconfigRootDir": "."
17+
},
18+
"plugins": [
19+
"@typescript-eslint"
20+
],
21+
"env": {
22+
"browser": true,
23+
"node": true
24+
},
25+
"settings": {
26+
"react": {
27+
"version": "detect"
28+
},
29+
"import/extensions": [
30+
".ts",
31+
".tsx"
32+
],
33+
"import/resolver": {
34+
"node": {
35+
"paths": ["src"]
36+
}
37+
}
38+
},
39+
"rules": {
40+
"react/jsx-uses-react": 2,
41+
"@typescript-eslint/no-unused-vars": 2,
42+
43+
// TODO Need to fix the errors in project and delete all the rows below
44+
// basic
45+
"no-async-promise-executor": 0,
46+
"import/no-unresolved": 0,
47+
48+
// react
49+
"react/prop-types": 0,
50+
"react/no-find-dom-node": 0,
51+
"react/no-unescaped-entities": 0,
52+
"react-hooks/exhaustive-deps": 0,
53+
54+
// ts
55+
"@typescript-eslint/no-unsafe-member-access": 0,
56+
"@typescript-eslint/no-unsafe-assignment": 0,
57+
"@typescript-eslint/no-unsafe-call": 0,
58+
"@typescript-eslint/no-unsafe-argument": 0,
59+
"@typescript-eslint/no-unsafe-return": 0,
60+
"@typescript-eslint/no-explicit-any": 0,
61+
"@typescript-eslint/restrict-template-expressions": 0,
62+
"@typescript-eslint/restrict-plus-operands": 0,
63+
"@typescript-eslint/no-floating-promises": 0,
64+
"@typescript-eslint/no-misused-promises": 0,
65+
"@typescript-eslint/no-empty-interface": 0,
66+
67+
// a11y
68+
"jsx-a11y/click-events-have-key-events": 0,
69+
"jsx-a11y/no-static-element-interactions": 0,
70+
"jsx-a11y/img-redundant-alt": 0,
71+
"jsx-a11y/alt-text": 0,
72+
"jsx-a11y/interactive-supports-focus": 0
73+
}
74+
}

babel.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module.exports = {
2-
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
2+
presets: [require.resolve("@docusaurus/core/lib/babel/preset")],
33
};

0 commit comments

Comments
 (0)