-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.eslintrc.js
executable file
·57 lines (57 loc) · 1.11 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
module.exports = {
env: {
browser: true,
es6: true,
node: true
},
parser: '@babel/eslint-parser',
extends: 'eslint:recommended',
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
React: 'readonly'
},
parserOptions: {
ecmaFeatures: {
jsx: true
},
ecmaVersion: 2020,
sourceType: 'module',
requireConfigFile: false,
babelOptions: {
presets: ['@babel/preset-react']
}
},
plugins: [
'react'
],
rules: {
'react/jsx-uses-vars': [2],
indent: [
'error',
'tab',
{ SwitchCase: 1 }
],
quotes: [
'error',
'single'
],
semi: [
'error',
'never'
],
'no-console': 'warn',
'no-alert': 'warn',
'no-unused-vars': 'warn',
'keyword-spacing': ['error', { before: true, after: true }],
'space-infix-ops': ['error', { int32Hint: false }],
'comma-spacing': ['error'],
'arrow-spacing': ['error'],
'semi-spacing': ['error'],
'space-before-function-paren': ['error'],
'no-multi-spaces': 'error',
'valid-typeof': 'error',
'object-curly-spacing': ['error', 'always'],
'curly': 'error'
}
}