-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
35 lines (29 loc) · 933 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
module.exports = {
extends: 'airbnb-base',
env: {
jest: true,
},
plugins: ['jest'],
globals: {
BigInt: true,
},
// check package.json for files to include
// files: ['src/**/*.js', 'book/interview-questions/*.js'],
rules: {
// https://github.com/airbnb/javascript/issues/1089
// https://stackoverflow.com/a/35637900/684957
// allow to add properties to arguments
'no-param-reassign': [2, { props: false }],
// https://eslint.org/docs/rules/no-plusplus
// allows unary operators ++ and -- in the afterthought (final expression) of a for loop.
'no-plusplus': [0, { allowForLoopAfterthoughts: true }],
'no-continue': [0],
// Allow for..of
'no-restricted-syntax': [0, 'ForOfStatement'],
// jest plugin
// 'jest/no-disabled-tests': 'warn',
'jest/no-focused-tests': 'error',
'jest/no-identical-title': 'warn',
'jest/valid-expect': 'warn',
},
};