Skip to content

Commit a20de4b

Browse files
committed
WIP
1 parent 9f20345 commit a20de4b

30 files changed

+1959
-612
lines changed

.eslintrc.json

Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,56 @@
11
{
2+
"root": true,
23
"env": {
3-
"commonjs": true,
4-
"es2021": true,
4+
"browser": true,
5+
"es2022": true,
56
"node": true
67
},
78
"extends": [
89
"eslint:recommended",
9-
"plugin:react/recommended",
1010
"plugin:@typescript-eslint/recommended",
11-
"plugin:import/recommended",
12-
"plugin:import/typescript"
11+
"plugin:@typescript-eslint/recommended-requiring-type-checking",
12+
"plugin:react/recommended",
13+
"plugin:react-hooks/recommended",
14+
"prettier"
1315
],
1416
"parser": "@typescript-eslint/parser",
1517
"parserOptions": {
1618
"ecmaVersion": "latest",
1719
"sourceType": "module",
20+
"project": "./tsconfig.json",
1821
"ecmaFeatures": {
1922
"jsx": true
2023
}
2124
},
22-
"plugins": ["react", "@typescript-eslint", "react-hooks", "import"],
23-
"rules": {
24-
"no-empty": "off",
25-
"indent": ["warn", "tab"],
26-
"linebreak-style": ["error", "unix"],
27-
"quotes": ["error", "backtick"],
28-
"semi": ["error", "always"],
29-
"no-unused-vars": "warn",
30-
"react/react-in-jsx-scope": "off",
31-
"react-hooks/rules-of-hooks": "error",
32-
"react-hooks/exhaustive-deps": "warn",
33-
"import/extensions": ["error", "always", {
34-
"js": "always",
35-
"jsx": "always",
36-
"ts": "always",
37-
"tsx": "always"
38-
}]
39-
},
25+
"plugins": ["@typescript-eslint", "react", "react-hooks"],
4026
"settings": {
4127
"react": {
4228
"version": "detect"
4329
},
4430
"import/resolver": {
4531
"typescript": {
46-
"alwaysTryTypes": true
32+
"alwaysTryTypes": true,
33+
"project": "./tsconfig.json"
4734
}
4835
}
36+
},
37+
"rules": {
38+
// TypeScript specific rules
39+
"@typescript-eslint/explicit-function-return-type": "off",
40+
"@typescript-eslint/explicit-module-boundary-types": "off",
41+
"@typescript-eslint/no-explicit-any": "warn",
42+
"@typescript-eslint/no-unused-vars": ["warn", { "argsIgnorePattern": "^_" }],
43+
"@typescript-eslint/no-non-null-assertion": "warn",
44+
45+
// React specific rules
46+
"react/react-in-jsx-scope": "off",
47+
"react/prop-types": "off",
48+
"react-hooks/rules-of-hooks": "error",
49+
"react-hooks/exhaustive-deps": "warn",
50+
51+
// General rules
52+
"no-console": ["warn", { "allow": ["warn", "error"] }],
53+
"no-debugger": "warn",
54+
"no-unused-vars": "off" // Turned off in favor of @typescript-eslint/no-unused-vars
4955
}
5056
}

.prettierrc.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
{
2-
"trailingComma": "none",
2+
"trailingComma": "es5",
33
"arrowParens": "avoid",
44
"singleQuote": true,
5-
"printWidth": 80,
6-
"useTabs": true,
5+
"printWidth": 100,
6+
"useTabs": false,
77
"tabWidth": 2,
8-
"semi": true
8+
"semi": true,
9+
"bracketSpacing": true,
10+
"endOfLine": "lf"
911
}

0 commit comments

Comments
 (0)