diff --git a/lib/rules/boolean-prop-naming.js b/lib/rules/boolean-prop-naming.js index 5e0a420b7a..099634f647 100644 --- a/lib/rules/boolean-prop-naming.js +++ b/lib/rules/boolean-prop-naming.js @@ -21,6 +21,7 @@ const messages = { module.exports = { meta: { + type: 'suggestion', docs: { category: 'Stylistic Issues', description: 'Enforces consistent naming for boolean props', diff --git a/lib/rules/button-has-type.js b/lib/rules/button-has-type.js index add42d69ca..5127a0916b 100644 --- a/lib/rules/button-has-type.js +++ b/lib/rules/button-has-type.js @@ -30,6 +30,7 @@ const messages = { module.exports = { meta: { + type: 'problem', docs: { description: 'Forbid "button" element without an explicit "type" attribute', category: 'Possible Errors', diff --git a/lib/rules/default-props-match-prop-types.js b/lib/rules/default-props-match-prop-types.js index 81b5ebb392..2c29c63880 100644 --- a/lib/rules/default-props-match-prop-types.js +++ b/lib/rules/default-props-match-prop-types.js @@ -21,6 +21,7 @@ const messages = { module.exports = { meta: { + type: 'suggestion', docs: { description: 'Enforce all defaultProps are defined and not "required" in propTypes.', category: 'Best Practices', diff --git a/lib/rules/destructuring-assignment.js b/lib/rules/destructuring-assignment.js index 8850df0d3d..af7d3005ef 100644 --- a/lib/rules/destructuring-assignment.js +++ b/lib/rules/destructuring-assignment.js @@ -54,6 +54,7 @@ const messages = { module.exports = { meta: { + type: 'suggestion', docs: { description: 'Enforce consistent usage of destructuring assignment of props, state, and context', category: 'Stylistic Issues', diff --git a/lib/rules/display-name.js b/lib/rules/display-name.js index 528b8f2d80..5abdd18855 100644 --- a/lib/rules/display-name.js +++ b/lib/rules/display-name.js @@ -23,6 +23,7 @@ const messages = { module.exports = { meta: { + type: 'suggestion', docs: { description: 'Prevent missing displayName in a React component definition', category: 'Best Practices', diff --git a/lib/rules/forbid-component-props.js b/lib/rules/forbid-component-props.js index 5b09323a9d..40dfe948e5 100644 --- a/lib/rules/forbid-component-props.js +++ b/lib/rules/forbid-component-props.js @@ -24,6 +24,7 @@ const messages = { module.exports = { meta: { + type: 'problem', docs: { description: 'Forbid certain props on components', category: 'Best Practices', diff --git a/lib/rules/forbid-dom-props.js b/lib/rules/forbid-dom-props.js index 45beef4083..a0f71eb93f 100644 --- a/lib/rules/forbid-dom-props.js +++ b/lib/rules/forbid-dom-props.js @@ -24,6 +24,7 @@ const messages = { module.exports = { meta: { + type: 'problem', docs: { description: 'Forbid certain props on DOM Nodes', category: 'Best Practices', diff --git a/lib/rules/forbid-elements.js b/lib/rules/forbid-elements.js index a88ccea8fb..f666cb4ee0 100644 --- a/lib/rules/forbid-elements.js +++ b/lib/rules/forbid-elements.js @@ -21,6 +21,7 @@ const messages = { module.exports = { meta: { + type: 'problem', docs: { description: 'Forbid certain elements', category: 'Best Practices', diff --git a/lib/rules/forbid-foreign-prop-types.js b/lib/rules/forbid-foreign-prop-types.js index 2346e107f6..4106ad8344 100644 --- a/lib/rules/forbid-foreign-prop-types.js +++ b/lib/rules/forbid-foreign-prop-types.js @@ -15,6 +15,7 @@ const messages = { module.exports = { meta: { + type: 'suggestion', docs: { description: 'Forbid using another component\'s propTypes', category: 'Best Practices', diff --git a/lib/rules/forbid-prop-types.js b/lib/rules/forbid-prop-types.js index cd297eb199..070dd82466 100644 --- a/lib/rules/forbid-prop-types.js +++ b/lib/rules/forbid-prop-types.js @@ -27,6 +27,7 @@ const messages = { module.exports = { meta: { + type: 'suggestion', docs: { description: 'Forbid certain propTypes', category: 'Best Practices', diff --git a/lib/rules/function-component-definition.js b/lib/rules/function-component-definition.js index a20e1e3134..a0db6020ef 100644 --- a/lib/rules/function-component-definition.js +++ b/lib/rules/function-component-definition.js @@ -100,6 +100,7 @@ const messages = { module.exports = { meta: { + type: 'suggestion', docs: { description: 'Standardize the way function component get defined', category: 'Stylistic Issues', diff --git a/lib/rules/jsx-boolean-value.js b/lib/rules/jsx-boolean-value.js index d68b1ebdf6..d3ae26f03f 100644 --- a/lib/rules/jsx-boolean-value.js +++ b/lib/rules/jsx-boolean-value.js @@ -56,6 +56,7 @@ const messages = { module.exports = { meta: { + type: 'suggestion', docs: { description: 'Enforce boolean attributes notation in JSX', category: 'Stylistic Issues', diff --git a/lib/rules/jsx-child-element-spacing.js b/lib/rules/jsx-child-element-spacing.js index 2f8b41a574..c3f8e144ec 100644 --- a/lib/rules/jsx-child-element-spacing.js +++ b/lib/rules/jsx-child-element-spacing.js @@ -46,13 +46,13 @@ const messages = { module.exports = { meta: { + type: 'layout', docs: { description: 'Ensures inline tags are not rendered without spaces between them', category: 'Stylistic Issues', recommended: false, url: docsUrl('jsx-child-element-spacing'), }, - fixable: null, messages, diff --git a/lib/rules/jsx-closing-bracket-location.js b/lib/rules/jsx-closing-bracket-location.js index 324d0e7642..100c167e32 100644 --- a/lib/rules/jsx-closing-bracket-location.js +++ b/lib/rules/jsx-closing-bracket-location.js @@ -19,6 +19,7 @@ const messages = { module.exports = { meta: { + type: 'layout', docs: { description: 'Validate closing bracket location in JSX', category: 'Stylistic Issues', diff --git a/lib/rules/jsx-closing-tag-location.js b/lib/rules/jsx-closing-tag-location.js index 6299994186..48403b6519 100644 --- a/lib/rules/jsx-closing-tag-location.js +++ b/lib/rules/jsx-closing-tag-location.js @@ -20,6 +20,7 @@ const messages = { module.exports = { meta: { + type: 'layout', docs: { description: 'Validate closing tag location for multiline JSX', category: 'Stylistic Issues', diff --git a/lib/rules/jsx-curly-brace-presence.js b/lib/rules/jsx-curly-brace-presence.js index 8817a8bae3..dccf026260 100755 --- a/lib/rules/jsx-curly-brace-presence.js +++ b/lib/rules/jsx-curly-brace-presence.js @@ -38,6 +38,7 @@ const messages = { module.exports = { meta: { + type: 'suggestion', docs: { description: 'Disallow unnecessary JSX expressions when literals alone are sufficient ' diff --git a/lib/rules/jsx-curly-newline.js b/lib/rules/jsx-curly-newline.js index f9c7c4a961..fe735b2a58 100644 --- a/lib/rules/jsx-curly-newline.js +++ b/lib/rules/jsx-curly-newline.js @@ -44,16 +44,13 @@ const messages = { module.exports = { meta: { type: 'layout', - docs: { description: 'Enforce consistent line breaks inside jsx curly', category: 'Stylistic Issues', recommended: false, url: docsUrl('jsx-curly-newline'), }, - fixable: 'whitespace', - schema: [ { oneOf: [ diff --git a/lib/rules/jsx-curly-spacing.js b/lib/rules/jsx-curly-spacing.js index db6a80cbcc..157ea64722 100644 --- a/lib/rules/jsx-curly-spacing.js +++ b/lib/rules/jsx-curly-spacing.js @@ -36,6 +36,7 @@ const messages = { module.exports = { meta: { + type: 'layout', docs: { description: 'Enforce or disallow spaces inside of curly braces in JSX attributes', category: 'Stylistic Issues', diff --git a/lib/rules/jsx-equals-spacing.js b/lib/rules/jsx-equals-spacing.js index 41d123152e..d018d85e5b 100644 --- a/lib/rules/jsx-equals-spacing.js +++ b/lib/rules/jsx-equals-spacing.js @@ -21,6 +21,7 @@ const messages = { module.exports = { meta: { + type: 'layout', docs: { description: 'Disallow or enforce spaces around equal signs in JSX attributes', category: 'Stylistic Issues', diff --git a/lib/rules/jsx-filename-extension.js b/lib/rules/jsx-filename-extension.js index fee466f152..b8b6df2909 100644 --- a/lib/rules/jsx-filename-extension.js +++ b/lib/rules/jsx-filename-extension.js @@ -29,6 +29,7 @@ const messages = { module.exports = { meta: { + type: 'suggestion', docs: { description: 'Restrict file extensions that may contain JSX', category: 'Stylistic Issues', diff --git a/lib/rules/jsx-first-prop-new-line.js b/lib/rules/jsx-first-prop-new-line.js index 7d944fc0b7..a0fbe1b426 100644 --- a/lib/rules/jsx-first-prop-new-line.js +++ b/lib/rules/jsx-first-prop-new-line.js @@ -19,6 +19,7 @@ const messages = { module.exports = { meta: { + type: 'layout', docs: { description: 'Ensure proper position of the first property in JSX', category: 'Stylistic Issues', diff --git a/lib/rules/jsx-fragments.js b/lib/rules/jsx-fragments.js index 7354eecc39..86d65580de 100644 --- a/lib/rules/jsx-fragments.js +++ b/lib/rules/jsx-fragments.js @@ -29,6 +29,7 @@ const messages = { module.exports = { meta: { + type: 'suggestion', docs: { description: 'Enforce shorthand or standard form for React fragments', category: 'Stylistic Issues', diff --git a/lib/rules/jsx-handler-names.js b/lib/rules/jsx-handler-names.js index e82db76474..c43f7aaba4 100644 --- a/lib/rules/jsx-handler-names.js +++ b/lib/rules/jsx-handler-names.js @@ -19,6 +19,7 @@ const messages = { module.exports = { meta: { + type: 'suggestion', docs: { description: 'Enforce event handler naming conventions in JSX', category: 'Stylistic Issues', diff --git a/lib/rules/jsx-indent-props.js b/lib/rules/jsx-indent-props.js index 5d33ded173..1d53e5815b 100644 --- a/lib/rules/jsx-indent-props.js +++ b/lib/rules/jsx-indent-props.js @@ -44,6 +44,7 @@ const messages = { module.exports = { meta: { + type: 'layout', docs: { description: 'Validate props indentation in JSX', category: 'Stylistic Issues', diff --git a/lib/rules/jsx-indent.js b/lib/rules/jsx-indent.js index dca534229d..41faedcbd5 100644 --- a/lib/rules/jsx-indent.js +++ b/lib/rules/jsx-indent.js @@ -46,6 +46,7 @@ const messages = { module.exports = { meta: { + type: 'layout', docs: { description: 'Validate JSX indentation', category: 'Stylistic Issues', diff --git a/lib/rules/jsx-key.js b/lib/rules/jsx-key.js index 99b8ec19cd..a63c1c7b7b 100644 --- a/lib/rules/jsx-key.js +++ b/lib/rules/jsx-key.js @@ -30,6 +30,7 @@ const messages = { module.exports = { meta: { + type: 'problem', docs: { description: 'Report missing `key` props in iterators/collection literals', category: 'Possible Errors', diff --git a/lib/rules/jsx-max-depth.js b/lib/rules/jsx-max-depth.js index b4554c28d3..3c8fa1e16c 100644 --- a/lib/rules/jsx-max-depth.js +++ b/lib/rules/jsx-max-depth.js @@ -22,6 +22,7 @@ const messages = { module.exports = { meta: { + type: 'suggestion', docs: { description: 'Validate JSX maximum depth', category: 'Stylistic Issues', diff --git a/lib/rules/jsx-max-props-per-line.js b/lib/rules/jsx-max-props-per-line.js index 9ae1f6f00d..5ee831ed82 100644 --- a/lib/rules/jsx-max-props-per-line.js +++ b/lib/rules/jsx-max-props-per-line.js @@ -25,6 +25,7 @@ const messages = { module.exports = { meta: { + type: 'layout', docs: { description: 'Limit maximum of props on a single line in JSX', category: 'Stylistic Issues', diff --git a/lib/rules/jsx-newline.js b/lib/rules/jsx-newline.js index e3de9daef3..fe59f22c1b 100644 --- a/lib/rules/jsx-newline.js +++ b/lib/rules/jsx-newline.js @@ -20,6 +20,7 @@ const messages = { module.exports = { meta: { + type: 'layout', docs: { description: 'Require or prevent a new line after jsx elements and expressions.', category: 'Stylistic Issues', diff --git a/lib/rules/jsx-no-bind.js b/lib/rules/jsx-no-bind.js index 709fc98548..f12b99c9a4 100644 --- a/lib/rules/jsx-no-bind.js +++ b/lib/rules/jsx-no-bind.js @@ -26,6 +26,7 @@ const messages = { module.exports = { meta: { + type: 'suggestion', docs: { description: 'Prevents usage of Function.prototype.bind and arrow functions in React component props', category: 'Best Practices', diff --git a/lib/rules/jsx-no-comment-textnodes.js b/lib/rules/jsx-no-comment-textnodes.js index fbc6d151e6..deccfdde51 100644 --- a/lib/rules/jsx-no-comment-textnodes.js +++ b/lib/rules/jsx-no-comment-textnodes.js @@ -35,6 +35,7 @@ function checkText(node, context) { module.exports = { meta: { + type: 'problem', docs: { description: 'Comments inside children section of tag should be placed inside braces', category: 'Possible Errors', diff --git a/lib/rules/jsx-no-constructed-context-values.js b/lib/rules/jsx-no-constructed-context-values.js index da0409791a..3ff64a5814 100644 --- a/lib/rules/jsx-no-constructed-context-values.js +++ b/lib/rules/jsx-no-constructed-context-values.js @@ -130,6 +130,7 @@ const messages = { module.exports = { meta: { + type: 'suggestion', docs: { description: 'Prevents JSX context provider values from taking values that will cause needless rerenders.', category: 'Best Practices', diff --git a/lib/rules/jsx-no-duplicate-props.js b/lib/rules/jsx-no-duplicate-props.js index 109a8c736c..ed39a7420c 100644 --- a/lib/rules/jsx-no-duplicate-props.js +++ b/lib/rules/jsx-no-duplicate-props.js @@ -19,6 +19,7 @@ const messages = { module.exports = { meta: { + type: 'problem', docs: { description: 'Enforce no duplicate props', category: 'Possible Errors', diff --git a/lib/rules/jsx-no-literals.js b/lib/rules/jsx-no-literals.js index 7ad1ff62e1..8dd804baef 100644 --- a/lib/rules/jsx-no-literals.js +++ b/lib/rules/jsx-no-literals.js @@ -26,6 +26,7 @@ const messages = { module.exports = { meta: { + type: 'suggestion', docs: { description: 'Prevent using string literals in React component definition', category: 'Stylistic Issues', diff --git a/lib/rules/jsx-no-script-url.js b/lib/rules/jsx-no-script-url.js index 4dfd642dad..fb920c05ed 100644 --- a/lib/rules/jsx-no-script-url.js +++ b/lib/rules/jsx-no-script-url.js @@ -49,6 +49,7 @@ const messages = { module.exports = { meta: { + type: 'suggestion', docs: { description: 'Forbid `javascript:` URLs', category: 'Best Practices', diff --git a/lib/rules/jsx-no-target-blank.js b/lib/rules/jsx-no-target-blank.js index dbece120c5..b2041d3327 100644 --- a/lib/rules/jsx-no-target-blank.js +++ b/lib/rules/jsx-no-target-blank.js @@ -103,6 +103,7 @@ const messages = { module.exports = { meta: { + type: 'suggestion', fixable: 'code', docs: { description: 'Forbid `target="_blank"` attribute without `rel="noreferrer"`', diff --git a/lib/rules/jsx-no-undef.js b/lib/rules/jsx-no-undef.js index d7a42ccff2..f98b957b8d 100644 --- a/lib/rules/jsx-no-undef.js +++ b/lib/rules/jsx-no-undef.js @@ -19,6 +19,7 @@ const messages = { module.exports = { meta: { + type: 'problem', docs: { description: 'Disallow undeclared variables in JSX', category: 'Possible Errors', diff --git a/lib/rules/jsx-one-expression-per-line.js b/lib/rules/jsx-one-expression-per-line.js index 3ef929394c..689a7e3d23 100644 --- a/lib/rules/jsx-one-expression-per-line.js +++ b/lib/rules/jsx-one-expression-per-line.js @@ -23,6 +23,7 @@ const messages = { module.exports = { meta: { + type: 'layout', docs: { description: 'Limit to one expression per line in JSX', category: 'Stylistic Issues', diff --git a/lib/rules/jsx-pascal-case.js b/lib/rules/jsx-pascal-case.js index 901294fa52..5c2cd3f61e 100644 --- a/lib/rules/jsx-pascal-case.js +++ b/lib/rules/jsx-pascal-case.js @@ -78,6 +78,7 @@ const messages = { module.exports = { meta: { + type: 'suggestion', docs: { description: 'Enforce PascalCase for user-defined JSX components', category: 'Stylistic Issues', diff --git a/lib/rules/jsx-props-no-multi-spaces.js b/lib/rules/jsx-props-no-multi-spaces.js index b0d34d59dd..a9ba7ceabb 100644 --- a/lib/rules/jsx-props-no-multi-spaces.js +++ b/lib/rules/jsx-props-no-multi-spaces.js @@ -19,6 +19,7 @@ const messages = { module.exports = { meta: { + type: 'layout', docs: { description: 'Disallow multiple spaces between inline JSX props', category: 'Stylistic Issues', diff --git a/lib/rules/jsx-props-no-spreading.js b/lib/rules/jsx-props-no-spreading.js index 99f7cc5bfa..cd0efb67ee 100644 --- a/lib/rules/jsx-props-no-spreading.js +++ b/lib/rules/jsx-props-no-spreading.js @@ -40,6 +40,7 @@ const messages = { module.exports = { meta: { + type: 'suggestion', docs: { description: 'Prevent JSX prop spreading', category: 'Best Practices', diff --git a/lib/rules/jsx-sort-default-props.js b/lib/rules/jsx-sort-default-props.js index 36ad64cad3..7ff86bd90a 100644 --- a/lib/rules/jsx-sort-default-props.js +++ b/lib/rules/jsx-sort-default-props.js @@ -21,6 +21,7 @@ const messages = { module.exports = { meta: { + type: 'suggestion', docs: { description: 'Enforce default props alphabetical sorting', category: 'Stylistic Issues', diff --git a/lib/rules/jsx-sort-props.js b/lib/rules/jsx-sort-props.js index 6c864bdea1..a3749d43ab 100644 --- a/lib/rules/jsx-sort-props.js +++ b/lib/rules/jsx-sort-props.js @@ -215,6 +215,7 @@ function validateReservedFirstConfig(context, reservedFirst) { module.exports = { meta: { + type: 'suggestion', docs: { description: 'Enforce props alphabetical sorting', category: 'Stylistic Issues', diff --git a/lib/rules/jsx-space-before-closing.js b/lib/rules/jsx-space-before-closing.js index c053d84393..15828385d1 100644 --- a/lib/rules/jsx-space-before-closing.js +++ b/lib/rules/jsx-space-before-closing.js @@ -24,6 +24,7 @@ const messages = { module.exports = { meta: { + type: 'layout', deprecated: true, docs: { description: 'Validate spacing before closing bracket in JSX', diff --git a/lib/rules/jsx-tag-spacing.js b/lib/rules/jsx-tag-spacing.js index 546dd082cf..bb8a7aa0e6 100644 --- a/lib/rules/jsx-tag-spacing.js +++ b/lib/rules/jsx-tag-spacing.js @@ -215,6 +215,7 @@ const optionDefaults = { module.exports = { meta: { + type: 'layout', docs: { description: 'Validate whitespace in and around the JSX opening and closing brackets', category: 'Stylistic Issues', diff --git a/lib/rules/jsx-uses-react.js b/lib/rules/jsx-uses-react.js index a433d795f3..6d578f1313 100644 --- a/lib/rules/jsx-uses-react.js +++ b/lib/rules/jsx-uses-react.js @@ -14,6 +14,7 @@ const docsUrl = require('../util/docsUrl'); module.exports = { meta: { + type: 'suggestion', docs: { description: 'Prevent React to be marked as unused', category: 'Best Practices', diff --git a/lib/rules/jsx-uses-vars.js b/lib/rules/jsx-uses-vars.js index 28d1cb2d60..2a7c6ec540 100644 --- a/lib/rules/jsx-uses-vars.js +++ b/lib/rules/jsx-uses-vars.js @@ -16,6 +16,7 @@ const isTagName = (name) => isTagNameRe.test(name); module.exports = { meta: { + type: 'suggestion', docs: { description: 'Prevent variables used in JSX to be marked as unused', category: 'Best Practices', diff --git a/lib/rules/jsx-wrap-multilines.js b/lib/rules/jsx-wrap-multilines.js index 94600efa61..ac4399bc32 100644 --- a/lib/rules/jsx-wrap-multilines.js +++ b/lib/rules/jsx-wrap-multilines.js @@ -35,6 +35,7 @@ const messages = { module.exports = { meta: { + type: 'layout', docs: { description: 'Prevent missing parentheses around multilines JSX', category: 'Stylistic Issues', diff --git a/lib/rules/no-access-state-in-setstate.js b/lib/rules/no-access-state-in-setstate.js index e3e76a2323..b469c965cf 100644 --- a/lib/rules/no-access-state-in-setstate.js +++ b/lib/rules/no-access-state-in-setstate.js @@ -19,6 +19,7 @@ const messages = { module.exports = { meta: { + type: 'problem', docs: { description: 'Reports when this.state is accessed within setState', category: 'Possible Errors', diff --git a/lib/rules/no-adjacent-inline-elements.js b/lib/rules/no-adjacent-inline-elements.js index 7c622f2eb2..a2fc724047 100644 --- a/lib/rules/no-adjacent-inline-elements.js +++ b/lib/rules/no-adjacent-inline-elements.js @@ -78,6 +78,7 @@ const messages = { module.exports = { meta: { + type: 'suggestion', docs: { description: 'Prevent adjacent inline elements not separated by whitespace.', category: 'Best Practices', diff --git a/lib/rules/no-array-index-key.js b/lib/rules/no-array-index-key.js index 2e9f3db22c..5b2c957d9c 100644 --- a/lib/rules/no-array-index-key.js +++ b/lib/rules/no-array-index-key.js @@ -21,6 +21,7 @@ const messages = { module.exports = { meta: { + type: 'problem', docs: { description: 'Prevent usage of Array index in keys', category: 'Best Practices', diff --git a/lib/rules/no-arrow-function-lifecycle.js b/lib/rules/no-arrow-function-lifecycle.js index e2a69f3d68..b0e7cc9163 100644 --- a/lib/rules/no-arrow-function-lifecycle.js +++ b/lib/rules/no-arrow-function-lifecycle.js @@ -33,6 +33,7 @@ const messages = { module.exports = { meta: { + type: 'suggestion', docs: { description: 'Lifecycle methods should be methods on the prototype, not class fields', category: 'Best Practices', diff --git a/lib/rules/no-children-prop.js b/lib/rules/no-children-prop.js index 5bd114a464..1f9effcc88 100644 --- a/lib/rules/no-children-prop.js +++ b/lib/rules/no-children-prop.js @@ -39,6 +39,7 @@ const messages = { module.exports = { meta: { + type: 'suggestion', docs: { description: 'Prevent passing of children as props.', category: 'Best Practices', diff --git a/lib/rules/no-danger-with-children.js b/lib/rules/no-danger-with-children.js index 399d202313..21fe09be09 100644 --- a/lib/rules/no-danger-with-children.js +++ b/lib/rules/no-danger-with-children.js @@ -19,6 +19,7 @@ const messages = { module.exports = { meta: { + type: 'problem', docs: { description: 'Report when a DOM element is using both children and dangerouslySetInnerHTML', category: 'Possible Errors', diff --git a/lib/rules/no-danger.js b/lib/rules/no-danger.js index 2fb3ddc999..0a303d8f1b 100644 --- a/lib/rules/no-danger.js +++ b/lib/rules/no-danger.js @@ -45,6 +45,7 @@ const messages = { module.exports = { meta: { + type: 'suggestion', docs: { description: 'Prevent usage of dangerous JSX props', category: 'Best Practices', diff --git a/lib/rules/no-deprecated.js b/lib/rules/no-deprecated.js index f050a8234d..f0aee851f1 100644 --- a/lib/rules/no-deprecated.js +++ b/lib/rules/no-deprecated.js @@ -35,6 +35,7 @@ const messages = { module.exports = { meta: { + type: 'suggestion', docs: { description: 'Prevent usage of deprecated methods', category: 'Best Practices', diff --git a/lib/rules/no-direct-mutation-state.js b/lib/rules/no-direct-mutation-state.js index 6a30ed8908..09b391e1d8 100644 --- a/lib/rules/no-direct-mutation-state.js +++ b/lib/rules/no-direct-mutation-state.js @@ -20,6 +20,7 @@ const messages = { module.exports = { meta: { + type: 'problem', docs: { description: 'Prevent direct mutation of this.state', category: 'Possible Errors', diff --git a/lib/rules/no-find-dom-node.js b/lib/rules/no-find-dom-node.js index 510a79efc8..ab164b40dc 100644 --- a/lib/rules/no-find-dom-node.js +++ b/lib/rules/no-find-dom-node.js @@ -18,6 +18,7 @@ const messages = { module.exports = { meta: { + type: 'suggestion', docs: { description: 'Prevent usage of findDOMNode', category: 'Best Practices', diff --git a/lib/rules/no-invalid-html-attribute.js b/lib/rules/no-invalid-html-attribute.js index 1a5b255f4e..11067f9b14 100644 --- a/lib/rules/no-invalid-html-attribute.js +++ b/lib/rules/no-invalid-html-attribute.js @@ -478,6 +478,7 @@ function checkCreateProps(context, node, attribute) { module.exports = { meta: { + type: 'problem', fixable: 'code', docs: { description: 'Forbid attribute with an invalid values`', diff --git a/lib/rules/no-is-mounted.js b/lib/rules/no-is-mounted.js index dc9db24f28..b8aac97d05 100644 --- a/lib/rules/no-is-mounted.js +++ b/lib/rules/no-is-mounted.js @@ -18,6 +18,7 @@ const messages = { module.exports = { meta: { + type: 'suggestion', docs: { description: 'Prevent usage of isMounted', category: 'Best Practices', diff --git a/lib/rules/no-multi-comp.js b/lib/rules/no-multi-comp.js index 4900063f1f..70ac691230 100644 --- a/lib/rules/no-multi-comp.js +++ b/lib/rules/no-multi-comp.js @@ -19,6 +19,7 @@ const messages = { module.exports = { meta: { + type: 'suggestion', docs: { description: 'Prevent multiple component definition per file', category: 'Stylistic Issues', diff --git a/lib/rules/no-namespace.js b/lib/rules/no-namespace.js index 929fb2bf88..669a70e9f5 100644 --- a/lib/rules/no-namespace.js +++ b/lib/rules/no-namespace.js @@ -20,6 +20,7 @@ const messages = { module.exports = { meta: { + type: 'problem', docs: { description: 'Enforce that namespaces are not used in React elements', category: 'Possible Errors', diff --git a/lib/rules/no-redundant-should-component-update.js b/lib/rules/no-redundant-should-component-update.js index 4298666fb7..e4082f22cd 100644 --- a/lib/rules/no-redundant-should-component-update.js +++ b/lib/rules/no-redundant-should-component-update.js @@ -19,6 +19,7 @@ const messages = { module.exports = { meta: { + type: 'problem', docs: { description: 'Flag shouldComponentUpdate when extending PureComponent', category: 'Possible Errors', diff --git a/lib/rules/no-render-return-value.js b/lib/rules/no-render-return-value.js index 3813739a99..21c35a72ab 100644 --- a/lib/rules/no-render-return-value.js +++ b/lib/rules/no-render-return-value.js @@ -19,6 +19,7 @@ const messages = { module.exports = { meta: { + type: 'suggestion', docs: { description: 'Prevent usage of the return value of React.render', category: 'Best Practices', diff --git a/lib/rules/no-set-state.js b/lib/rules/no-set-state.js index 444840d5e6..59faa3dfca 100644 --- a/lib/rules/no-set-state.js +++ b/lib/rules/no-set-state.js @@ -19,6 +19,7 @@ const messages = { module.exports = { meta: { + type: 'suggestion', docs: { description: 'Prevent usage of setState', category: 'Stylistic Issues', diff --git a/lib/rules/no-string-refs.js b/lib/rules/no-string-refs.js index 88ef59b80d..0c930c9ef9 100644 --- a/lib/rules/no-string-refs.js +++ b/lib/rules/no-string-refs.js @@ -20,6 +20,7 @@ const messages = { module.exports = { meta: { + type: 'suggestion', docs: { description: 'Prevent string definitions for references and prevent referencing this.refs', category: 'Best Practices', diff --git a/lib/rules/no-this-in-sfc.js b/lib/rules/no-this-in-sfc.js index e5af824064..85b064fb59 100644 --- a/lib/rules/no-this-in-sfc.js +++ b/lib/rules/no-this-in-sfc.js @@ -18,6 +18,7 @@ const messages = { module.exports = { meta: { + type: 'problem', docs: { description: 'Report "this" being used in stateless components', category: 'Possible Errors', diff --git a/lib/rules/no-typos.js b/lib/rules/no-typos.js index 76783729ae..8568e0dad0 100644 --- a/lib/rules/no-typos.js +++ b/lib/rules/no-typos.js @@ -29,6 +29,7 @@ const messages = { module.exports = { meta: { + type: 'problem', docs: { description: 'Prevent common typos', category: 'Stylistic Issues', diff --git a/lib/rules/no-unescaped-entities.js b/lib/rules/no-unescaped-entities.js index e5a16da9a8..58e7c8c0dc 100644 --- a/lib/rules/no-unescaped-entities.js +++ b/lib/rules/no-unescaped-entities.js @@ -37,6 +37,7 @@ const messages = { module.exports = { meta: { + type: 'problem', docs: { description: 'Detect unescaped HTML entities, which might represent malformed tags', category: 'Possible Errors', diff --git a/lib/rules/no-unknown-property.js b/lib/rules/no-unknown-property.js index 5e2d99ee07..c6a840f6a3 100644 --- a/lib/rules/no-unknown-property.js +++ b/lib/rules/no-unknown-property.js @@ -219,6 +219,7 @@ const messages = { module.exports = { meta: { + type: 'problem', docs: { description: 'Prevent usage of unknown DOM property', category: 'Possible Errors', diff --git a/lib/rules/no-unsafe.js b/lib/rules/no-unsafe.js index f532a53e06..d7a16997e1 100644 --- a/lib/rules/no-unsafe.js +++ b/lib/rules/no-unsafe.js @@ -21,6 +21,7 @@ const messages = { module.exports = { meta: { + type: 'suggestion', docs: { description: 'Prevent usage of unsafe lifecycle methods', category: 'Best Practices', diff --git a/lib/rules/no-unstable-nested-components.js b/lib/rules/no-unstable-nested-components.js index ca4ddff560..8fd1bb5fa5 100644 --- a/lib/rules/no-unstable-nested-components.js +++ b/lib/rules/no-unstable-nested-components.js @@ -268,6 +268,7 @@ function resolveComponentName(node) { module.exports = { meta: { + type: 'problem', docs: { description: 'Prevent creating unstable components inside components', category: 'Possible Errors', diff --git a/lib/rules/no-unused-class-component-methods.js b/lib/rules/no-unused-class-component-methods.js index 3bcadd1d53..9468433904 100644 --- a/lib/rules/no-unused-class-component-methods.js +++ b/lib/rules/no-unused-class-component-methods.js @@ -100,6 +100,7 @@ const messages = { module.exports = { meta: { + type: 'suggestion', docs: { description: 'Prevent declaring unused methods of component class', category: 'Best Practices', diff --git a/lib/rules/no-unused-prop-types.js b/lib/rules/no-unused-prop-types.js index d001da57b1..b722568b30 100644 --- a/lib/rules/no-unused-prop-types.js +++ b/lib/rules/no-unused-prop-types.js @@ -22,6 +22,7 @@ const messages = { module.exports = { meta: { + type: 'suggestion', docs: { description: 'Prevent definitions of unused prop types', category: 'Best Practices', diff --git a/lib/rules/no-unused-state.js b/lib/rules/no-unused-state.js index aa1bdee346..ebfc4a4d3f 100644 --- a/lib/rules/no-unused-state.js +++ b/lib/rules/no-unused-state.js @@ -79,6 +79,7 @@ const messages = { module.exports = { meta: { + type: 'suggestion', docs: { description: 'Prevent definition of unused state fields', category: 'Best Practices', diff --git a/lib/rules/prefer-es6-class.js b/lib/rules/prefer-es6-class.js index 01ac32ffdb..e153f1e4a2 100644 --- a/lib/rules/prefer-es6-class.js +++ b/lib/rules/prefer-es6-class.js @@ -20,6 +20,7 @@ const messages = { module.exports = { meta: { + type: 'suggestion', docs: { description: 'Enforce ES5 or ES6 class for React Components', category: 'Stylistic Issues', diff --git a/lib/rules/prefer-exact-props.js b/lib/rules/prefer-exact-props.js index fb50f1e31f..62d4e4d8ed 100644 --- a/lib/rules/prefer-exact-props.js +++ b/lib/rules/prefer-exact-props.js @@ -22,6 +22,7 @@ const messages = { module.exports = { meta: { + type: 'problem', docs: { description: 'Prefer exact proptype definitions', category: 'Possible Errors', diff --git a/lib/rules/prefer-read-only-props.js b/lib/rules/prefer-read-only-props.js index f1eb3c3d7c..80689c9424 100644 --- a/lib/rules/prefer-read-only-props.js +++ b/lib/rules/prefer-read-only-props.js @@ -34,6 +34,7 @@ const messages = { module.exports = { meta: { + type: 'suggestion', docs: { description: 'Require read-only props.', category: 'Stylistic Issues', diff --git a/lib/rules/prefer-stateless-function.js b/lib/rules/prefer-stateless-function.js index 00132c6864..75c7e7e130 100644 --- a/lib/rules/prefer-stateless-function.js +++ b/lib/rules/prefer-stateless-function.js @@ -23,6 +23,7 @@ const messages = { module.exports = { meta: { + type: 'suggestion', docs: { description: 'Enforce stateless components to be written as a pure function', category: 'Stylistic Issues', diff --git a/lib/rules/prop-types.js b/lib/rules/prop-types.js index 5533d9d3cb..ae3bdc0a13 100644 --- a/lib/rules/prop-types.js +++ b/lib/rules/prop-types.js @@ -22,6 +22,7 @@ const messages = { module.exports = { meta: { + type: 'suggestion', docs: { description: 'Prevent missing props validation in a React component definition', category: 'Best Practices', diff --git a/lib/rules/react-in-jsx-scope.js b/lib/rules/react-in-jsx-scope.js index 4c277ce140..47382a6f5c 100644 --- a/lib/rules/react-in-jsx-scope.js +++ b/lib/rules/react-in-jsx-scope.js @@ -20,6 +20,7 @@ const messages = { module.exports = { meta: { + type: 'problem', docs: { description: 'Prevent missing React when using JSX', category: 'Possible Errors', diff --git a/lib/rules/require-default-props.js b/lib/rules/require-default-props.js index 8067e25cc5..5de9925f64 100644 --- a/lib/rules/require-default-props.js +++ b/lib/rules/require-default-props.js @@ -21,6 +21,7 @@ const messages = { module.exports = { meta: { + type: 'suggestion', docs: { description: 'Enforce a defaultProps definition for every prop that is not a required prop.', category: 'Best Practices', diff --git a/lib/rules/require-optimization.js b/lib/rules/require-optimization.js index 8f61d2148e..83b965cf85 100644 --- a/lib/rules/require-optimization.js +++ b/lib/rules/require-optimization.js @@ -15,6 +15,7 @@ const messages = { module.exports = { meta: { + type: 'suggestion', docs: { description: 'Enforce React components to have a shouldComponentUpdate method', category: 'Best Practices', diff --git a/lib/rules/require-render-return.js b/lib/rules/require-render-return.js index 460683e4c5..5813d7df50 100644 --- a/lib/rules/require-render-return.js +++ b/lib/rules/require-render-return.js @@ -20,6 +20,7 @@ const messages = { module.exports = { meta: { + type: 'problem', docs: { description: 'Enforce ES5 or ES6 class for returning value in render function', category: 'Possible Errors', diff --git a/lib/rules/self-closing-comp.js b/lib/rules/self-closing-comp.js index 94672ecac8..8620d6d355 100644 --- a/lib/rules/self-closing-comp.js +++ b/lib/rules/self-closing-comp.js @@ -21,6 +21,7 @@ const messages = { module.exports = { meta: { + type: 'suggestion', docs: { description: 'Prevent extra closing tags for components without children', category: 'Stylistic Issues', diff --git a/lib/rules/sort-comp.js b/lib/rules/sort-comp.js index 842dd561e9..6d5b3a0ef5 100644 --- a/lib/rules/sort-comp.js +++ b/lib/rules/sort-comp.js @@ -87,6 +87,7 @@ const messages = { module.exports = { meta: { + type: 'suggestion', docs: { description: 'Enforce component methods order', category: 'Stylistic Issues', diff --git a/lib/rules/sort-prop-types.js b/lib/rules/sort-prop-types.js index 8b1a379414..75a0b4c0db 100644 --- a/lib/rules/sort-prop-types.js +++ b/lib/rules/sort-prop-types.js @@ -23,6 +23,7 @@ const messages = { module.exports = { meta: { + type: 'suggestion', docs: { description: 'Enforce propTypes declarations alphabetical sorting', category: 'Stylistic Issues', diff --git a/lib/rules/state-in-constructor.js b/lib/rules/state-in-constructor.js index a7c543d308..18f250d701 100644 --- a/lib/rules/state-in-constructor.js +++ b/lib/rules/state-in-constructor.js @@ -20,6 +20,7 @@ const messages = { module.exports = { meta: { + type: 'suggestion', docs: { description: 'State initialization in an ES6 class component should be in a constructor', category: 'Stylistic Issues', diff --git a/lib/rules/static-property-placement.js b/lib/rules/static-property-placement.js index 3fa15d970c..953b363c0d 100644 --- a/lib/rules/static-property-placement.js +++ b/lib/rules/static-property-placement.js @@ -56,13 +56,13 @@ const messages = { module.exports = { meta: { + type: 'suggestion', docs: { description: 'Defines where React component static properties should be positioned.', category: 'Stylistic Issues', recommended: false, url: docsUrl('static-property-placement'), }, - fixable: null, // or 'code' or 'whitespace' messages, diff --git a/lib/rules/style-prop-object.js b/lib/rules/style-prop-object.js index 4d6684a6f1..71fd04aed2 100644 --- a/lib/rules/style-prop-object.js +++ b/lib/rules/style-prop-object.js @@ -20,6 +20,7 @@ const messages = { module.exports = { meta: { + type: 'problem', docs: { description: 'Enforce style prop value is an object', category: 'Possible Errors', diff --git a/lib/rules/void-dom-elements-no-children.js b/lib/rules/void-dom-elements-no-children.js index 70f38b3f6d..a5dbac9211 100644 --- a/lib/rules/void-dom-elements-no-children.js +++ b/lib/rules/void-dom-elements-no-children.js @@ -49,6 +49,7 @@ const noChildrenInVoidEl = 'Void DOM element <{{element}} /> cannot receive chil module.exports = { meta: { + type: 'problem', docs: { description: 'Prevent passing of children to void DOM elements (e.g. `
`).', category: 'Best Practices', diff --git a/lib/util/makeNoMethodSetStateRule.js b/lib/util/makeNoMethodSetStateRule.js index 800b2ca34d..8966eb73c7 100644 --- a/lib/util/makeNoMethodSetStateRule.js +++ b/lib/util/makeNoMethodSetStateRule.js @@ -32,6 +32,7 @@ const messages = { function makeNoMethodSetStateRule(methodName, shouldCheckUnsafeCb) { return { meta: { + type: 'suggestion', docs: { description: `Prevent usage of setState in ${methodName}`, category: 'Best Practices',