Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lint .eslintrc.js #3938

Merged
merged 1 commit into from
Jun 29, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Member

@SimenB SimenB Jun 29, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is off from where it should be now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, missed that one :(
#3939

'max-len': 0,
'no-multiple-empty-lines': 1,
'unicorn/filename-case': [2, {case: 'snakeCase'}],
},
};