Skip to content

Commit

Permalink
Update rules for eslint 5
Browse files Browse the repository at this point in the history
  • Loading branch information
cheton committed Jul 21, 2018
1 parent bb5be98 commit 67dfc02
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
7 changes: 7 additions & 0 deletions rules/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,19 @@ module.exports = {
'beforeColon': false,
'afterColon': true
}],
'max-classes-per-file': [2, 1],
'max-len': [1, 160, 4, {
'ignoreComments': true,
'ignoreUrls': true,
'ignoreStrings': true,
'ignoreTemplateLiterals': true,
'ignoreRegExpLiterals': true
}],
'max-lines-per-function': [1, {
'max': 200,
'skipBlankLines': true,
'skipComments': true
}],
'new-cap': [2, { 'newIsCap': true, 'capIsNew': false }],
'new-parens': 2,
'no-alert': 2,
Expand Down Expand Up @@ -83,6 +89,7 @@ module.exports = {
'one-var-declaration-per-line': 0,
'prefer-const': 0,
'prefer-destructuring': 0,
'prefer-object-spread': 0,
'prefer-promise-reject-errors': [1, {
'allowEmptyReject': true
}],
Expand Down
1 change: 1 addition & 0 deletions rules/import.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module.exports = {
'import/newline-after-import': 2,
'import/no-extraneous-dependencies': 0,
'import/no-named-as-default': 2,
'import/no-relative-parent-imports': 0,
'import/no-webpack-loader-syntax': 0,
'import/prefer-default-export': 0
}
Expand Down
5 changes: 4 additions & 1 deletion rules/jsx-a11y.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ module.exports = {
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/interactive-supports-focus.md
'jsx-a11y/interactive-supports-focus': 'error',

// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/label-has-for.md
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/label-has-associated-control.md
'jsx-a11y/label-has-associated-control': 'off',

// [deprecated] https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/label-has-for.md
'jsx-a11y/label-has-for': ['off', { components: ['label'] }],

// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/lang.md
Expand Down
1 change: 1 addition & 0 deletions rules/react.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ module.exports = {
'react/no-string-refs': 1,
'react/no-typos': 1,
'react/no-unknown-property': 1,
'react/no-unsafe': 1,
'react/no-unused-prop-types': 0,
'react/no-unused-state': 0,
'react/prefer-stateless-function': 1,
Expand Down

0 comments on commit 67dfc02

Please sign in to comment.