mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-28 16:37:07 +02:00
ESLintify Part 2 (#841)
* ESLintify Part 2 * Fix * Fix tests * Fix tests * Fix tests
This commit is contained in:
parent
4267337fb0
commit
5ac2cee658
42 changed files with 188 additions and 190 deletions
27
.eslintrc.js
27
.eslintrc.js
|
@ -12,39 +12,30 @@ module.exports = {
|
|||
parser: 'babel-eslint',
|
||||
extends: ['airbnb', 'prettier'],
|
||||
rules: {
|
||||
// allow console
|
||||
'no-console': OFF,
|
||||
// require radix argument in parseInt
|
||||
'no-console': OFF, // We have console.error, console.warn, etc.
|
||||
radix: ERROR,
|
||||
'class-methods-use-this': OFF,
|
||||
'react/no-multi-comp': OFF,
|
||||
'import/no-extraneous-dependencies': OFF,
|
||||
'react/no-danger': OFF,
|
||||
'no-empty': [ERROR, {allowEmptyCatch: true}],
|
||||
'no-param-reassign': OFF,
|
||||
'no-plusplus': OFF,
|
||||
'import/no-extraneous-dependencies': OFF,
|
||||
'react/jsx-closing-bracket-location': OFF, // Formatting is left to Prettier.
|
||||
'react/jsx-filename-extension': OFF, // Enable in future when migrating.
|
||||
'react/no-danger': OFF, // Need this to inject scripts.
|
||||
'react/no-multi-comp': OFF, // One component per file creates too many files.
|
||||
'react/no-unescaped-entities': [ERROR, {forbid: ['>', '}']}],
|
||||
|
||||
// Existing ESLint errors sorted by frequency, silencing first.
|
||||
'react/button-has-type': OFF, // 1
|
||||
'react/forbid-prop-types': OFF, // 1
|
||||
'react/require-default-props': OFF, // 1
|
||||
'jsx-a11y/anchor-is-valid': OFF, // 9
|
||||
'arrow-body-style': OFF, // 10
|
||||
'react/jsx-curly-brace-presence': OFF, // 11
|
||||
'react/no-unescaped-entities': OFF, // 12
|
||||
'no-param-reassign': OFF, // 12
|
||||
'spaced-comment': OFF, // 14
|
||||
'import/no-unresolved': OFF, // 15
|
||||
'object-shorthand': OFF, // 16
|
||||
'dot-notation': OFF, // 19
|
||||
'react/prefer-stateless-function': OFF, // 22
|
||||
'no-plusplus': OFF, // 23
|
||||
'prefer-arrow-callback': OFF, // 30
|
||||
'react/jsx-filename-extension': OFF, // 31
|
||||
'import/newline-after-import': OFF, // 31
|
||||
'react/jsx-closing-bracket-location': OFF, // 36
|
||||
'func-names': OFF, // 37
|
||||
'import/no-dynamic-require': OFF, // 46
|
||||
'prefer-destructuring': OFF, // 69
|
||||
'prefer-const': OFF, // 71
|
||||
'global-require': OFF, // 85
|
||||
'react/jsx-one-expression-per-line': OFF, // 129
|
||||
'react/prop-types': OFF, // 197
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue