Skip to content

Commit

Permalink
lint .eslintrc.js (jestjs#3938)
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronabramov authored and cpojer committed Jun 29, 2017
1 parent e043113 commit c260053
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 37 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ website/core/metadata*.js
website/i18n/*.js
website/src/jest/docs
website/src/jest/blog
!.eslintrc.js
79 changes: 42 additions & 37 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,66 +9,71 @@
module.exports = {
extends: [
'./packages/eslint-config-fb-strict/index.js',
'plugin:import/errors'
'plugin:import/errors',
],
parser: 'babel-eslint',
rules: {
'computed-property-spacing': 0,
'flowtype/boolean-style': 2,
'flowtype/no-primitive-constructor-types': 2,
'flowtype/require-valid-file-annotation': 2,
'max-len': 0,
'no-multiple-empty-lines': 1,
'import/no-duplicates': 2,
'import/no-unresolved': [2, {ignore: ['^types/']}],
// This has to be disabled until all type and module imports are combined
// https://github.com/benmosher/eslint-plugin-import/issues/645
'import/order': 0,
// These has to be disabled until the whole code base is converted to ESM
'import/default': 0,
'import/named': 0,
'unicorn/filename-case': [2, {case: 'snakeCase'}]
},
plugins: ['markdown', 'import', 'unicorn'],
overrides: [
// to make it more suitable for running on code examples in docs/ folder
{
files: ['*.md'],
rules: {
'react/react-in-jsx-scope': 0,
'react/jsx-no-undef': 0,
'consistent-return': 0,
'import/no-unresolved': 0,
'jest/no-focused-tests': 0,
'jest/valid-expect': 0,
'jest/no-identical-title': 0,
'jest/valid-expect': 0,
'no-undef': 0,
'no-unused-vars': 0,
'consistent-return': 0,
'import/no-unresolved': 0,
'react/jsx-no-undef': 0,
'react/react-in-jsx-scope': 0,
'sort-keys': 0,
'unicorn/filename-case': 0
}
'unicorn/filename-case': 0,
},
},
{
files: ['examples/**/*'],
rules: {
'babel/func-params-comma-dangle': 0,
'import/order': 0,
'import/no-unresolved': [2, {ignore: ['^react-native$']}],
'unicorn/filename-case': 0
}
'import/order': 0,
'unicorn/filename-case': 0,
},
},
{
files: ['scripts/**/*', 'integration_tests/**/*'],
rules: {
'babel/func-params-comma-dangle': 0,
'unicorn/filename-case': 0
}
'unicorn/filename-case': 0,
},
},
{
files: ['**/__mocks__/**/*', 'website/**/*', '**/jest-runtime/**/*', '**/src/Console*'],
files: [
'**/__mocks__/**/*',
'website/**/*',
'**/jest-runtime/**/*',
'**/src/Console*',
],
rules: {
'unicorn/filename-case': 0
}
}
]
'unicorn/filename-case': 0,
},
},
],
parser: 'babel-eslint',
plugins: ['markdown', 'import', 'unicorn'],
rules: {
'computed-property-spacing': 0,
'flowtype/boolean-style': 2,
'flowtype/no-primitive-constructor-types': 2,
'flowtype/require-valid-file-annotation': 2,
'import/default': 0,
'import/named': 0,
'import/no-duplicates': 2,
'import/no-unresolved': [2, {ignore: ['^types/']}],
// This has to be disabled until all type and module imports are combined
// https://github.com/benmosher/eslint-plugin-import/issues/645
'import/order': 0,
// These has to be disabled until the whole code base is converted to ESM
'max-len': 0,
'no-multiple-empty-lines': 1,
'unicorn/filename-case': [2, {case: 'snakeCase'}],
},
};

0 comments on commit c260053

Please sign in to comment.