mirror of
https://github.com/airbnb/javascript.git
synced 2026-01-14 17:18:19 -05:00
[eslint config] Add missing disabled rules.
This commit is contained in:
@@ -77,6 +77,14 @@ module.exports = {
|
||||
'no-lone-blocks': 2,
|
||||
// disallow creation of functions within loops
|
||||
'no-loop-func': 2,
|
||||
// disallow magic numbers
|
||||
// http://eslint.org/docs/rules/no-magic-numbers
|
||||
'no-magic-numbers': [0, {
|
||||
'ignore': [],
|
||||
'ignoreArrayIndexes': true,
|
||||
'enforceConst': true,
|
||||
'detectObjects': false,
|
||||
}],
|
||||
// disallow use of multiple spaces
|
||||
'no-multi-spaces': 2,
|
||||
// disallow use of multiline strings
|
||||
|
||||
@@ -49,6 +49,7 @@ module.exports = {
|
||||
// disallow comparisons with the value NaN
|
||||
'use-isnan': 2,
|
||||
// ensure JSDoc comments are valid
|
||||
// http://eslint.org/docs/rules/valid-jsdoc
|
||||
'valid-jsdoc': 0,
|
||||
// ensure that the results of typeof are compared against a valid string
|
||||
'valid-typeof': 2,
|
||||
|
||||
@@ -92,7 +92,37 @@ module.exports = {
|
||||
'import/export': 2,
|
||||
// ensure imports point to files/modules that can be resolved
|
||||
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-unresolved.md
|
||||
'import/no-unresolved': [2, { 'commonjs': true }]
|
||||
'import/no-unresolved': [2, { 'commonjs': true }],
|
||||
// ensure default import coupled with default export
|
||||
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/default.md#when-not-to-use-it
|
||||
'import/default': 0,
|
||||
// ensure named imports coupled with named exports
|
||||
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/named.md#when-not-to-use-it
|
||||
'import/named': 0,
|
||||
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/namespace.md
|
||||
'import/namespace': 0,
|
||||
// do not allow a default import name to match a named export
|
||||
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-named-as-default.md
|
||||
// TODO: enable
|
||||
'import/no-named-as-default': 0,
|
||||
// disallow require()
|
||||
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-commonjs.md
|
||||
'import/no-commonjs': 0,
|
||||
// disallow AMD require/define
|
||||
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-amd.md
|
||||
// TODO: enable
|
||||
'import/no-amd': 0,
|
||||
// disallow non-import statements appearing before import statements
|
||||
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/imports-first.md
|
||||
// TODO: enable?
|
||||
'import/imports-first': [0, 'absolute-first'],
|
||||
// disallow duplicate imports
|
||||
// TODO: enable
|
||||
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-duplicates.md
|
||||
'import/no-duplicates': 0,
|
||||
// disallow use of jsdoc-marked-deprecated imports
|
||||
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-deprecated.md
|
||||
'import/no-deprecated': 0,
|
||||
},
|
||||
'settings': {
|
||||
'import/resolver': {
|
||||
|
||||
@@ -22,5 +22,28 @@ module.exports = {
|
||||
// Require ARIA roles to be valid and non-abstract
|
||||
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/valid-aria-role.md
|
||||
'jsx-a11y/valid-aria-role': 2,
|
||||
|
||||
// require that JSX labels use "htmlFor"
|
||||
// TODO: enable
|
||||
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/label-uses-for.md
|
||||
'jsx-a11y/label-uses-for': 0,
|
||||
|
||||
// require that mouseover/out come with focus/blur, for keyboard-only users
|
||||
// TODO: enable?
|
||||
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/mouse-events-map-to-key-events.md
|
||||
'jsx-a11y/mouse-events-map-to-key-events': 0,
|
||||
|
||||
// disallow href "#"
|
||||
// TODO: enable
|
||||
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-hash-href.md
|
||||
'jsx-a11y/no-hash-href': 0,
|
||||
|
||||
// require things with onClick to have an aria role
|
||||
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/onclick-uses-role.md
|
||||
'jsx-a11y/onclick-uses-role': 0,
|
||||
|
||||
// require onBlur instead of onChange
|
||||
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/use-onblur-not-onchange.md
|
||||
'jsx-a11y/use-onblur-not-onchange': 0,
|
||||
},
|
||||
};
|
||||
|
||||
2
packages/eslint-config-airbnb/rules/react.js
vendored
2
packages/eslint-config-airbnb/rules/react.js
vendored
@@ -63,6 +63,8 @@ module.exports = {
|
||||
'ignoreCase': false,
|
||||
'callbacksLast': false,
|
||||
}],
|
||||
// deprecated in favor of react/jsx-sort-props
|
||||
'react/jsx-sort-prop-types': 0,
|
||||
// Enforce props alphabetical sorting
|
||||
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-sort-props.md
|
||||
'react/jsx-sort-props': [0, {
|
||||
|
||||
@@ -56,6 +56,9 @@ module.exports = {
|
||||
}],
|
||||
// specify the maximum depth callbacks can be nested
|
||||
'max-nested-callbacks': 0,
|
||||
// restrict the number of statements per line
|
||||
// http://eslint.org/docs/rules/max-statements-per-line
|
||||
'max-statements-per-line': [0, { 'max': 1 }],
|
||||
// require a capital letter for constructors
|
||||
'new-cap': [2, { 'newIsCap': true }],
|
||||
// disallow the omission of parentheses when invoking a constructor with no arguments
|
||||
@@ -80,6 +83,9 @@ module.exports = {
|
||||
'no-mixed-spaces-and-tabs': 2,
|
||||
// disallow multiple empty lines and only one newline at the end
|
||||
'no-multiple-empty-lines': [2, { 'max': 2, 'maxEOF': 1 }],
|
||||
// disallow negated conditions
|
||||
// http://eslint.org/docs/rules/no-negated-condition
|
||||
'no-negated-condition': 0,
|
||||
// disallow nested ternary expressions
|
||||
'no-nested-ternary': 2,
|
||||
// disallow use of the Object constructor
|
||||
@@ -119,6 +125,9 @@ module.exports = {
|
||||
'quotes': [2, 'single', 'avoid-escape'],
|
||||
// require identifiers to match the provided regular expression
|
||||
'id-match': 0,
|
||||
// do not require jsdoc
|
||||
// http://eslint.org/docs/rules/require-jsdoc
|
||||
'require-jsdoc': 0,
|
||||
// enforce spacing before and after semicolons
|
||||
'semi-spacing': [2, { 'before': false, 'after': true }],
|
||||
// require or disallow use of semicolons instead of ASI
|
||||
|
||||
Reference in New Issue
Block a user