-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
91 lines (89 loc) · 2.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
module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
},
extends: [
'eslint:recommended',
'standard',
],
env: {
browser: true,
},
globals: {
'Logger': true,
'UrlFetchApp': true,
'SpreadsheetApp': true,
'CacheService': true,
},
rules: {
'block-scoped-var': 'error',
'camelcase': ['error', { properties: 'always' }],
'comma-dangle': ['error', {
'arrays': 'always-multiline',
'objects': 'always-multiline',
'imports': 'always-multiline',
'exports': 'always-multiline',
'functions': 'never'
}],
'complexity': ['error', 10],
'consistent-this': 'error',
'curly': ['error', 'all'],
'dot-notation': 'error',
'eqeqeq': 'error',
'for-direction': 'error',
'global-require': 'error',
'guard-for-in': 'error',
'indent': ['error', 4, { 'SwitchCase': 1 }],
'max-len': ['warn', { code: 120 }],
'no-alert': 'error',
'no-await-in-loop': 'error',
'no-catch-shadow': 'error',
'no-div-regex': 'error',
'no-else-return': 'error',
'no-eq-null': 'error',
'no-loop-func': 'error',
'no-param-reassign': 'error',
'no-process-exit': 'error',
'no-return-assign': 'error',
'no-script-url': 'error',
'no-shadow': 'error',
'no-unused-expressions': 'error',
'no-unused-vars': ['error', { args: 'after-used', argsIgnorePattern: '^_', ignoreRestSiblings: true }],
'no-useless-concat': 'error',
'no-var': 'error',
'no-void': 'error',
'object-curly-spacing': ['error', 'always', { objectsInObjects: false }],
'object-property-newline': 'off',
'object-shorthand': ['error', 'always', { avoidExplicitReturnArrows: true }],
'radix': 'error',
'require-await': 'error',
'require-yield': 'error',
'semi': ['error', 'always'],
'space-before-function-paren': ['error', { anonymous: 'always', named: 'never', asyncArrow: 'always' }],
'import/no-anonymous-default-export': ['error', { allowCallExpression: false }],
'import/no-default-export': ['error'],
'standard/object-curly-even-spacing': 'off',
},
overrides: [
// Node files.
{
files: [
'webpack.config.js'
],
parserOptions: {
sourceType: 'script',
ecmaVersion: 2016
},
env: {
browser: false,
node: true
},
rules: {
'callback-return': 'error'
}
},
]
};