generated from cpojer/vite-ts-react-tailwind-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.cjs
92 lines (92 loc) · 2.17 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
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
module.exports = {
env: {
browser: true,
es2021: true,
node: true,
},
extends: [
'eslint:recommended',
'plugin:import/errors',
'plugin:import/typescript',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:@typescript-eslint/recommended',
],
overrides: [
{
files: ['**/*.ts'],
rules: {
'react/display-name': 0,
},
},
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
plugins: [
'import',
'react',
'@typescript-eslint',
'eslint-plugin-react-compiler',
],
rules: {
'react-compiler/react-compiler': 'error',
'@typescript-eslint/ban-ts-comment': 0,
'@typescript-eslint/no-empty-function': 0,
'@typescript-eslint/no-namespace': 0,
'@typescript-eslint/no-non-null-assertion': 0,
'@typescript-eslint/no-unused-vars': ['error'],
'@typescript-eslint/no-var-requires': 0,
'array-bracket-spacing': [2, 'never'],
'arrow-parens': [2, 'always'],
'arrow-spacing': 2,
'brace-style': [
2,
'1tbs',
{
allowSingleLine: true,
},
],
'eol-last': 2,
// `import/default` and `import/namespace` are slow.
'import/default': 0,
'import/namespace': 0,
'import/no-duplicates': 2,
'import/no-extraneous-dependencies': [2],
'import/no-namespace': 2,
'import/order': 0,
'no-console': 0,
'no-const-assign': 2,
'no-extra-parens': [2, 'functions'],
'no-irregular-whitespace': 2,
'no-this-before-super': 2,
'no-unused-expressions': 2,
'no-unused-labels': 1,
'no-unused-vars': 0,
'no-var': 2,
'object-curly-spacing': 0,
'object-shorthand': 2,
'prefer-arrow-callback': 2,
'prefer-const': 2,
'react/jsx-sort-props': 2,
'react/prop-types': 0,
'react/react-in-jsx-scope': 0,
semi: [2, 'always'],
'space-before-blocks': 2,
'space-before-function-paren': [
2,
{ anonymous: 'never', asyncArrow: 'always', named: 'never' },
],
},
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
react: {
version: '18.0.0',
},
},
};