forked from RicardoValdovinos/vite-react-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
104 lines (104 loc) · 2.9 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
{
"env": {
"es2022": true,
"browser": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-type-checked",
"plugin:react/jsx-runtime",
"plugin:react-hooks/recommended",
"plugin:unicorn/recommended",
"plugin:storybook/recommended",
"prettier"
],
"overrides": [],
"ignorePatterns": [
".eslintrc.json",
"vite.config.ts",
"postcss.config.mjs",
"tailwind.config.js",
"commitlint.config.cjs",
"playwright.config.ts",
"vitest.setup.ts"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"project": ["./tsconfig.json"]
},
"plugins": ["@typescript-eslint", "react-refresh", "unicorn"],
"rules": {
"no-await-in-loop": "error",
"no-constant-binary-expression": "error",
"no-duplicate-imports": "error",
"no-new-native-nonconstructor": "error",
"no-promise-executor-return": "error",
"no-self-compare": "error",
"no-template-curly-in-string": "error",
"no-unmodified-loop-condition": "error",
"no-unreachable-loop": "error",
"no-unused-private-class-members": "error",
"no-use-before-define": "error",
"require-atomic-updates": "error",
"camelcase": "error",
"@typescript-eslint/adjacent-overload-signatures": "error",
"@typescript-eslint/array-type": ["error", { "default": "generic" }],
"@typescript-eslint/consistent-type-exports": "error",
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/explicit-function-return-type": "error",
"@typescript-eslint/explicit-member-accessibility": "error",
"@typescript-eslint/explicit-module-boundary-types": "error",
"@typescript-eslint/no-confusing-void-expression": "error",
"@typescript-eslint/no-import-type-side-effects": "error",
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/no-useless-empty-export": "error",
"@typescript-eslint/prefer-enum-initializers": "error",
"@typescript-eslint/prefer-readonly": "error",
"no-return-await": "off",
"@typescript-eslint/return-await": "error",
"react-refresh/only-export-components": [
"warn",
{ "allowConstantExport": true }
],
"unicorn/custom-error-definition": "error",
"unicorn/empty-brace-spaces": "error",
"unicorn/no-array-for-each": "off",
"unicorn/no-array-reduce": "off",
"unicorn/no-console-spaces": "error",
"unicorn/no-null": "off",
"unicorn/filename-case": [
"error",
{
"cases": {
"kebabCase": true,
"pascalCase": true
}
}
],
"unicorn/prevent-abbreviations": [
"error",
{
"replacements": {
"db": false,
"arg": false,
"args": false,
"env": false,
"fn": false,
"func": {
"fn": true,
"function": false
},
"prop": false,
"props": false,
"ref": false,
"refs": false
},
"ignore": ["semVer", "SemVer"]
}
]
}
}