Skip to content

Commit c260053

Browse files
aaronabramovcpojer
authored andcommitted
lint .eslintrc.js (jestjs#3938)
1 parent e043113 commit c260053

File tree

2 files changed

+43
-37
lines changed

2 files changed

+43
-37
lines changed

.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ website/core/metadata*.js
1111
website/i18n/*.js
1212
website/src/jest/docs
1313
website/src/jest/blog
14+
!.eslintrc.js

.eslintrc.js

+42-37
Original file line numberDiff line numberDiff line change
@@ -9,66 +9,71 @@
99
module.exports = {
1010
extends: [
1111
'./packages/eslint-config-fb-strict/index.js',
12-
'plugin:import/errors'
12+
'plugin:import/errors',
1313
],
14-
parser: 'babel-eslint',
15-
rules: {
16-
'computed-property-spacing': 0,
17-
'flowtype/boolean-style': 2,
18-
'flowtype/no-primitive-constructor-types': 2,
19-
'flowtype/require-valid-file-annotation': 2,
20-
'max-len': 0,
21-
'no-multiple-empty-lines': 1,
22-
'import/no-duplicates': 2,
23-
'import/no-unresolved': [2, {ignore: ['^types/']}],
24-
// This has to be disabled until all type and module imports are combined
25-
// https://github.com/benmosher/eslint-plugin-import/issues/645
26-
'import/order': 0,
27-
// These has to be disabled until the whole code base is converted to ESM
28-
'import/default': 0,
29-
'import/named': 0,
30-
'unicorn/filename-case': [2, {case: 'snakeCase'}]
31-
},
32-
plugins: ['markdown', 'import', 'unicorn'],
3314
overrides: [
3415
// to make it more suitable for running on code examples in docs/ folder
3516
{
3617
files: ['*.md'],
3718
rules: {
38-
'react/react-in-jsx-scope': 0,
39-
'react/jsx-no-undef': 0,
19+
'consistent-return': 0,
20+
'import/no-unresolved': 0,
4021
'jest/no-focused-tests': 0,
41-
'jest/valid-expect': 0,
4222
'jest/no-identical-title': 0,
23+
'jest/valid-expect': 0,
4324
'no-undef': 0,
4425
'no-unused-vars': 0,
45-
'consistent-return': 0,
46-
'import/no-unresolved': 0,
26+
'react/jsx-no-undef': 0,
27+
'react/react-in-jsx-scope': 0,
4728
'sort-keys': 0,
48-
'unicorn/filename-case': 0
49-
}
29+
'unicorn/filename-case': 0,
30+
},
5031
},
5132
{
5233
files: ['examples/**/*'],
5334
rules: {
5435
'babel/func-params-comma-dangle': 0,
55-
'import/order': 0,
5636
'import/no-unresolved': [2, {ignore: ['^react-native$']}],
57-
'unicorn/filename-case': 0
58-
}
37+
'import/order': 0,
38+
'unicorn/filename-case': 0,
39+
},
5940
},
6041
{
6142
files: ['scripts/**/*', 'integration_tests/**/*'],
6243
rules: {
6344
'babel/func-params-comma-dangle': 0,
64-
'unicorn/filename-case': 0
65-
}
45+
'unicorn/filename-case': 0,
46+
},
6647
},
6748
{
68-
files: ['**/__mocks__/**/*', 'website/**/*', '**/jest-runtime/**/*', '**/src/Console*'],
49+
files: [
50+
'**/__mocks__/**/*',
51+
'website/**/*',
52+
'**/jest-runtime/**/*',
53+
'**/src/Console*',
54+
],
6955
rules: {
70-
'unicorn/filename-case': 0
71-
}
72-
}
73-
]
56+
'unicorn/filename-case': 0,
57+
},
58+
},
59+
],
60+
parser: 'babel-eslint',
61+
plugins: ['markdown', 'import', 'unicorn'],
62+
rules: {
63+
'computed-property-spacing': 0,
64+
'flowtype/boolean-style': 2,
65+
'flowtype/no-primitive-constructor-types': 2,
66+
'flowtype/require-valid-file-annotation': 2,
67+
'import/default': 0,
68+
'import/named': 0,
69+
'import/no-duplicates': 2,
70+
'import/no-unresolved': [2, {ignore: ['^types/']}],
71+
// This has to be disabled until all type and module imports are combined
72+
// https://github.com/benmosher/eslint-plugin-import/issues/645
73+
'import/order': 0,
74+
// These has to be disabled until the whole code base is converted to ESM
75+
'max-len': 0,
76+
'no-multiple-empty-lines': 1,
77+
'unicorn/filename-case': [2, {case: 'snakeCase'}],
78+
},
7479
};

0 commit comments

Comments
 (0)