-
Notifications
You must be signed in to change notification settings - Fork 614
/
Copy path.eslintrc.js
57 lines (56 loc) · 1.27 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
const config = {
env: {
es6: true,
// configure globals
jest: true,
browser: true,
commonjs: true,
node: true,
},
plugins: ['import', '@typescript-eslint'],
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:flowtype/recommended',
'prettier',
'plugin:jest/recommended',
],
parser: '@babel/eslint-parser',
ignorePatterns: 'examples/typescript/**/*.ts',
settings: {
flowtype: {
onlyFilesWithFlowAnnotation: true,
},
},
rules: {
'no-console': ['error'],
'no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
},
],
'import/no-cycle': 'error',
'jest/no-large-snapshots': 'warn',
'jest/no-disabled-tests': 'off',
'jest/expect-expect': 'off',
},
overrides: [
{
files: ['src/**/*.js'],
excludedFiles: ['*integrationTest.js', '*test.js', '**/__tests__/**', '*test.*.js'],
rules: {
'flowtype/require-valid-file-annotation': ['error', 'always'],
},
},
{
files: ['src/**/*.ts', 'examples/typescript/*.ts'],
parser: '@typescript-eslint/parser',
rules: {
'flowtype/no-types-missing-file-annotation': 'off',
},
},
],
}
module.exports = config