-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslintrc.js
59 lines (53 loc) · 1.26 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
const restrictedGlobals = require('confusing-browser-globals');
module.exports = {
env: {
browser: true,
es6: true,
node: true
},
extends: ['standard', 'plugin:prettier/recommended'],
globals: {
document: 'readonly',
navigator: 'readonly',
window: 'readonly'
},
parserOptions: {
ecmaVersion: 2020,
ecmaFeatures: {
jsx: true
},
sourceType: 'module'
},
rules: {
camelcase: [
'error',
{
// Allows UNSAFE functions in React to be used and flagged by a
// different rule.
allow: ['^UNSAFE_'],
ignoreDestructuring: true,
ignoreImports: true,
properties: 'never'
}
],
'no-debugger': ['warn'],
'no-extra-label': ['error'],
'no-implicit-coercion': ['warn'],
'no-restricted-globals': ['error'].concat(restrictedGlobals),
'no-restricted-syntax': ['error', 'WithStatement'],
'no-sparse-arrays': ['off'],
'prefer-const': ['off'],
radix: ['error', 'as-needed'],
'require-yield': ['error'],
semi: ['error', 'always'],
'space-before-function-paren': [
'error',
{
anonymous: 'always',
asyncArrow: 'always',
named: 'never'
}
],
'promise/no-new-statics': ['error']
}
};