generated from cbernard01/vite-react-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
66 lines (66 loc) · 2.13 KB
/
.eslintrc.cjs
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
module.exports = {
env: {
browser: true,
es2021: true,
node: true,
},
extends: [
"standard",
"eslint:recommended",
"plugin:tailwindcss/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react-hooks/recommended",
"prettier",
],
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint", "react-refresh"],
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
},
rules: {
"react-refresh/only-export-components": ["warn", { allowConstantExport: true }],
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/consistent-type-imports": "warn",
"@typescript-eslint/consistent-type-definitions": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-unused-expressions": "error",
"@typescript-eslint/no-unused-vars": "warn",
"@typescript-eslint/no-empty-interface": "warn",
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/no-empty-function": "warn",
"@typescript-eslint/no-this-alias": "off",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/explicit-function-return-type": "warn",
"@typescript-eslint/semi": ["error", "always"],
"consistent-return": "warn",
"no-var": "warn",
"no-trailing-spaces": "error",
"prefer-spread": "off",
"no-case-declarations": "off",
"no-unreachable": "warn",
"import/extensions": "off",
semi: ["error", "always"],
indent: ["error", 2, { SwitchCase: 1 }],
eqeqeq: "warn",
quotes: ["error", "double", { avoidEscape: true, allowTemplateLiterals: true }],
"no-console": "warn",
"@typescript-eslint/member-delimiter-style": [
"error",
{
multiline: {
delimiter: "semi",
requireLast: true,
},
singleline: {
delimiter: "semi",
requireLast: false,
},
},
],
"max-len": ["error", { code: 180, ignoreComments: true, ignoreStrings: true }],
},
};