-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
96 lines (96 loc) · 2.01 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
module.exports = {
// Extend the AirBnb lint config.
extends: 'airbnb',
parserOptions: {
ecmaVersion: 6,
ecmaFeatures: {
globalReturn: true,
impliedStrict: true,
},
sourceType: 'module',
},
parser: '@babel/eslint-parser',
env: {
es6: true,
browser: true,
node: true,
jest: true,
},
globals: {
siteClassNames: true,
getEventDetails: true,
},
settings: {
react: {
version: 'detect',
},
'import/resolver': {
alias: {
map: [
[ '@', '.' ],
],
},
},
},
rules: {
indent: [
2, 2,
{ SwitchCase: 1 },
],
'max-len': [
2, 100, 4,
{
ignoreComments: true,
ignoreUrls: true,
},
],
quotes: [2, 'single'],
semi: [2, 'always'],
'no-multiple-empty-lines': [2, { max: 1 }],
'comma-dangle': [2, 'always-multiline'],
'dot-location': [2, 'property'],
'one-var': [2, 'never'],
'no-var': [2],
'prefer-const': ['error'],
'no-bitwise': [2],
'id-length': [
'error',
{
properties: 'never',
exceptions: ['x', 'y', 'i', 'e', 'n', 'k'],
},
],
'func-names': [1, 'always'],
'no-use-before-define': [2, 'nofunc'],
yoda: [2, 'always'],
'object-curly-spacing': [2, 'always'],
'array-bracket-spacing': [2, 'never'],
'space-unary-ops': [
2,
{
words: true,
nonwords: true,
overrides: {
'-': false,
},
},
],
'keyword-spacing': ['error', { after: true }],
'space-before-blocks': [2, 'always'],
'space-in-parens': [2, 'never'],
'spaced-comment': [2, 'always'],
'no-confusing-arrow': ['error', { allowParens: true }],
'no-constant-condition': ['error'],
'arrow-parens': ['error', 'always'],
'no-param-reassign': ['error', { props: false }],
'no-underscore-dangle': [
'error',
{
allow: [
'__trackedAttributes',
'__includedModules',
],
},
],
},
};