/
.eslintrc.json
92 lines (85 loc) · 2.34 KB
/
.eslintrc.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
{
"env": {
"browser": true,
"es2021": true,
"node": true,
"jest": true
},
"globals": {
"vi": true
},
"extends": [
"airbnb",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:prettier/recommended",
"plugin:unicorn/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["react", "react-hooks", "@typescript-eslint", "prettier", "unicorn"],
"rules": {
"camelcase": "off",
"class-methods-use-this": "off",
"no-case-declarations": "off",
"no-empty-function": ["error", { "allow": ["constructors"] }],
"no-promise-executor-return": "off",
"no-unused-vars": "off",
"no-useless-constructor": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/no-use-before-define": "error",
"import/extensions": ["error", "ignorePackages", { "ts": "never", "tsx": "never" }],
"import/no-extraneous-dependencies": [
"error",
{ "devDependencies": ["!**/*.test.ts", "!**/*.spec.ts"] }
],
"import/order": [
"error",
{
"newlines-between": "always",
"alphabetize": {
"order": "asc",
"caseInsensitive": true
}
}
],
"import/prefer-default-export": "off",
"jsx-a11y/anchor-is-valid": "off",
"prettier/prettier": "error",
"react/function-component-definition": [
"warn",
{ "namedComponents": ["function-declaration", "arrow-function"] }
],
"react/prop-types": "off",
"react/jsx-filename-extension": [1, { "extensions": [".tsx"] }],
"react/jsx-indent": ["warn", "tab"],
"react/jsx-no-bind": ["warn", { "allowArrowFunctions": true, "allowFunctions": true }],
"react/jsx-props-no-spreading": "off",
"react/react-in-jsx-scope": "off",
"react/require-default-props": "off",
"react-hooks/exhaustive-deps": "warn",
"react-hooks/rules-of-hooks": "error",
"unicorn/filename-case": "off",
"unicorn/no-array-for-each": "off",
"unicorn/no-array-reduce": "off",
"unicorn/no-nested-ternary": "off",
"unicorn/no-null": "off",
"unicorn/no-process-exit": "off",
"unicorn/prefer-top-level-await": "off",
"unicorn/prevent-abbreviations": "off"
},
"settings": {
"import/resolver": {
"node": {
"extensions": [".js", ".jsx", ".ts", ".d.ts", ".tsx"]
}
}
}
}