forked from ealush/vest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
86 lines (84 loc) · 1.87 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
const skipWords = require('./config/eslint/spellCheckerSkip');
module.exports = {
env: {
es6: true,
jest: true,
node: true,
},
extends: [
'eslint:recommended',
'plugin:jest/recommended',
'plugin:jest/style',
'plugin:import/errors',
'plugin:import/warnings',
'prettier',
],
globals: {
VEST_VERSION: true,
LIBRARY_NAME: true,
},
ignorePatterns: ['playground'],
parser: 'babel-eslint',
parserOptions: {
babelOptions: {
configFile: 'config/babel/babel.config.js',
},
ecmaFeatures: {
impliedStrict: true,
},
ecmaVersion: 10,
sourceType: 'module',
},
plugins: ['jest', 'spellcheck'],
rules: {
'arrow-body-style': [2, 'as-needed'],
'import/newline-after-import': 2,
'import/no-self-import': 2,
'import/no-useless-path-segments': 2,
'import/order': [
'error',
{
alphabetize: {
order: 'asc',
},
pathGroupsExcludedImportTypes: ['builtin'],
},
],
'jest/expect-expect': 0,
'jest/no-identical-title': 0,
'jest/no-standalone-expect': 0,
'max-params': [2, { max: 3 }],
'no-console': 2,
'no-duplicate-imports': 2,
'no-implicit-globals': 2,
'no-lonely-if': 2,
'no-multi-spaces': 1,
'no-trailing-spaces': [2, { ignoreComments: false }],
'no-unneeded-ternary': 2,
'no-unused-expressions': 2,
'no-useless-catch': 2,
'no-useless-computed-key': 2,
'no-useless-return': 2,
'no-var': 2,
'no-warning-comments': 2,
'object-shorthand': [2, 'always', { avoidQuotes: true }],
'prefer-arrow-callback': 2,
'prefer-const': 2,
'sort-keys': [
1,
'asc',
{
natural: true,
minKeys: 4,
},
],
'spellcheck/spell-checker': [
1,
{
strings: false,
identifiers: false,
skipWords,
},
],
},
};