-
Notifications
You must be signed in to change notification settings - Fork 70
/
.eslintrc.js
68 lines (67 loc) · 1.58 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
const path = require('path')
module.exports = {
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 8,
sourceType: 'module',
},
extends: ['airbnb-base', 'plugin:jest/recommended', 'prettier'],
plugins: ['flowtype', 'jest', 'prettier'],
env: {
es6: true,
browser: true,
jest: true,
node: true,
},
rules: {
'flowtype/define-flow-type': 1,
'flowtype/require-parameter-type': 1,
'flowtype/require-return-type': [
1,
'always',
{ annotateUndefined: 'never' },
],
'flowtype/semi': 0,
'flowtype/space-after-type-colon': [1, 'always'],
'flowtype/space-before-type-colon': [1, 'never'],
'flowtype/type-id-match': 0,
'flowtype/use-flow-type': 1,
'flowtype/valid-syntax': 1,
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: ['**/test/**/*.js'],
},
],
'jest/no-disabled-tests': 'warn',
'jest/no-focused-tests': 'error',
'jest/no-identical-title': 'error',
'jest/valid-expect': 'error',
'jest/no-try-expect': 0,
'no-underscore-dangle': 0,
'prefer-destructuring': 0,
'lines-between-class-members': 0,
'max-classes-per-file': 0,
'import/extensions': [
'error',
'ignorePackages',
{
js: 'never',
mjs: 'never',
ts: 'never',
},
],
},
settings: {
flowtype: {
onlyFilesWithFlowAnnotation: true,
},
'import/resolver': {
[path.resolve('./eslint-import-resolver-local')]: {
moduleNameMapper: {
'^types/(.*)': './types/$1',
},
},
},
},
}