-
Notifications
You must be signed in to change notification settings - Fork 111
/
Copy pathbase.js
63 lines (58 loc) · 1.61 KB
/
base.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
module.exports = {
extends: ['airbnb/base', 'plugin:prettier/recommended', 'plugin:json/recommended'],
env: {
browser: true,
},
plugins: ['@babel', 'json', 'prettier'],
parser: '@babel/eslint-parser',
parserOptions: {
// airbnb is 2018, which does not include optional-chaining
ecmaVersion: 2020,
sourceType: 'module',
allowImportExportEverywhere: false,
},
globals: {
KYT: true,
},
rules: {
'arrow-parens': 'off',
// airbnb sets `properties: 'never'`, which confuses the linter
camelcase: ['error', { properties: 'always', ignoreDestructuring: false }],
'comma-dangle': [
'error',
{
arrays: 'always-multiline',
objects: 'always-multiline',
imports: 'always-multiline',
exports: 'always-multiline',
functions: 'never',
},
],
'constructor-super': 'error',
'import/extensions': ['warn', { js: 'never' }],
'import/max-dependencies': ['error', { max: 40 }],
'import/no-extraneous-dependencies': ['off'],
'import/no-restricted-paths': [
'error',
{
zones: [{ target: './src', from: './src/server' }],
},
],
'max-nested-callbacks': ['error', { max: 5 }],
'no-lonely-if': 'error',
'no-nested-ternary': 'error',
'no-param-reassign': 'off',
'no-this-before-super': 'error',
'no-warning-comments': ['warn', { terms: ['todo', 'fixme'], location: 'start' }],
'prefer-spread': 'error',
'prettier/prettier': [
'error',
{
printWidth: 100,
semi: true,
singleQuote: true,
trailingComma: 'es5',
},
],
},
};