-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
44 lines (43 loc) · 966 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
const path = require('path');
const baseRules = require('eslint-config-airbnb-base/rules/style');
const [_, ...restricted] = baseRules.rules['no-restricted-syntax'];
module.exports = {
extends: 'airbnb-base',
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 2017,
sourceType: 'module',
},
env: {
node: true,
browser: true,
},
plugins: [
'babel',
'import',
'compat',
],
rules: {
'arrow-parens': ['error', 'as-needed'],
'no-plusplus': ['error', { allowForLoopAfterthoughts: true }],
'linebreak-style': 0,
'no-restricted-syntax': [2,
...restricted.filter(
r => !['ForOfStatement'].includes(r.selector)
),
],
'global-require': 0,
'import/no-unresolved': [2, { commonjs: true }],
'compat/compat': 2
},
settings: {
'import/resolver': {
node: {
paths: [
path.join(__dirname),
'node_modules',
],
},
},
},
};