-
Notifications
You must be signed in to change notification settings - Fork 22
/
.eslintrc.json
130 lines (130 loc) · 4.29 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
{
"env": {
"es2021": true,
"node": true,
"browser": true,
"commonjs": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"warnOnUnsupportedTypeScriptVersion": false,
"tsconfigRootDir": "./",
"project": ["./tsconfig.json"],
"sourceType": "module",
"ecmaVersion": 2022,
"ecmaFeatures": {
"impliedStrict": true
}
},
"settings": {
"react": {
"version": "detect"
},
"import/resolver": {
"typescript": { "project": "./" }
}
},
"plugins": [
"react-hooks",
"react",
"@typescript-eslint",
"jsx-a11y",
"import",
"unicorn"
],
"extends": [
"next/core-web-vitals",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:jsx-a11y/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"prettier"
],
"rules": {
"react/prop-types": "off",
"@next/next/no-img-element": "off",
"@next/next/no-html-link-for-pages": "off",
"unicorn/escape-case": "error",
"unicorn/number-literal-case": "error",
"unicorn/empty-brace-spaces": "error",
"unicorn/prefer-array-find": "error",
"unicorn/prefer-array-flat": "error",
"unicorn/prefer-array-flat-map": "error",
"unicorn/prefer-array-index-of": "error",
"unicorn/prefer-at": "error",
"unicorn/prefer-negative-index": "error",
"unicorn/prefer-object-from-entries": "error",
"unicorn/prefer-prototype-methods": "error",
"unicorn/prefer-reflect-apply": "error",
"unicorn/prefer-includes": "error",
"unicorn/prefer-regexp-test": "error",
"unicorn/prefer-modern-math-apis": "error",
"unicorn/prefer-native-coercion-functions": "error",
"unicorn/prefer-module": "error",
"unicorn/prefer-logical-operator-over-ternary": "error",
"unicorn/prefer-export-from": "error",
"unicorn/prefer-date-now": "error",
"unicorn/prefer-default-parameters": "error",
"unicorn/prefer-optional-catch-binding": "warn",
"unicorn/prefer-string-starts-ends-with": "error",
"unicorn/prefer-string-trim-start-end": "error",
"unicorn/prefer-string-replace-all": "error",
"unicorn/prefer-string-slice": "error",
"unicorn/prefer-top-level-await": "error",
"unicorn/custom-error-definition": "error",
"unicorn/error-message": "error",
"unicorn/no-array-method-this-argument": "error",
"unicorn/no-object-as-default-parameter": "error",
"unicorn/no-useless-spread": "error",
"unicorn/no-useless-fallback-in-spread": "error",
"unicorn/no-useless-promise-resolve-reject": "error",
"unicorn/no-useless-undefined": "error",
"unicorn/throw-new-error": "error",
"prefer-const": "off",
"array-callback-return": ["error", { "allowImplicit": true }],
"indent": ["error", 4, { "SwitchCase": 1 }],
"semi": ["error", "always"],
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/unbound-method": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/prefer-namespace-keyword": "off",
"@typescript-eslint/adjacent-overload-signatures": "off",
"@typescript-eslint/no-inferrable-types": ["warn", { "ignoreParameters": true, "ignoreProperties": true }],
"@typescript-eslint/no-unused-vars": ["warn", { "vars": "all", "args": "none", "ignoreRestSiblings": false }],
"@typescript-eslint/no-misused-promises": ["error", { "checksVoidReturn": false }],
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/restrict-template-expressions": ["error", {
"allowNumber": true,
"allowBoolean": true,
"allowAny": false,
"allowNullish": false,
"allowRegExp": true
}]
},
"overrides": [
{
"files": ["*.js"],
"rules": {
"@typescript-eslint/no-var-requires": "error",
"@typescript-eslint/explicit-function-return-type": "error",
"@typescript-eslint/ban-types": [
"error",
{
"types": {
"{}": false
}
}
],
"react/prop-types": ["off"],
"react/react-in-jsx-scope": "off",
"react/jsx-filename-extension": [
"error",
{ "extensions": [".jsx", ".tsx"] }
],
"import/order": ["error"]
}
}
]
}