-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
115 lines (114 loc) · 2.57 KB
/
.eslintrc.js
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
const OFF = 0;
const ERROR = 2;
module.exports = {
env: {
browser: true,
es2020: true,
node: true,
},
extends: [
'airbnb',
'airbnb/hooks',
'plugin:eslint-comments/recommended',
'plugin:import/typescript',
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:unicorn/recommended',
'prettier',
'prettier/react',
'prettier/@typescript-eslint',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 11,
sourceType: 'module',
},
settings: {
'import/resolver': {
node: {
extensions: ['.tsx', '.ts', '.js', '.json'],
},
typescript: {
directory: ['./src/tsconfig.json', './scripts/tsconfig.json'],
},
},
},
plugins: ['react', '@typescript-eslint', 'unicorn', 'promise'],
rules: {
'import/extensions': [
ERROR,
'ignorePackages',
{
ts: 'never',
tsx: 'never',
json: 'never',
js: 'never',
},
],
'import/no-extraneous-dependencies': [
ERROR,
{
devDependencies: true,
},
],
'react/jsx-filename-extension': [
2,
{
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
],
'consistent-return': OFF,
'jsx-a11y/no-static-element-interactions': OFF,
'jsx-a11y/click-events-have-key-events': OFF,
'react/jsx-fragments': OFF,
'react/jsx-props-no-spreading': OFF,
'react/no-unused-prop-types': OFF,
'func-names': OFF,
'lines-between-class-members': OFF,
'max-classes-per-file': OFF,
'no-console': OFF,
'no-empty': OFF,
'no-bitwise': OFF,
'no-param-reassign': OFF,
'no-plusplus': OFF,
'no-continue': OFF,
'no-underscore-dangle': OFF,
'no-unused-expressions': OFF,
'no-useless-constructor': OFF,
'no-empty-function': OFF,
'unicorn/no-null': OFF,
'unicorn/prevent-abbreviations': OFF,
'unicorn/no-process-exit': OFF,
'unicorn/filename-case': [
ERROR,
{
cases: {
kebabCase: false,
camelCase: true,
snakeCase: false,
pascalCase: true,
},
},
],
'@typescript-eslint/no-empty-function': OFF,
'@typescript-eslint/no-useless-constructor': ERROR,
},
ignorePatterns: ['example/**/*', 'scripts/**/*'],
overrides: [
{
files: ['**/*.d.ts'],
rules: {
'import/no-duplicates': OFF,
},
},
{
files: ['scripts/**/*.ts'],
rules: {
'import/no-extraneous-dependencies': OFF,
},
},
],
};