-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
.eslintrc.js
41 lines (41 loc) · 994 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
module.exports = {
root: true,
extends: ['tui/es6', 'plugin:jest/recommended', 'plugin:prettier/recommended'],
plugins: ['jest', 'prettier'],
env: {
browser: true,
amd: true,
node: true,
es6: true,
jest: true,
'jest/globals': true,
},
parser: '@babel/eslint-parser',
parserOptions: {
sourceType: 'module',
babelOptions: {
rootMode: 'upward',
},
},
ignorePatterns: ['node_modules/*', 'dist', 'examples'],
rules: {
'prefer-destructuring': [
'error',
{
VariableDeclarator: { array: true, object: true },
AssignmentExpression: { array: false, object: false },
},
],
},
overrides: [
{
files: ['*.spec.js'],
rules: {
'max-nested-callbacks': ['error', { max: 5 }],
'dot-notation': ['error', { allowKeywords: true }],
'no-undefined': 'off',
'jest/expect-expect': ['error', { assertFunctionNames: ['expect', 'assert*'] }],
},
},
],
};