-
-
Notifications
You must be signed in to change notification settings - Fork 130
/
.eslintrc.js
151 lines (146 loc) · 3.79 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
const rules = {
'no-underscore-dangle': ['off'],
'no-param-reassign': ['off'],
'prefer-destructuring': ['off'],
'prefer-object-spread': ['off'],
'prefer-ob': ['off'],
'react/react-in-jsx-scope': ['off'],
'react/no-string-refs': ['off'],
'react/prop-types': ['off'],
'react/function-component-definition': ['off'],
'react/jsx-no-constructed-context-values': ['off'],
'no-restricted-globals': ['error', 'window', 'document'],
'import/prefer-default-export': 'off',
'react/jsx-one-expression-per-line': 'off',
'react/jsx-wrap-multilines': 'off',
'react/jsx-props-no-spreading': ['off'],
'import/no-extraneous-dependencies': ['off'],
'import/no-relative-packages': ['off'],
'no-constructor-return': ['off'],
'default-param-last': ['off'],
'import/extensions': [
'error',
'never',
{
ignorePackages: true,
pattern: {
js: 'always',
jsx: 'always',
json: 'always',
},
},
],
'no-nested-ternary': ['off'],
'jsx-a11y/click-events-have-key-events': ['off'],
'jsx-a11y/no-static-element-interactions': ['off'],
'react/destructuring-assignment': ['off'],
};
module.exports = {
env: {
browser: true,
es2021: true,
node: true,
},
extends: ['plugin:react/recommended', 'airbnb'],
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 12,
sourceType: 'module',
},
plugins: ['react'],
rules: {},
overrides: [
// REACT
{
files: ['**/*.jsx', '**/*.js', '**/*.ts'],
extends: [
'plugin:react/recommended',
'airbnb-base',
'plugin:prettier/recommended',
],
plugins: ['react'],
rules: { ...rules },
},
{
files: ['**/*.jsx', 'src/react/shared/*.js'],
rules: {
...rules,
'import/no-extraneous-dependencies': ['off'],
'no-dupe-keys': ['off'],
},
},
// REACT KITCHEN_SINK
{
files: ['kitchen-sink/react/**/*.jsx', 'kitchen-sink/react/**/*.js'],
rules: {
...rules,
'react/display-name': ['off'],
'react/jsx-no-target-blank': ['off'],
'react/no-unescaped-entities': ['off'],
'no-console': ['off'],
'no-restricted-globals': ['off'],
'no-nested-ternary': ['off'],
'import/no-unresolved': ['off'],
'import/no-extraneous-dependencies': ['off'],
'jsx-a11y/anchor-is-valid': ['off'],
},
},
// Vue
{
files: ['**/*.vue'],
extends: [
'airbnb-base',
'plugin:vue/vue3-recommended',
'plugin:prettier/recommended',
],
rules: {
...rules,
'vue/component-definition-name-casing': 'off',
'vue/require-default-prop': 'off',
},
},
{
files: ['**/*.vue', 'src/vue/shared/*.js'],
rules: {
...rules,
'import/no-extraneous-dependencies': ['off'],
'no-dupe-keys': ['off'],
},
},
// VUE KITCHEN_SINK
{
files: ['kitchen-sink/vue/**/*.vue', 'kitchen-sink/vue/**/*.js'],
rules: {
...rules,
'no-console': ['off'],
'no-restricted-globals': ['off'],
'no-nested-ternary': ['off'],
'import/no-unresolved': ['off'],
'import/no-extraneous-dependencies': ['off'],
},
},
// SVELTE KITCHEN_SINK
{
files: ['kitchen-sink/svelte/**/*.js'],
rules: {
...rules,
'import/extensions': ['off'],
'no-restricted-globals': ['off'],
'import/no-unresolved': ['off'],
'import/no-extraneous-dependencies': ['off'],
},
},
{
files: ['kitchen-sink/svelte/**/*.svelte'],
rules: {
...rules,
'no-console': ['off'],
'no-return-assign': ['off'],
'implicit-arrow-linebreak': ['off'],
'no-restricted-globals': ['off'],
},
},
],
};