-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy path.eslintrc.js
44 lines (44 loc) · 995 Bytes
/
.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
/** @type {import('eslint').ESLint.ConfigData} */
module.exports = {
root: true,
plugins: [
'sfgov'
],
extends: [
'plugin:sfgov/babel',
'plugin:sfgov/recommended'
],
globals: {
drupalSettings: 'readonly',
Drupal: 'readonly',
jQuery: 'readonly'
},
ignorePatterns: [
'dist/**'
],
rules: {
'arrow-parens': ['warn', 'as-needed', {
requireForBlockBody: false
}],
'brace-style': ['warn', 'stroustrup'],
camelcase: 'warn',
'comma-dangle': 'warn',
curly: ['warn', 'all'],
eqeqeq: ['error', 'smart'],
'newline-per-chained-call': ['warn', {
ignoreChainWithDepth: 3
}],
'no-magic-numbers': ['warn', {
ignore: [0, 1]
}],
'no-console': 'warn',
'object-shorthand': ['warn', 'always', {
avoidExplicitReturnArrows: true
}],
'prefer-arrow-callback': 'warn',
'promise/always-return': 0,
'promise/catch-or-return': 0,
semi: 'error',
strict: ['error', 'never']
}
}