generated from HuiyuLiz/react-vite-ts-eslint-prettier-tailwindcss-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
53 lines (53 loc) · 1.27 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
module.exports = {
env: {
browser: true,
es2021: true,
node: true
},
extends: [
'standard-with-typescript',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
'plugin:prettier/recommended'
],
overrides: [
{
env: {
node: true
},
files: ['.eslintrc.{js,cjs}'],
parserOptions: {
sourceType: 'script'
}
}
],
parser: '@typescript-eslint/parser',
parserOptions: {
parser: '@typescript-eslint/parser',
project: './tsconfig.json',
tsconfigRootDir: __dirname
},
plugins: ['react', '@typescript-eslint', 'react-hooks', 'prettier'],
rules: {
indent: ["off", 2],
'react/jsx-max-props-per-line': [2, { maximum: { single: 3, multi: 1 } }],
'react/jsx-wrap-multilines': 2,
semi: 2,
'no-var': 'error',
'no-undef': 'off',
'prettier/prettier': [
'error',
{
endOfLine: 'auto'
}
],
'react/jsx-uses-react': 'off',
'react/react-in-jsx-scope': 'off',
'react/jsx-no-target-blank': 'off',
'@typescript-eslint/explicit-function-return-type': ['off'],
'@typescript-eslint/no-non-null-assertion': 'off'
},
ignorePatterns: [".eslintrc.cjs", "vite.config.ts"]
}