From fc7f404365e87fb6ee4f30149e486229cda4eb2e Mon Sep 17 00:00:00 2001 From: Patrick McElhaney Date: Fri, 5 Jan 2018 08:37:50 -0500 Subject: [PATCH] Docs: add url to each of the rules (refs #6582) (#9788) * Docs: add url to each of the rules (refs #6582) Code mod: export default function transformer(file, api) { const j = api.jscodeshift; const name = file.path.split('/').pop().replace(/.js$/, ''); return j(file.source) .find(j.ObjectExpression) .filter(path => path.parentPath.node.key && path.parentPath.node.key.name === 'docs') .forEach(path => { const prop = j.property('init', j.identifier('url'), j.literal(`https://eslint.org/docs/rules/${name}`)); j(path).replaceWith(j.objectExpression([...path.node.properties, prop])); }) .toSource({lineTerminator: '\n'}); } * New: internal-rules/consistent-docs-url (refs #6582) Add a lint rule to ensure that each rule has a meta.docs.url property with the correct value. --- lib/rules/.eslintrc.yml | 1 + lib/rules/accessor-pairs.js | 3 +- lib/rules/array-bracket-newline.js | 3 +- lib/rules/array-bracket-spacing.js | 3 +- lib/rules/array-callback-return.js | 3 +- lib/rules/array-element-newline.js | 3 +- lib/rules/arrow-body-style.js | 3 +- lib/rules/arrow-parens.js | 3 +- lib/rules/arrow-spacing.js | 3 +- lib/rules/block-scoped-var.js | 3 +- lib/rules/block-spacing.js | 3 +- lib/rules/brace-style.js | 3 +- lib/rules/callback-return.js | 3 +- lib/rules/camelcase.js | 3 +- lib/rules/capitalized-comments.js | 3 +- lib/rules/class-methods-use-this.js | 3 +- lib/rules/comma-dangle.js | 3 +- lib/rules/comma-spacing.js | 3 +- lib/rules/comma-style.js | 3 +- lib/rules/complexity.js | 3 +- lib/rules/computed-property-spacing.js | 3 +- lib/rules/consistent-return.js | 3 +- lib/rules/consistent-this.js | 3 +- lib/rules/constructor-super.js | 3 +- lib/rules/curly.js | 3 +- lib/rules/default-case.js | 3 +- lib/rules/dot-location.js | 3 +- lib/rules/dot-notation.js | 3 +- lib/rules/eol-last.js | 3 +- lib/rules/eqeqeq.js | 3 +- lib/rules/for-direction.js | 3 +- lib/rules/func-call-spacing.js | 3 +- lib/rules/func-name-matching.js | 3 +- lib/rules/func-names.js | 3 +- lib/rules/func-style.js | 3 +- lib/rules/function-paren-newline.js | 3 +- lib/rules/generator-star-spacing.js | 3 +- lib/rules/getter-return.js | 3 +- lib/rules/global-require.js | 3 +- lib/rules/guard-for-in.js | 3 +- lib/rules/handle-callback-err.js | 3 +- lib/rules/id-blacklist.js | 3 +- lib/rules/id-length.js | 3 +- lib/rules/id-match.js | 3 +- lib/rules/implicit-arrow-linebreak.js | 3 +- lib/rules/indent-legacy.js | 3 +- lib/rules/indent.js | 3 +- lib/rules/init-declarations.js | 3 +- lib/rules/jsx-quotes.js | 3 +- lib/rules/key-spacing.js | 3 +- lib/rules/keyword-spacing.js | 3 +- lib/rules/line-comment-position.js | 3 +- lib/rules/linebreak-style.js | 3 +- lib/rules/lines-around-comment.js | 3 +- lib/rules/lines-around-directive.js | 3 +- lib/rules/lines-between-class-members.js | 3 +- lib/rules/max-depth.js | 3 +- lib/rules/max-len.js | 3 +- lib/rules/max-lines.js | 3 +- lib/rules/max-nested-callbacks.js | 3 +- lib/rules/max-params.js | 3 +- lib/rules/max-statements-per-line.js | 3 +- lib/rules/max-statements.js | 3 +- lib/rules/multiline-comment-style.js | 3 +- lib/rules/multiline-ternary.js | 3 +- lib/rules/new-cap.js | 3 +- lib/rules/new-parens.js | 3 +- lib/rules/newline-after-var.js | 3 +- lib/rules/newline-before-return.js | 3 +- lib/rules/newline-per-chained-call.js | 3 +- lib/rules/no-alert.js | 3 +- lib/rules/no-array-constructor.js | 3 +- lib/rules/no-await-in-loop.js | 3 +- lib/rules/no-bitwise.js | 3 +- lib/rules/no-buffer-constructor.js | 3 +- lib/rules/no-caller.js | 3 +- lib/rules/no-case-declarations.js | 3 +- lib/rules/no-catch-shadow.js | 3 +- lib/rules/no-class-assign.js | 3 +- lib/rules/no-compare-neg-zero.js | 3 +- lib/rules/no-cond-assign.js | 3 +- lib/rules/no-confusing-arrow.js | 3 +- lib/rules/no-console.js | 3 +- lib/rules/no-const-assign.js | 3 +- lib/rules/no-constant-condition.js | 3 +- lib/rules/no-continue.js | 3 +- lib/rules/no-control-regex.js | 3 +- lib/rules/no-debugger.js | 3 +- lib/rules/no-delete-var.js | 3 +- lib/rules/no-div-regex.js | 3 +- lib/rules/no-dupe-args.js | 3 +- lib/rules/no-dupe-class-members.js | 3 +- lib/rules/no-dupe-keys.js | 3 +- lib/rules/no-duplicate-case.js | 3 +- lib/rules/no-duplicate-imports.js | 3 +- lib/rules/no-else-return.js | 3 +- lib/rules/no-empty-character-class.js | 3 +- lib/rules/no-empty-function.js | 3 +- lib/rules/no-empty-pattern.js | 3 +- lib/rules/no-empty.js | 3 +- lib/rules/no-eq-null.js | 3 +- lib/rules/no-eval.js | 3 +- lib/rules/no-ex-assign.js | 3 +- lib/rules/no-extend-native.js | 3 +- lib/rules/no-extra-bind.js | 3 +- lib/rules/no-extra-boolean-cast.js | 3 +- lib/rules/no-extra-label.js | 3 +- lib/rules/no-extra-parens.js | 3 +- lib/rules/no-extra-semi.js | 3 +- lib/rules/no-fallthrough.js | 3 +- lib/rules/no-floating-decimal.js | 3 +- lib/rules/no-func-assign.js | 3 +- lib/rules/no-global-assign.js | 3 +- lib/rules/no-implicit-coercion.js | 3 +- lib/rules/no-implicit-globals.js | 3 +- lib/rules/no-implied-eval.js | 3 +- lib/rules/no-inline-comments.js | 3 +- lib/rules/no-inner-declarations.js | 3 +- lib/rules/no-invalid-regexp.js | 3 +- lib/rules/no-invalid-this.js | 3 +- lib/rules/no-irregular-whitespace.js | 3 +- lib/rules/no-iterator.js | 3 +- lib/rules/no-label-var.js | 3 +- lib/rules/no-labels.js | 3 +- lib/rules/no-lone-blocks.js | 3 +- lib/rules/no-lonely-if.js | 3 +- lib/rules/no-loop-func.js | 3 +- lib/rules/no-magic-numbers.js | 3 +- lib/rules/no-mixed-operators.js | 3 +- lib/rules/no-mixed-requires.js | 3 +- lib/rules/no-mixed-spaces-and-tabs.js | 3 +- lib/rules/no-multi-assign.js | 3 +- lib/rules/no-multi-spaces.js | 3 +- lib/rules/no-multi-str.js | 3 +- lib/rules/no-multiple-empty-lines.js | 3 +- lib/rules/no-native-reassign.js | 3 +- lib/rules/no-negated-condition.js | 3 +- lib/rules/no-negated-in-lhs.js | 3 +- lib/rules/no-nested-ternary.js | 3 +- lib/rules/no-new-func.js | 3 +- lib/rules/no-new-object.js | 3 +- lib/rules/no-new-require.js | 3 +- lib/rules/no-new-symbol.js | 3 +- lib/rules/no-new-wrappers.js | 3 +- lib/rules/no-new.js | 3 +- lib/rules/no-obj-calls.js | 3 +- lib/rules/no-octal-escape.js | 3 +- lib/rules/no-octal.js | 3 +- lib/rules/no-param-reassign.js | 3 +- lib/rules/no-path-concat.js | 3 +- lib/rules/no-plusplus.js | 3 +- lib/rules/no-process-env.js | 3 +- lib/rules/no-process-exit.js | 3 +- lib/rules/no-proto.js | 3 +- lib/rules/no-prototype-builtins.js | 3 +- lib/rules/no-redeclare.js | 3 +- lib/rules/no-regex-spaces.js | 3 +- lib/rules/no-restricted-globals.js | 3 +- lib/rules/no-restricted-imports.js | 3 +- lib/rules/no-restricted-modules.js | 3 +- lib/rules/no-restricted-properties.js | 3 +- lib/rules/no-restricted-syntax.js | 3 +- lib/rules/no-return-assign.js | 3 +- lib/rules/no-return-await.js | 6 +- lib/rules/no-script-url.js | 3 +- lib/rules/no-self-assign.js | 3 +- lib/rules/no-self-compare.js | 3 +- lib/rules/no-sequences.js | 3 +- lib/rules/no-shadow-restricted-names.js | 3 +- lib/rules/no-shadow.js | 3 +- lib/rules/no-spaced-func.js | 3 +- lib/rules/no-sparse-arrays.js | 3 +- lib/rules/no-sync.js | 3 +- lib/rules/no-tabs.js | 3 +- lib/rules/no-template-curly-in-string.js | 3 +- lib/rules/no-ternary.js | 3 +- lib/rules/no-this-before-super.js | 3 +- lib/rules/no-throw-literal.js | 3 +- lib/rules/no-trailing-spaces.js | 3 +- lib/rules/no-undef-init.js | 3 +- lib/rules/no-undef.js | 3 +- lib/rules/no-undefined.js | 3 +- lib/rules/no-underscore-dangle.js | 3 +- lib/rules/no-unexpected-multiline.js | 3 +- lib/rules/no-unmodified-loop-condition.js | 3 +- lib/rules/no-unneeded-ternary.js | 3 +- lib/rules/no-unreachable.js | 3 +- lib/rules/no-unsafe-finally.js | 3 +- lib/rules/no-unsafe-negation.js | 3 +- lib/rules/no-unused-expressions.js | 3 +- lib/rules/no-unused-labels.js | 3 +- lib/rules/no-unused-vars.js | 3 +- lib/rules/no-use-before-define.js | 3 +- lib/rules/no-useless-call.js | 3 +- lib/rules/no-useless-computed-key.js | 3 +- lib/rules/no-useless-concat.js | 3 +- lib/rules/no-useless-constructor.js | 3 +- lib/rules/no-useless-escape.js | 3 +- lib/rules/no-useless-rename.js | 3 +- lib/rules/no-useless-return.js | 3 +- lib/rules/no-var.js | 3 +- lib/rules/no-void.js | 3 +- lib/rules/no-warning-comments.js | 3 +- lib/rules/no-whitespace-before-property.js | 3 +- lib/rules/no-with.js | 3 +- lib/rules/nonblock-statement-body-position.js | 3 +- lib/rules/object-curly-newline.js | 3 +- lib/rules/object-curly-spacing.js | 3 +- lib/rules/object-property-newline.js | 3 +- lib/rules/object-shorthand.js | 3 +- lib/rules/one-var-declaration-per-line.js | 3 +- lib/rules/one-var.js | 3 +- lib/rules/operator-assignment.js | 3 +- lib/rules/operator-linebreak.js | 3 +- lib/rules/padded-blocks.js | 3 +- lib/rules/padding-line-between-statements.js | 3 +- lib/rules/prefer-arrow-callback.js | 3 +- lib/rules/prefer-const.js | 3 +- lib/rules/prefer-destructuring.js | 3 +- lib/rules/prefer-numeric-literals.js | 3 +- lib/rules/prefer-promise-reject-errors.js | 3 +- lib/rules/prefer-reflect.js | 3 +- lib/rules/prefer-rest-params.js | 3 +- lib/rules/prefer-spread.js | 3 +- lib/rules/prefer-template.js | 3 +- lib/rules/quote-props.js | 3 +- lib/rules/quotes.js | 3 +- lib/rules/radix.js | 3 +- lib/rules/require-await.js | 3 +- lib/rules/require-jsdoc.js | 3 +- lib/rules/require-yield.js | 3 +- lib/rules/rest-spread-spacing.js | 3 +- lib/rules/semi-spacing.js | 3 +- lib/rules/semi-style.js | 3 +- lib/rules/semi.js | 3 +- lib/rules/sort-imports.js | 3 +- lib/rules/sort-keys.js | 3 +- lib/rules/sort-vars.js | 3 +- lib/rules/space-before-blocks.js | 3 +- lib/rules/space-before-function-paren.js | 3 +- lib/rules/space-in-parens.js | 3 +- lib/rules/space-infix-ops.js | 3 +- lib/rules/space-unary-ops.js | 3 +- lib/rules/spaced-comment.js | 3 +- lib/rules/strict.js | 3 +- lib/rules/switch-colon-spacing.js | 3 +- lib/rules/symbol-description.js | 3 +- lib/rules/template-curly-spacing.js | 3 +- lib/rules/template-tag-spacing.js | 3 +- lib/rules/unicode-bom.js | 3 +- lib/rules/use-isnan.js | 3 +- lib/rules/valid-jsdoc.js | 3 +- lib/rules/valid-typeof.js | 3 +- lib/rules/vars-on-top.js | 3 +- lib/rules/wrap-iife.js | 3 +- lib/rules/wrap-regex.js | 3 +- lib/rules/yield-star-spacing.js | 3 +- lib/rules/yoda.js | 3 +- .../internal-rules/consistent-docs-url.js | 84 +++++++++++++++ tools/internal-rules/.eslintrc.yml | 1 + .../consistent-docs-description.js | 2 +- tools/internal-rules/consistent-docs-url.js | 101 ++++++++++++++++++ tools/internal-rules/no-invalid-meta.js | 2 +- 263 files changed, 706 insertions(+), 259 deletions(-) create mode 100644 tests/tools/internal-rules/consistent-docs-url.js create mode 100644 tools/internal-rules/consistent-docs-url.js diff --git a/lib/rules/.eslintrc.yml b/lib/rules/.eslintrc.yml index 2a8d907935b..64b3cee7f01 100644 --- a/lib/rules/.eslintrc.yml +++ b/lib/rules/.eslintrc.yml @@ -1,3 +1,4 @@ rules: rulesdir/no-invalid-meta: "error" rulesdir/consistent-docs-description: "error" + rulesdir/consistent-docs-url: "error" diff --git a/lib/rules/accessor-pairs.js b/lib/rules/accessor-pairs.js index 4afdc7136ca..b01b29b1763 100644 --- a/lib/rules/accessor-pairs.js +++ b/lib/rules/accessor-pairs.js @@ -75,7 +75,8 @@ module.exports = { docs: { description: "enforce getter and setter pairs in objects", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/accessor-pairs" }, schema: [{ type: "object", diff --git a/lib/rules/array-bracket-newline.js b/lib/rules/array-bracket-newline.js index cb7350a8250..b939d65b3f1 100644 --- a/lib/rules/array-bracket-newline.js +++ b/lib/rules/array-bracket-newline.js @@ -16,7 +16,8 @@ module.exports = { docs: { description: "enforce linebreaks after opening and before closing array brackets", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/array-bracket-newline" }, fixable: "whitespace", schema: [ diff --git a/lib/rules/array-bracket-spacing.js b/lib/rules/array-bracket-spacing.js index aecef2c4f20..933458a42a1 100644 --- a/lib/rules/array-bracket-spacing.js +++ b/lib/rules/array-bracket-spacing.js @@ -15,7 +15,8 @@ module.exports = { docs: { description: "enforce consistent spacing inside array brackets", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/array-bracket-spacing" }, fixable: "whitespace", schema: [ diff --git a/lib/rules/array-callback-return.js b/lib/rules/array-callback-return.js index 27d9c5680d0..69655481d80 100644 --- a/lib/rules/array-callback-return.js +++ b/lib/rules/array-callback-return.js @@ -142,7 +142,8 @@ module.exports = { docs: { description: "enforce `return` statements in callbacks of array methods", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/array-callback-return" }, schema: [ diff --git a/lib/rules/array-element-newline.js b/lib/rules/array-element-newline.js index 26dc9bfa0b6..22352c7e33d 100644 --- a/lib/rules/array-element-newline.js +++ b/lib/rules/array-element-newline.js @@ -16,7 +16,8 @@ module.exports = { docs: { description: "enforce line breaks after each array element", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/array-element-newline" }, fixable: "whitespace", schema: [ diff --git a/lib/rules/arrow-body-style.js b/lib/rules/arrow-body-style.js index 54e4e8d00ad..afbf46fd545 100644 --- a/lib/rules/arrow-body-style.js +++ b/lib/rules/arrow-body-style.js @@ -19,7 +19,8 @@ module.exports = { docs: { description: "require braces around arrow function bodies", category: "ECMAScript 6", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/arrow-body-style" }, schema: { diff --git a/lib/rules/arrow-parens.js b/lib/rules/arrow-parens.js index e8f8ddd8e76..5a0fd61b348 100644 --- a/lib/rules/arrow-parens.js +++ b/lib/rules/arrow-parens.js @@ -19,7 +19,8 @@ module.exports = { docs: { description: "require parentheses around arrow function arguments", category: "ECMAScript 6", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/arrow-parens" }, fixable: "code", diff --git a/lib/rules/arrow-spacing.js b/lib/rules/arrow-spacing.js index 37e03907cb9..d2c5b9b77bf 100644 --- a/lib/rules/arrow-spacing.js +++ b/lib/rules/arrow-spacing.js @@ -19,7 +19,8 @@ module.exports = { docs: { description: "enforce consistent spacing before and after the arrow in arrow functions", category: "ECMAScript 6", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/arrow-spacing" }, fixable: "whitespace", diff --git a/lib/rules/block-scoped-var.js b/lib/rules/block-scoped-var.js index 0b4d855fae5..58cef1741a8 100644 --- a/lib/rules/block-scoped-var.js +++ b/lib/rules/block-scoped-var.js @@ -13,7 +13,8 @@ module.exports = { docs: { description: "enforce the use of variables within the scope they are defined", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/block-scoped-var" }, schema: [] diff --git a/lib/rules/block-spacing.js b/lib/rules/block-spacing.js index b3ea8405e24..4fbf6d4c0bf 100644 --- a/lib/rules/block-spacing.js +++ b/lib/rules/block-spacing.js @@ -16,7 +16,8 @@ module.exports = { docs: { description: "disallow or enforce spaces inside of blocks after opening block and before closing block", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/block-spacing" }, fixable: "whitespace", diff --git a/lib/rules/brace-style.js b/lib/rules/brace-style.js index 320da9dac91..bc0ddbd78f2 100644 --- a/lib/rules/brace-style.js +++ b/lib/rules/brace-style.js @@ -16,7 +16,8 @@ module.exports = { docs: { description: "enforce consistent brace style for blocks", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/brace-style" }, schema: [ diff --git a/lib/rules/callback-return.js b/lib/rules/callback-return.js index 0fa7f278a18..ed85c7181a9 100644 --- a/lib/rules/callback-return.js +++ b/lib/rules/callback-return.js @@ -13,7 +13,8 @@ module.exports = { docs: { description: "require `return` statements after callbacks", category: "Node.js and CommonJS", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/callback-return" }, schema: [{ diff --git a/lib/rules/camelcase.js b/lib/rules/camelcase.js index e3b764f7c24..86822f97529 100644 --- a/lib/rules/camelcase.js +++ b/lib/rules/camelcase.js @@ -14,7 +14,8 @@ module.exports = { docs: { description: "enforce camelcase naming convention", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/camelcase" }, schema: [ diff --git a/lib/rules/capitalized-comments.js b/lib/rules/capitalized-comments.js index 1a276080673..19b5f6a7175 100644 --- a/lib/rules/capitalized-comments.js +++ b/lib/rules/capitalized-comments.js @@ -113,7 +113,8 @@ module.exports = { docs: { description: "enforce or disallow capitalization of the first letter of a comment", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/capitalized-comments" }, fixable: "code", schema: [ diff --git a/lib/rules/class-methods-use-this.js b/lib/rules/class-methods-use-this.js index d429c579b94..774086780ae 100644 --- a/lib/rules/class-methods-use-this.js +++ b/lib/rules/class-methods-use-this.js @@ -14,7 +14,8 @@ module.exports = { docs: { description: "enforce that class methods utilize `this`", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/class-methods-use-this" }, schema: [{ type: "object", diff --git a/lib/rules/comma-dangle.js b/lib/rules/comma-dangle.js index ddcc0cd229e..180979d4032 100644 --- a/lib/rules/comma-dangle.js +++ b/lib/rules/comma-dangle.js @@ -79,7 +79,8 @@ module.exports = { docs: { description: "require or disallow trailing commas", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/comma-dangle" }, fixable: "code", schema: { diff --git a/lib/rules/comma-spacing.js b/lib/rules/comma-spacing.js index 25a0e7d82c8..dd3de7f3543 100644 --- a/lib/rules/comma-spacing.js +++ b/lib/rules/comma-spacing.js @@ -15,7 +15,8 @@ module.exports = { docs: { description: "enforce consistent spacing before and after commas", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/comma-spacing" }, fixable: "whitespace", diff --git a/lib/rules/comma-style.js b/lib/rules/comma-style.js index 4c65338a444..8b96e5e25a3 100644 --- a/lib/rules/comma-style.js +++ b/lib/rules/comma-style.js @@ -16,7 +16,8 @@ module.exports = { docs: { description: "enforce consistent comma style", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/comma-style" }, fixable: "code", schema: [ diff --git a/lib/rules/complexity.js b/lib/rules/complexity.js index 323fdbff8ea..1838d4bf8ed 100644 --- a/lib/rules/complexity.js +++ b/lib/rules/complexity.js @@ -23,7 +23,8 @@ module.exports = { docs: { description: "enforce a maximum cyclomatic complexity allowed in a program", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/complexity" }, schema: [ diff --git a/lib/rules/computed-property-spacing.js b/lib/rules/computed-property-spacing.js index 19c28fd22e1..57408afb453 100644 --- a/lib/rules/computed-property-spacing.js +++ b/lib/rules/computed-property-spacing.js @@ -15,7 +15,8 @@ module.exports = { docs: { description: "enforce consistent spacing inside computed property brackets", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/computed-property-spacing" }, fixable: "whitespace", diff --git a/lib/rules/consistent-return.js b/lib/rules/consistent-return.js index a42faaa1ed6..a436dd1fc0c 100644 --- a/lib/rules/consistent-return.js +++ b/lib/rules/consistent-return.js @@ -56,7 +56,8 @@ module.exports = { docs: { description: "require `return` statements to either always or never specify values", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/consistent-return" }, schema: [{ diff --git a/lib/rules/consistent-this.js b/lib/rules/consistent-this.js index 151cdcf9c9c..60690007f2d 100644 --- a/lib/rules/consistent-this.js +++ b/lib/rules/consistent-this.js @@ -13,7 +13,8 @@ module.exports = { docs: { description: "enforce consistent naming when capturing the current execution context", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/consistent-this" }, schema: { diff --git a/lib/rules/constructor-super.js b/lib/rules/constructor-super.js index d0a238df8ed..30637472f19 100644 --- a/lib/rules/constructor-super.js +++ b/lib/rules/constructor-super.js @@ -95,7 +95,8 @@ module.exports = { docs: { description: "require `super()` calls in constructors", category: "ECMAScript 6", - recommended: true + recommended: true, + url: "https://eslint.org/docs/rules/constructor-super" }, schema: [] diff --git a/lib/rules/curly.js b/lib/rules/curly.js index 37f07d95eec..7fdf57eda17 100644 --- a/lib/rules/curly.js +++ b/lib/rules/curly.js @@ -19,7 +19,8 @@ module.exports = { docs: { description: "enforce consistent brace style for all control statements", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/curly" }, schema: { diff --git a/lib/rules/default-case.js b/lib/rules/default-case.js index 32cd8dfe492..a66300a99b5 100644 --- a/lib/rules/default-case.js +++ b/lib/rules/default-case.js @@ -15,7 +15,8 @@ module.exports = { docs: { description: "require `default` cases in `switch` statements", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/default-case" }, schema: [{ diff --git a/lib/rules/dot-location.js b/lib/rules/dot-location.js index 60f4af7013a..c02476e0354 100644 --- a/lib/rules/dot-location.js +++ b/lib/rules/dot-location.js @@ -16,7 +16,8 @@ module.exports = { docs: { description: "enforce consistent newlines before and after dots", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/dot-location" }, schema: [ diff --git a/lib/rules/dot-notation.js b/lib/rules/dot-notation.js index 21e3df17412..10c73b41f04 100644 --- a/lib/rules/dot-notation.js +++ b/lib/rules/dot-notation.js @@ -22,7 +22,8 @@ module.exports = { docs: { description: "enforce dot notation whenever possible", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/dot-notation" }, schema: [ diff --git a/lib/rules/eol-last.js b/lib/rules/eol-last.js index 3933bc3469b..f96352676c7 100644 --- a/lib/rules/eol-last.js +++ b/lib/rules/eol-last.js @@ -19,7 +19,8 @@ module.exports = { docs: { description: "require or disallow newline at the end of files", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/eol-last" }, fixable: "whitespace", schema: [ diff --git a/lib/rules/eqeqeq.js b/lib/rules/eqeqeq.js index 8801102e649..fc65450af4b 100644 --- a/lib/rules/eqeqeq.js +++ b/lib/rules/eqeqeq.js @@ -20,7 +20,8 @@ module.exports = { docs: { description: "require the use of `===` and `!==`", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/eqeqeq" }, schema: { diff --git a/lib/rules/for-direction.js b/lib/rules/for-direction.js index 7178ced9db0..c91888da229 100644 --- a/lib/rules/for-direction.js +++ b/lib/rules/for-direction.js @@ -14,7 +14,8 @@ module.exports = { docs: { description: "enforce \"for\" loop update clause moving the counter in the right direction.", category: "Possible Errors", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/for-direction" }, fixable: null, schema: [] diff --git a/lib/rules/func-call-spacing.js b/lib/rules/func-call-spacing.js index 00e677d33b0..b13613cf809 100644 --- a/lib/rules/func-call-spacing.js +++ b/lib/rules/func-call-spacing.js @@ -20,7 +20,8 @@ module.exports = { docs: { description: "require or disallow spacing between function identifiers and their invocations", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/func-call-spacing" }, fixable: "whitespace", diff --git a/lib/rules/func-name-matching.js b/lib/rules/func-name-matching.js index db06d5d468d..85fd7d4f1ee 100644 --- a/lib/rules/func-name-matching.js +++ b/lib/rules/func-name-matching.js @@ -70,7 +70,8 @@ module.exports = { docs: { description: "require function names to match the name of the variable or property to which they are assigned", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/func-name-matching" }, schema: { diff --git a/lib/rules/func-names.js b/lib/rules/func-names.js index 848ce975741..722f276c1d2 100644 --- a/lib/rules/func-names.js +++ b/lib/rules/func-names.js @@ -29,7 +29,8 @@ module.exports = { docs: { description: "require or disallow named `function` expressions", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/func-names" }, schema: [ diff --git a/lib/rules/func-style.js b/lib/rules/func-style.js index 123eae3d8a4..ea6d74fb3a4 100644 --- a/lib/rules/func-style.js +++ b/lib/rules/func-style.js @@ -13,7 +13,8 @@ module.exports = { docs: { description: "enforce the consistent use of either `function` declarations or expressions", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/func-style" }, schema: [ diff --git a/lib/rules/function-paren-newline.js b/lib/rules/function-paren-newline.js index 10ad960a4d3..7e4f2792cff 100644 --- a/lib/rules/function-paren-newline.js +++ b/lib/rules/function-paren-newline.js @@ -19,7 +19,8 @@ module.exports = { docs: { description: "enforce consistent line breaks inside function parentheses", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/function-paren-newline" }, fixable: "whitespace", schema: [ diff --git a/lib/rules/generator-star-spacing.js b/lib/rules/generator-star-spacing.js index a718b59afcf..282b37510b1 100644 --- a/lib/rules/generator-star-spacing.js +++ b/lib/rules/generator-star-spacing.js @@ -30,7 +30,8 @@ module.exports = { docs: { description: "enforce consistent spacing around `*` operators in generator functions", category: "ECMAScript 6", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/generator-star-spacing" }, fixable: "whitespace", diff --git a/lib/rules/getter-return.js b/lib/rules/getter-return.js index 6eb1efc00c4..58f2a3978b8 100644 --- a/lib/rules/getter-return.js +++ b/lib/rules/getter-return.js @@ -47,7 +47,8 @@ module.exports = { docs: { description: "enforce `return` statements in getters", category: "Possible Errors", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/getter-return" }, fixable: null, schema: [ diff --git a/lib/rules/global-require.js b/lib/rules/global-require.js index beda8d99f1b..a5f5335d01d 100644 --- a/lib/rules/global-require.js +++ b/lib/rules/global-require.js @@ -51,7 +51,8 @@ module.exports = { docs: { description: "require `require()` calls to be placed at top-level module scope", category: "Node.js and CommonJS", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/global-require" }, schema: [] diff --git a/lib/rules/guard-for-in.js b/lib/rules/guard-for-in.js index 754830f6a64..88a9106b3fb 100644 --- a/lib/rules/guard-for-in.js +++ b/lib/rules/guard-for-in.js @@ -14,7 +14,8 @@ module.exports = { docs: { description: "require `for-in` loops to include an `if` statement", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/guard-for-in" }, schema: [] diff --git a/lib/rules/handle-callback-err.js b/lib/rules/handle-callback-err.js index de36a0c1b00..f6e6c108ce1 100644 --- a/lib/rules/handle-callback-err.js +++ b/lib/rules/handle-callback-err.js @@ -14,7 +14,8 @@ module.exports = { docs: { description: "require error handling in callbacks", category: "Node.js and CommonJS", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/handle-callback-err" }, schema: [ diff --git a/lib/rules/id-blacklist.js b/lib/rules/id-blacklist.js index ee28c0b5a81..ba9b5d4b398 100644 --- a/lib/rules/id-blacklist.js +++ b/lib/rules/id-blacklist.js @@ -15,7 +15,8 @@ module.exports = { docs: { description: "disallow specified identifiers", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/id-blacklist" }, schema: { diff --git a/lib/rules/id-length.js b/lib/rules/id-length.js index dad9c406493..eaed26217dd 100644 --- a/lib/rules/id-length.js +++ b/lib/rules/id-length.js @@ -15,7 +15,8 @@ module.exports = { docs: { description: "enforce minimum and maximum identifier lengths", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/id-length" }, schema: [ diff --git a/lib/rules/id-match.js b/lib/rules/id-match.js index 0420fdc74e4..608ef17d114 100644 --- a/lib/rules/id-match.js +++ b/lib/rules/id-match.js @@ -14,7 +14,8 @@ module.exports = { docs: { description: "require identifiers to match a specified regular expression", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/id-match" }, schema: [ diff --git a/lib/rules/implicit-arrow-linebreak.js b/lib/rules/implicit-arrow-linebreak.js index b8802f4de53..a7ad1122b50 100644 --- a/lib/rules/implicit-arrow-linebreak.js +++ b/lib/rules/implicit-arrow-linebreak.js @@ -12,7 +12,8 @@ module.exports = { docs: { description: "enforce the location of arrow function bodies", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/implicit-arrow-linebreak" }, fixable: "whitespace", schema: [ diff --git a/lib/rules/indent-legacy.js b/lib/rules/indent-legacy.js index cf914068062..701cf016324 100644 --- a/lib/rules/indent-legacy.js +++ b/lib/rules/indent-legacy.js @@ -25,7 +25,8 @@ module.exports = { description: "enforce consistent indentation", category: "Stylistic Issues", recommended: false, - replacedBy: ["indent"] + replacedBy: ["indent"], + url: "https://eslint.org/docs/rules/indent-legacy" }, deprecated: true, diff --git a/lib/rules/indent.js b/lib/rules/indent.js index 511ee07c01b..2159880f88d 100644 --- a/lib/rules/indent.js +++ b/lib/rules/indent.js @@ -492,7 +492,8 @@ module.exports = { docs: { description: "enforce consistent indentation", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/indent" }, fixable: "whitespace", diff --git a/lib/rules/init-declarations.js b/lib/rules/init-declarations.js index 1f53f3dfc48..412b96dc0ab 100644 --- a/lib/rules/init-declarations.js +++ b/lib/rules/init-declarations.js @@ -47,7 +47,8 @@ module.exports = { docs: { description: "require or disallow initialization in variable declarations", category: "Variables", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/init-declarations" }, schema: { diff --git a/lib/rules/jsx-quotes.js b/lib/rules/jsx-quotes.js index 5653922d949..54ec481a80d 100644 --- a/lib/rules/jsx-quotes.js +++ b/lib/rules/jsx-quotes.js @@ -41,7 +41,8 @@ module.exports = { docs: { description: "enforce the consistent use of either double or single quotes in JSX attributes", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/jsx-quotes" }, fixable: "whitespace", diff --git a/lib/rules/key-spacing.js b/lib/rules/key-spacing.js index 1c62ad42892..1ae4990a594 100644 --- a/lib/rules/key-spacing.js +++ b/lib/rules/key-spacing.js @@ -131,7 +131,8 @@ module.exports = { docs: { description: "enforce consistent spacing between keys and values in object literal properties", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/key-spacing" }, fixable: "whitespace", diff --git a/lib/rules/keyword-spacing.js b/lib/rules/keyword-spacing.js index 218cfd02be6..d0dd640255b 100644 --- a/lib/rules/keyword-spacing.js +++ b/lib/rules/keyword-spacing.js @@ -68,7 +68,8 @@ module.exports = { docs: { description: "enforce consistent spacing before and after keywords", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/keyword-spacing" }, fixable: "whitespace", diff --git a/lib/rules/line-comment-position.js b/lib/rules/line-comment-position.js index 0df806cca8c..ebdb024f6e4 100644 --- a/lib/rules/line-comment-position.js +++ b/lib/rules/line-comment-position.js @@ -15,7 +15,8 @@ module.exports = { docs: { description: "enforce position of line comments", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/line-comment-position" }, schema: [ diff --git a/lib/rules/linebreak-style.js b/lib/rules/linebreak-style.js index 907bc02ec4c..d5a170f7308 100644 --- a/lib/rules/linebreak-style.js +++ b/lib/rules/linebreak-style.js @@ -20,7 +20,8 @@ module.exports = { docs: { description: "enforce consistent linebreak style", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/linebreak-style" }, fixable: "whitespace", diff --git a/lib/rules/lines-around-comment.js b/lib/rules/lines-around-comment.js index 3df9cb86f4f..5d98473be1c 100644 --- a/lib/rules/lines-around-comment.js +++ b/lib/rules/lines-around-comment.js @@ -55,7 +55,8 @@ module.exports = { docs: { description: "require empty lines around comments", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/lines-around-comment" }, fixable: "whitespace", diff --git a/lib/rules/lines-around-directive.js b/lib/rules/lines-around-directive.js index b560009f714..3ba3ab5bb33 100644 --- a/lib/rules/lines-around-directive.js +++ b/lib/rules/lines-around-directive.js @@ -18,7 +18,8 @@ module.exports = { description: "require or disallow newlines around directives", category: "Stylistic Issues", recommended: false, - replacedBy: ["padding-line-between-statements"] + replacedBy: ["padding-line-between-statements"], + url: "https://eslint.org/docs/rules/lines-around-directive" }, schema: [{ oneOf: [ diff --git a/lib/rules/lines-between-class-members.js b/lib/rules/lines-between-class-members.js index ab87f5e84f3..252984da5ad 100644 --- a/lib/rules/lines-between-class-members.js +++ b/lib/rules/lines-between-class-members.js @@ -15,7 +15,8 @@ module.exports = { docs: { description: "require or disallow an empty line between class members", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/lines-between-class-members" }, fixable: "whitespace", diff --git a/lib/rules/max-depth.js b/lib/rules/max-depth.js index 74c13ffa9fa..ead44b90cba 100644 --- a/lib/rules/max-depth.js +++ b/lib/rules/max-depth.js @@ -14,7 +14,8 @@ module.exports = { docs: { description: "enforce a maximum depth that blocks can be nested", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/max-depth" }, schema: [ diff --git a/lib/rules/max-len.js b/lib/rules/max-len.js index 27d549c9c56..35ac803b65e 100644 --- a/lib/rules/max-len.js +++ b/lib/rules/max-len.js @@ -68,7 +68,8 @@ module.exports = { docs: { description: "enforce a maximum line length", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/max-len" }, schema: [ diff --git a/lib/rules/max-lines.js b/lib/rules/max-lines.js index 297c75dc138..9bb4420edc0 100644 --- a/lib/rules/max-lines.js +++ b/lib/rules/max-lines.js @@ -20,7 +20,8 @@ module.exports = { docs: { description: "enforce a maximum number of lines per file", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/max-lines" }, schema: [ diff --git a/lib/rules/max-nested-callbacks.js b/lib/rules/max-nested-callbacks.js index a89f49ae020..7d7386ec1ea 100644 --- a/lib/rules/max-nested-callbacks.js +++ b/lib/rules/max-nested-callbacks.js @@ -14,7 +14,8 @@ module.exports = { docs: { description: "enforce a maximum depth that callbacks can be nested", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/max-nested-callbacks" }, schema: [ diff --git a/lib/rules/max-params.js b/lib/rules/max-params.js index 85838adaccb..d7c22c52741 100644 --- a/lib/rules/max-params.js +++ b/lib/rules/max-params.js @@ -22,7 +22,8 @@ module.exports = { docs: { description: "enforce a maximum number of parameters in function definitions", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/max-params" }, schema: [ diff --git a/lib/rules/max-statements-per-line.js b/lib/rules/max-statements-per-line.js index 3d18da4ee10..a6776bdea99 100644 --- a/lib/rules/max-statements-per-line.js +++ b/lib/rules/max-statements-per-line.js @@ -19,7 +19,8 @@ module.exports = { docs: { description: "enforce a maximum number of statements allowed per line", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/max-statements-per-line" }, schema: [ diff --git a/lib/rules/max-statements.js b/lib/rules/max-statements.js index f98aa3a21d9..faa0d5d8445 100644 --- a/lib/rules/max-statements.js +++ b/lib/rules/max-statements.js @@ -22,7 +22,8 @@ module.exports = { docs: { description: "enforce a maximum number of statements allowed in function blocks", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/max-statements" }, schema: [ diff --git a/lib/rules/multiline-comment-style.js b/lib/rules/multiline-comment-style.js index db4f7684437..4da9a619fce 100644 --- a/lib/rules/multiline-comment-style.js +++ b/lib/rules/multiline-comment-style.js @@ -15,7 +15,8 @@ module.exports = { docs: { description: "enforce a particular style for multiline comments", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/multiline-comment-style" }, fixable: "whitespace", schema: [{ enum: ["starred-block", "separate-lines", "bare-block"] }] diff --git a/lib/rules/multiline-ternary.js b/lib/rules/multiline-ternary.js index a74f241d86c..10cf269fb18 100644 --- a/lib/rules/multiline-ternary.js +++ b/lib/rules/multiline-ternary.js @@ -16,7 +16,8 @@ module.exports = { docs: { description: "enforce newlines between operands of ternary expressions", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/multiline-ternary" }, schema: [ { diff --git a/lib/rules/new-cap.js b/lib/rules/new-cap.js index f01e8f90ac3..cc33e3b8175 100644 --- a/lib/rules/new-cap.js +++ b/lib/rules/new-cap.js @@ -77,7 +77,8 @@ module.exports = { docs: { description: "require constructor names to begin with a capital letter", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/new-cap" }, schema: [ diff --git a/lib/rules/new-parens.js b/lib/rules/new-parens.js index aa0f7fe931d..abf2e032b77 100644 --- a/lib/rules/new-parens.js +++ b/lib/rules/new-parens.js @@ -24,7 +24,8 @@ module.exports = { docs: { description: "require parentheses when invoking a constructor with no arguments", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/new-parens" }, schema: [], diff --git a/lib/rules/newline-after-var.js b/lib/rules/newline-after-var.js index 80f73c836fa..b11d9d9952e 100644 --- a/lib/rules/newline-after-var.js +++ b/lib/rules/newline-after-var.js @@ -22,7 +22,8 @@ module.exports = { description: "require or disallow an empty line after variable declarations", category: "Stylistic Issues", recommended: false, - replacedBy: ["padding-line-between-statements"] + replacedBy: ["padding-line-between-statements"], + url: "https://eslint.org/docs/rules/newline-after-var" }, schema: [ diff --git a/lib/rules/newline-before-return.js b/lib/rules/newline-before-return.js index 02bd66db137..5bc1f7031b0 100644 --- a/lib/rules/newline-before-return.js +++ b/lib/rules/newline-before-return.js @@ -15,7 +15,8 @@ module.exports = { description: "require an empty line before `return` statements", category: "Stylistic Issues", recommended: false, - replacedBy: ["padding-line-between-statements"] + replacedBy: ["padding-line-between-statements"], + url: "https://eslint.org/docs/rules/newline-before-return" }, fixable: "whitespace", schema: [], diff --git a/lib/rules/newline-per-chained-call.js b/lib/rules/newline-per-chained-call.js index 356c4baf327..9691da44e01 100644 --- a/lib/rules/newline-per-chained-call.js +++ b/lib/rules/newline-per-chained-call.js @@ -17,7 +17,8 @@ module.exports = { docs: { description: "require a newline after each call in a method chain", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/newline-per-chained-call" }, fixable: "whitespace", schema: [{ diff --git a/lib/rules/no-alert.js b/lib/rules/no-alert.js index bc1087253bf..b4fd2312150 100644 --- a/lib/rules/no-alert.js +++ b/lib/rules/no-alert.js @@ -88,7 +88,8 @@ module.exports = { docs: { description: "disallow the use of `alert`, `confirm`, and `prompt`", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-alert" }, schema: [] diff --git a/lib/rules/no-array-constructor.js b/lib/rules/no-array-constructor.js index 70dc8b4cd5d..187389fdff3 100644 --- a/lib/rules/no-array-constructor.js +++ b/lib/rules/no-array-constructor.js @@ -14,7 +14,8 @@ module.exports = { docs: { description: "disallow `Array` constructors", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-array-constructor" }, schema: [] diff --git a/lib/rules/no-await-in-loop.js b/lib/rules/no-await-in-loop.js index d1ed92b704c..7d4f8a0a6ba 100644 --- a/lib/rules/no-await-in-loop.js +++ b/lib/rules/no-await-in-loop.js @@ -28,7 +28,8 @@ module.exports = { docs: { description: "disallow `await` inside of loops", category: "Possible Errors", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-await-in-loop" }, schema: [] }, diff --git a/lib/rules/no-bitwise.js b/lib/rules/no-bitwise.js index f062ad26699..8376674f65f 100644 --- a/lib/rules/no-bitwise.js +++ b/lib/rules/no-bitwise.js @@ -25,7 +25,8 @@ module.exports = { docs: { description: "disallow bitwise operators", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-bitwise" }, schema: [ diff --git a/lib/rules/no-buffer-constructor.js b/lib/rules/no-buffer-constructor.js index 1521ff2847e..55f181ee697 100644 --- a/lib/rules/no-buffer-constructor.js +++ b/lib/rules/no-buffer-constructor.js @@ -13,7 +13,8 @@ module.exports = { docs: { description: "disallow use of the Buffer() constructor", category: "Node.js and CommonJS", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-buffer-constructor" }, schema: [] }, diff --git a/lib/rules/no-caller.js b/lib/rules/no-caller.js index 55a37b7d864..df10bf3736b 100644 --- a/lib/rules/no-caller.js +++ b/lib/rules/no-caller.js @@ -14,7 +14,8 @@ module.exports = { docs: { description: "disallow the use of `arguments.caller` or `arguments.callee`", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-caller" }, schema: [] diff --git a/lib/rules/no-case-declarations.js b/lib/rules/no-case-declarations.js index e801c6bb6e0..03c730ddbdb 100644 --- a/lib/rules/no-case-declarations.js +++ b/lib/rules/no-case-declarations.js @@ -13,7 +13,8 @@ module.exports = { docs: { description: "disallow lexical declarations in case clauses", category: "Best Practices", - recommended: true + recommended: true, + url: "https://eslint.org/docs/rules/no-case-declarations" }, schema: [] diff --git a/lib/rules/no-catch-shadow.js b/lib/rules/no-catch-shadow.js index bef61902e90..69a4e6aff85 100644 --- a/lib/rules/no-catch-shadow.js +++ b/lib/rules/no-catch-shadow.js @@ -20,7 +20,8 @@ module.exports = { docs: { description: "disallow `catch` clause parameters from shadowing variables in the outer scope", category: "Variables", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-catch-shadow" }, schema: [] diff --git a/lib/rules/no-class-assign.js b/lib/rules/no-class-assign.js index 4b0443abc72..56e75122a25 100644 --- a/lib/rules/no-class-assign.js +++ b/lib/rules/no-class-assign.js @@ -16,7 +16,8 @@ module.exports = { docs: { description: "disallow reassigning class members", category: "ECMAScript 6", - recommended: true + recommended: true, + url: "https://eslint.org/docs/rules/no-class-assign" }, schema: [] diff --git a/lib/rules/no-compare-neg-zero.js b/lib/rules/no-compare-neg-zero.js index 604e2219199..09cf2950630 100644 --- a/lib/rules/no-compare-neg-zero.js +++ b/lib/rules/no-compare-neg-zero.js @@ -13,7 +13,8 @@ module.exports = { docs: { description: "disallow comparing against -0", category: "Possible Errors", - recommended: true + recommended: true, + url: "https://eslint.org/docs/rules/no-compare-neg-zero" }, fixable: null, schema: [] diff --git a/lib/rules/no-cond-assign.js b/lib/rules/no-cond-assign.js index 7c031c13f06..e761be14ecd 100644 --- a/lib/rules/no-cond-assign.js +++ b/lib/rules/no-cond-assign.js @@ -22,7 +22,8 @@ module.exports = { docs: { description: "disallow assignment operators in conditional expressions", category: "Possible Errors", - recommended: true + recommended: true, + url: "https://eslint.org/docs/rules/no-cond-assign" }, schema: [ diff --git a/lib/rules/no-confusing-arrow.js b/lib/rules/no-confusing-arrow.js index fc69ca39a9e..542a4060e27 100644 --- a/lib/rules/no-confusing-arrow.js +++ b/lib/rules/no-confusing-arrow.js @@ -30,7 +30,8 @@ module.exports = { docs: { description: "disallow arrow functions where they could be confused with comparisons", category: "ECMAScript 6", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-confusing-arrow" }, fixable: "code", diff --git a/lib/rules/no-console.js b/lib/rules/no-console.js index f5a3a235e6b..b00582ebada 100644 --- a/lib/rules/no-console.js +++ b/lib/rules/no-console.js @@ -20,7 +20,8 @@ module.exports = { docs: { description: "disallow the use of `console`", category: "Possible Errors", - recommended: true + recommended: true, + url: "https://eslint.org/docs/rules/no-console" }, schema: [ diff --git a/lib/rules/no-const-assign.js b/lib/rules/no-const-assign.js index db1848a9819..8a08a52df4e 100644 --- a/lib/rules/no-const-assign.js +++ b/lib/rules/no-const-assign.js @@ -16,7 +16,8 @@ module.exports = { docs: { description: "disallow reassigning `const` variables", category: "ECMAScript 6", - recommended: true + recommended: true, + url: "https://eslint.org/docs/rules/no-const-assign" }, schema: [] diff --git a/lib/rules/no-constant-condition.js b/lib/rules/no-constant-condition.js index 0cd445dfdba..5611d617ec8 100644 --- a/lib/rules/no-constant-condition.js +++ b/lib/rules/no-constant-condition.js @@ -14,7 +14,8 @@ module.exports = { docs: { description: "disallow constant expressions in conditions", category: "Possible Errors", - recommended: true + recommended: true, + url: "https://eslint.org/docs/rules/no-constant-condition" }, schema: [ diff --git a/lib/rules/no-continue.js b/lib/rules/no-continue.js index 2615fba13e2..52061ef5328 100644 --- a/lib/rules/no-continue.js +++ b/lib/rules/no-continue.js @@ -14,7 +14,8 @@ module.exports = { docs: { description: "disallow `continue` statements", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-continue" }, schema: [] diff --git a/lib/rules/no-control-regex.js b/lib/rules/no-control-regex.js index 14981f4ab13..676c666128e 100644 --- a/lib/rules/no-control-regex.js +++ b/lib/rules/no-control-regex.js @@ -14,7 +14,8 @@ module.exports = { docs: { description: "disallow control characters in regular expressions", category: "Possible Errors", - recommended: true + recommended: true, + url: "https://eslint.org/docs/rules/no-control-regex" }, schema: [] diff --git a/lib/rules/no-debugger.js b/lib/rules/no-debugger.js index d79cb181667..7d816e3a000 100644 --- a/lib/rules/no-debugger.js +++ b/lib/rules/no-debugger.js @@ -16,7 +16,8 @@ module.exports = { docs: { description: "disallow the use of `debugger`", category: "Possible Errors", - recommended: true + recommended: true, + url: "https://eslint.org/docs/rules/no-debugger" }, fixable: "code", schema: [] diff --git a/lib/rules/no-delete-var.js b/lib/rules/no-delete-var.js index adc1b5bb9c2..9ca09f1deae 100644 --- a/lib/rules/no-delete-var.js +++ b/lib/rules/no-delete-var.js @@ -14,7 +14,8 @@ module.exports = { docs: { description: "disallow deleting variables", category: "Variables", - recommended: true + recommended: true, + url: "https://eslint.org/docs/rules/no-delete-var" }, schema: [] diff --git a/lib/rules/no-div-regex.js b/lib/rules/no-div-regex.js index 84a9b9a3aaa..87423f8861a 100644 --- a/lib/rules/no-div-regex.js +++ b/lib/rules/no-div-regex.js @@ -14,7 +14,8 @@ module.exports = { docs: { description: "disallow division operators explicitly at the beginning of regular expressions", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-div-regex" }, schema: [] diff --git a/lib/rules/no-dupe-args.js b/lib/rules/no-dupe-args.js index c932be01d76..a71d01f9bd2 100644 --- a/lib/rules/no-dupe-args.js +++ b/lib/rules/no-dupe-args.js @@ -14,7 +14,8 @@ module.exports = { docs: { description: "disallow duplicate arguments in `function` definitions", category: "Possible Errors", - recommended: true + recommended: true, + url: "https://eslint.org/docs/rules/no-dupe-args" }, schema: [] diff --git a/lib/rules/no-dupe-class-members.js b/lib/rules/no-dupe-class-members.js index 07b999fab19..cc7f8da284a 100644 --- a/lib/rules/no-dupe-class-members.js +++ b/lib/rules/no-dupe-class-members.js @@ -14,7 +14,8 @@ module.exports = { docs: { description: "disallow duplicate class members", category: "ECMAScript 6", - recommended: true + recommended: true, + url: "https://eslint.org/docs/rules/no-dupe-class-members" }, schema: [] diff --git a/lib/rules/no-dupe-keys.js b/lib/rules/no-dupe-keys.js index 0120d0b38cf..10955e45037 100644 --- a/lib/rules/no-dupe-keys.js +++ b/lib/rules/no-dupe-keys.js @@ -87,7 +87,8 @@ module.exports = { docs: { description: "disallow duplicate keys in object literals", category: "Possible Errors", - recommended: true + recommended: true, + url: "https://eslint.org/docs/rules/no-dupe-keys" }, schema: [] diff --git a/lib/rules/no-duplicate-case.js b/lib/rules/no-duplicate-case.js index 07823f284c1..2a9d9551114 100644 --- a/lib/rules/no-duplicate-case.js +++ b/lib/rules/no-duplicate-case.js @@ -15,7 +15,8 @@ module.exports = { docs: { description: "disallow duplicate case labels", category: "Possible Errors", - recommended: true + recommended: true, + url: "https://eslint.org/docs/rules/no-duplicate-case" }, schema: [] diff --git a/lib/rules/no-duplicate-imports.js b/lib/rules/no-duplicate-imports.js index d12c3a56dff..32071da15fd 100644 --- a/lib/rules/no-duplicate-imports.js +++ b/lib/rules/no-duplicate-imports.js @@ -104,7 +104,8 @@ module.exports = { docs: { description: "disallow duplicate module imports", category: "ECMAScript 6", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-duplicate-imports" }, schema: [{ diff --git a/lib/rules/no-else-return.js b/lib/rules/no-else-return.js index deeff41ab83..91cb5b97963 100644 --- a/lib/rules/no-else-return.js +++ b/lib/rules/no-else-return.js @@ -21,7 +21,8 @@ module.exports = { docs: { description: "disallow `else` blocks after `return` statements in `if` statements", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-else-return" }, schema: [{ diff --git a/lib/rules/no-empty-character-class.js b/lib/rules/no-empty-character-class.js index 0ea7c5a0d1c..3c4806632e5 100644 --- a/lib/rules/no-empty-character-class.js +++ b/lib/rules/no-empty-character-class.js @@ -32,7 +32,8 @@ module.exports = { docs: { description: "disallow empty character classes in regular expressions", category: "Possible Errors", - recommended: true + recommended: true, + url: "https://eslint.org/docs/rules/no-empty-character-class" }, schema: [] diff --git a/lib/rules/no-empty-function.js b/lib/rules/no-empty-function.js index 38c915c33f9..3852774e6b2 100644 --- a/lib/rules/no-empty-function.js +++ b/lib/rules/no-empty-function.js @@ -93,7 +93,8 @@ module.exports = { docs: { description: "disallow empty functions", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-empty-function" }, schema: [ diff --git a/lib/rules/no-empty-pattern.js b/lib/rules/no-empty-pattern.js index 11f50b54142..1d0c3ab4b1d 100644 --- a/lib/rules/no-empty-pattern.js +++ b/lib/rules/no-empty-pattern.js @@ -13,7 +13,8 @@ module.exports = { docs: { description: "disallow empty destructuring patterns", category: "Best Practices", - recommended: true + recommended: true, + url: "https://eslint.org/docs/rules/no-empty-pattern" }, schema: [] diff --git a/lib/rules/no-empty.js b/lib/rules/no-empty.js index b71b8582a37..15f1df67908 100644 --- a/lib/rules/no-empty.js +++ b/lib/rules/no-empty.js @@ -19,7 +19,8 @@ module.exports = { docs: { description: "disallow empty block statements", category: "Possible Errors", - recommended: true + recommended: true, + url: "https://eslint.org/docs/rules/no-empty" }, schema: [ diff --git a/lib/rules/no-eq-null.js b/lib/rules/no-eq-null.js index 7e915a8c726..befb9d46f09 100644 --- a/lib/rules/no-eq-null.js +++ b/lib/rules/no-eq-null.js @@ -15,7 +15,8 @@ module.exports = { docs: { description: "disallow `null` comparisons without type-checking operators", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-eq-null" }, schema: [] diff --git a/lib/rules/no-eval.js b/lib/rules/no-eval.js index ee5f577f471..8cf4aa307b0 100644 --- a/lib/rules/no-eval.js +++ b/lib/rules/no-eval.js @@ -79,7 +79,8 @@ module.exports = { docs: { description: "disallow the use of `eval()`", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-eval" }, schema: [ diff --git a/lib/rules/no-ex-assign.js b/lib/rules/no-ex-assign.js index 20869d5cd10..6ede2fc210b 100644 --- a/lib/rules/no-ex-assign.js +++ b/lib/rules/no-ex-assign.js @@ -16,7 +16,8 @@ module.exports = { docs: { description: "disallow reassigning exceptions in `catch` clauses", category: "Possible Errors", - recommended: true + recommended: true, + url: "https://eslint.org/docs/rules/no-ex-assign" }, schema: [] diff --git a/lib/rules/no-extend-native.js b/lib/rules/no-extend-native.js index c550cf5da57..2e170017a87 100644 --- a/lib/rules/no-extend-native.js +++ b/lib/rules/no-extend-native.js @@ -27,7 +27,8 @@ module.exports = { docs: { description: "disallow extending native types", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-extend-native" }, schema: [ diff --git a/lib/rules/no-extra-bind.js b/lib/rules/no-extra-bind.js index 2d22eff2459..21b96c3c261 100644 --- a/lib/rules/no-extra-bind.js +++ b/lib/rules/no-extra-bind.js @@ -19,7 +19,8 @@ module.exports = { docs: { description: "disallow unnecessary calls to `.bind()`", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-extra-bind" }, schema: [], diff --git a/lib/rules/no-extra-boolean-cast.js b/lib/rules/no-extra-boolean-cast.js index 47ca7e22fea..471e8b5b82c 100644 --- a/lib/rules/no-extra-boolean-cast.js +++ b/lib/rules/no-extra-boolean-cast.js @@ -20,7 +20,8 @@ module.exports = { docs: { description: "disallow unnecessary boolean casts", category: "Possible Errors", - recommended: true + recommended: true, + url: "https://eslint.org/docs/rules/no-extra-boolean-cast" }, schema: [], diff --git a/lib/rules/no-extra-label.js b/lib/rules/no-extra-label.js index b89267de93d..f90a403cbfd 100644 --- a/lib/rules/no-extra-label.js +++ b/lib/rules/no-extra-label.js @@ -20,7 +20,8 @@ module.exports = { docs: { description: "disallow unnecessary labels", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-extra-label" }, schema: [], diff --git a/lib/rules/no-extra-parens.js b/lib/rules/no-extra-parens.js index 1025aa5a97c..4bf8f995009 100644 --- a/lib/rules/no-extra-parens.js +++ b/lib/rules/no-extra-parens.js @@ -15,7 +15,8 @@ module.exports = { docs: { description: "disallow unnecessary parentheses", category: "Possible Errors", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-extra-parens" }, fixable: "code", diff --git a/lib/rules/no-extra-semi.js b/lib/rules/no-extra-semi.js index acd312b32b2..5668c7e095e 100644 --- a/lib/rules/no-extra-semi.js +++ b/lib/rules/no-extra-semi.js @@ -21,7 +21,8 @@ module.exports = { docs: { description: "disallow unnecessary semicolons", category: "Possible Errors", - recommended: true + recommended: true, + url: "https://eslint.org/docs/rules/no-extra-semi" }, fixable: "code", diff --git a/lib/rules/no-fallthrough.js b/lib/rules/no-fallthrough.js index 082e8431d63..ce4f91ad964 100644 --- a/lib/rules/no-fallthrough.js +++ b/lib/rules/no-fallthrough.js @@ -58,7 +58,8 @@ module.exports = { docs: { description: "disallow fallthrough of `case` statements", category: "Best Practices", - recommended: true + recommended: true, + url: "https://eslint.org/docs/rules/no-fallthrough" }, schema: [ diff --git a/lib/rules/no-floating-decimal.js b/lib/rules/no-floating-decimal.js index dfba453a498..da8c4791237 100644 --- a/lib/rules/no-floating-decimal.js +++ b/lib/rules/no-floating-decimal.js @@ -20,7 +20,8 @@ module.exports = { docs: { description: "disallow leading or trailing decimal points in numeric literals", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-floating-decimal" }, schema: [], diff --git a/lib/rules/no-func-assign.js b/lib/rules/no-func-assign.js index ea86365b291..a0a17f36979 100644 --- a/lib/rules/no-func-assign.js +++ b/lib/rules/no-func-assign.js @@ -16,7 +16,8 @@ module.exports = { docs: { description: "disallow reassigning `function` declarations", category: "Possible Errors", - recommended: true + recommended: true, + url: "https://eslint.org/docs/rules/no-func-assign" }, schema: [] diff --git a/lib/rules/no-global-assign.js b/lib/rules/no-global-assign.js index 679650cb70f..3397bdbe000 100644 --- a/lib/rules/no-global-assign.js +++ b/lib/rules/no-global-assign.js @@ -14,7 +14,8 @@ module.exports = { docs: { description: "disallow assignments to native objects or read-only global variables", category: "Best Practices", - recommended: true + recommended: true, + url: "https://eslint.org/docs/rules/no-global-assign" }, schema: [ diff --git a/lib/rules/no-implicit-coercion.js b/lib/rules/no-implicit-coercion.js index 24e04858f06..7efab83935f 100644 --- a/lib/rules/no-implicit-coercion.js +++ b/lib/rules/no-implicit-coercion.js @@ -156,7 +156,8 @@ module.exports = { docs: { description: "disallow shorthand type conversions", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-implicit-coercion" }, fixable: "code", diff --git a/lib/rules/no-implicit-globals.js b/lib/rules/no-implicit-globals.js index f0962cdc7a8..c4717b6a374 100644 --- a/lib/rules/no-implicit-globals.js +++ b/lib/rules/no-implicit-globals.js @@ -14,7 +14,8 @@ module.exports = { docs: { description: "disallow variable and `function` declarations in the global scope", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-implicit-globals" }, schema: [] diff --git a/lib/rules/no-implied-eval.js b/lib/rules/no-implied-eval.js index cfb16dbf73e..de294bc8858 100644 --- a/lib/rules/no-implied-eval.js +++ b/lib/rules/no-implied-eval.js @@ -14,7 +14,8 @@ module.exports = { docs: { description: "disallow the use of `eval()`-like methods", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-implied-eval" }, schema: [] diff --git a/lib/rules/no-inline-comments.js b/lib/rules/no-inline-comments.js index 42b4753dfdd..85a0d383169 100644 --- a/lib/rules/no-inline-comments.js +++ b/lib/rules/no-inline-comments.js @@ -15,7 +15,8 @@ module.exports = { docs: { description: "disallow inline comments after code", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-inline-comments" }, schema: [] diff --git a/lib/rules/no-inner-declarations.js b/lib/rules/no-inner-declarations.js index 28aa5b4b5c3..032c0a0f096 100644 --- a/lib/rules/no-inner-declarations.js +++ b/lib/rules/no-inner-declarations.js @@ -14,7 +14,8 @@ module.exports = { docs: { description: "disallow variable or `function` declarations in nested blocks", category: "Possible Errors", - recommended: true + recommended: true, + url: "https://eslint.org/docs/rules/no-inner-declarations" }, schema: [ diff --git a/lib/rules/no-invalid-regexp.js b/lib/rules/no-invalid-regexp.js index 45596f7ee87..8ccb5242b00 100644 --- a/lib/rules/no-invalid-regexp.js +++ b/lib/rules/no-invalid-regexp.js @@ -19,7 +19,8 @@ module.exports = { docs: { description: "disallow invalid regular expression strings in `RegExp` constructors", category: "Possible Errors", - recommended: true + recommended: true, + url: "https://eslint.org/docs/rules/no-invalid-regexp" }, schema: [{ diff --git a/lib/rules/no-invalid-this.js b/lib/rules/no-invalid-this.js index 5a0a62f7a1d..a04673be867 100644 --- a/lib/rules/no-invalid-this.js +++ b/lib/rules/no-invalid-this.js @@ -20,7 +20,8 @@ module.exports = { docs: { description: "disallow `this` keywords outside of classes or class-like objects", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-invalid-this" }, schema: [] diff --git a/lib/rules/no-irregular-whitespace.js b/lib/rules/no-irregular-whitespace.js index cfbdfd1a5ef..e36ec88b013 100644 --- a/lib/rules/no-irregular-whitespace.js +++ b/lib/rules/no-irregular-whitespace.js @@ -30,7 +30,8 @@ module.exports = { docs: { description: "disallow irregular whitespace outside of strings and comments", category: "Possible Errors", - recommended: true + recommended: true, + url: "https://eslint.org/docs/rules/no-irregular-whitespace" }, schema: [ diff --git a/lib/rules/no-iterator.js b/lib/rules/no-iterator.js index 3677dd94d9f..ca12fcda477 100644 --- a/lib/rules/no-iterator.js +++ b/lib/rules/no-iterator.js @@ -14,7 +14,8 @@ module.exports = { docs: { description: "disallow the use of the `__iterator__` property", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-iterator" }, schema: [] diff --git a/lib/rules/no-label-var.js b/lib/rules/no-label-var.js index 954066aef32..a880abfcabb 100644 --- a/lib/rules/no-label-var.js +++ b/lib/rules/no-label-var.js @@ -20,7 +20,8 @@ module.exports = { docs: { description: "disallow labels that share a name with a variable", category: "Variables", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-label-var" }, schema: [] diff --git a/lib/rules/no-labels.js b/lib/rules/no-labels.js index 101092a6676..e09bb7b6eef 100644 --- a/lib/rules/no-labels.js +++ b/lib/rules/no-labels.js @@ -19,7 +19,8 @@ module.exports = { docs: { description: "disallow labeled statements", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-labels" }, schema: [ diff --git a/lib/rules/no-lone-blocks.js b/lib/rules/no-lone-blocks.js index 2b5666e213c..5e22aacf00f 100644 --- a/lib/rules/no-lone-blocks.js +++ b/lib/rules/no-lone-blocks.js @@ -14,7 +14,8 @@ module.exports = { docs: { description: "disallow unnecessary nested blocks", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-lone-blocks" }, schema: [] diff --git a/lib/rules/no-lonely-if.js b/lib/rules/no-lonely-if.js index db127d1945a..3ecc41e8cf6 100644 --- a/lib/rules/no-lonely-if.js +++ b/lib/rules/no-lonely-if.js @@ -13,7 +13,8 @@ module.exports = { docs: { description: "disallow `if` statements as the only statement in `else` blocks", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-lonely-if" }, schema: [], diff --git a/lib/rules/no-loop-func.js b/lib/rules/no-loop-func.js index c97e0c3c5ae..0dce09a61a4 100644 --- a/lib/rules/no-loop-func.js +++ b/lib/rules/no-loop-func.js @@ -159,7 +159,8 @@ module.exports = { docs: { description: "disallow `function` declarations and expressions inside loop statements", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-loop-func" }, schema: [] diff --git a/lib/rules/no-magic-numbers.js b/lib/rules/no-magic-numbers.js index 796ecff0f8a..20a752e554f 100644 --- a/lib/rules/no-magic-numbers.js +++ b/lib/rules/no-magic-numbers.js @@ -14,7 +14,8 @@ module.exports = { docs: { description: "disallow magic numbers", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-magic-numbers" }, schema: [{ diff --git a/lib/rules/no-mixed-operators.js b/lib/rules/no-mixed-operators.js index 9f1fbc9a6d4..0df42259db8 100644 --- a/lib/rules/no-mixed-operators.js +++ b/lib/rules/no-mixed-operators.js @@ -74,7 +74,8 @@ module.exports = { docs: { description: "disallow mixed binary operators", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-mixed-operators" }, schema: [ { diff --git a/lib/rules/no-mixed-requires.js b/lib/rules/no-mixed-requires.js index 171052a52a3..1058f3a511e 100644 --- a/lib/rules/no-mixed-requires.js +++ b/lib/rules/no-mixed-requires.js @@ -14,7 +14,8 @@ module.exports = { docs: { description: "disallow `require` calls to be mixed with regular variable declarations", category: "Node.js and CommonJS", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-mixed-requires" }, schema: [ diff --git a/lib/rules/no-mixed-spaces-and-tabs.js b/lib/rules/no-mixed-spaces-and-tabs.js index 2b8e89d3c87..7cb4b4ceeae 100644 --- a/lib/rules/no-mixed-spaces-and-tabs.js +++ b/lib/rules/no-mixed-spaces-and-tabs.js @@ -13,7 +13,8 @@ module.exports = { docs: { description: "disallow mixed spaces and tabs for indentation", category: "Stylistic Issues", - recommended: true + recommended: true, + url: "https://eslint.org/docs/rules/no-mixed-spaces-and-tabs" }, schema: [ diff --git a/lib/rules/no-multi-assign.js b/lib/rules/no-multi-assign.js index 164869f6ddc..ca3f778ac6f 100644 --- a/lib/rules/no-multi-assign.js +++ b/lib/rules/no-multi-assign.js @@ -15,7 +15,8 @@ module.exports = { docs: { description: "disallow use of chained assignment expressions", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-multi-assign" }, schema: [] }, diff --git a/lib/rules/no-multi-spaces.js b/lib/rules/no-multi-spaces.js index 84f1b501896..d0ca097ad67 100644 --- a/lib/rules/no-multi-spaces.js +++ b/lib/rules/no-multi-spaces.js @@ -16,7 +16,8 @@ module.exports = { docs: { description: "disallow multiple spaces", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-multi-spaces" }, fixable: "whitespace", diff --git a/lib/rules/no-multi-str.js b/lib/rules/no-multi-str.js index 76f29cbb5a9..2b97c261e0f 100644 --- a/lib/rules/no-multi-str.js +++ b/lib/rules/no-multi-str.js @@ -20,7 +20,8 @@ module.exports = { docs: { description: "disallow multiline strings", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-multi-str" }, schema: [] diff --git a/lib/rules/no-multiple-empty-lines.js b/lib/rules/no-multiple-empty-lines.js index 9d1067c205d..a111786a308 100644 --- a/lib/rules/no-multiple-empty-lines.js +++ b/lib/rules/no-multiple-empty-lines.js @@ -14,7 +14,8 @@ module.exports = { docs: { description: "disallow multiple empty lines", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-multiple-empty-lines" }, fixable: "whitespace", diff --git a/lib/rules/no-native-reassign.js b/lib/rules/no-native-reassign.js index a60d4e499cb..b1064b0bb36 100644 --- a/lib/rules/no-native-reassign.js +++ b/lib/rules/no-native-reassign.js @@ -16,7 +16,8 @@ module.exports = { description: "disallow assignments to native objects or read-only global variables", category: "Best Practices", recommended: false, - replacedBy: ["no-global-assign"] + replacedBy: ["no-global-assign"], + url: "https://eslint.org/docs/rules/no-native-reassign" }, deprecated: true, diff --git a/lib/rules/no-negated-condition.js b/lib/rules/no-negated-condition.js index 8ea8559ea1c..254dcb5c23c 100644 --- a/lib/rules/no-negated-condition.js +++ b/lib/rules/no-negated-condition.js @@ -13,7 +13,8 @@ module.exports = { docs: { description: "disallow negated conditions", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-negated-condition" }, schema: [] diff --git a/lib/rules/no-negated-in-lhs.js b/lib/rules/no-negated-in-lhs.js index 495cbc160ec..7f08814c941 100644 --- a/lib/rules/no-negated-in-lhs.js +++ b/lib/rules/no-negated-in-lhs.js @@ -16,7 +16,8 @@ module.exports = { description: "disallow negating the left operand in `in` expressions", category: "Possible Errors", recommended: false, - replacedBy: ["no-unsafe-negation"] + replacedBy: ["no-unsafe-negation"], + url: "https://eslint.org/docs/rules/no-negated-in-lhs" }, deprecated: true, diff --git a/lib/rules/no-nested-ternary.js b/lib/rules/no-nested-ternary.js index 4fe49fc9c01..15e72f20d1c 100644 --- a/lib/rules/no-nested-ternary.js +++ b/lib/rules/no-nested-ternary.js @@ -14,7 +14,8 @@ module.exports = { docs: { description: "disallow nested ternary expressions", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-nested-ternary" }, schema: [] diff --git a/lib/rules/no-new-func.js b/lib/rules/no-new-func.js index 6abbe8391d5..8ee327baa1c 100644 --- a/lib/rules/no-new-func.js +++ b/lib/rules/no-new-func.js @@ -14,7 +14,8 @@ module.exports = { docs: { description: "disallow `new` operators with the `Function` object", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-new-func" }, schema: [] diff --git a/lib/rules/no-new-object.js b/lib/rules/no-new-object.js index d4d77b55147..3f68cbc1b51 100644 --- a/lib/rules/no-new-object.js +++ b/lib/rules/no-new-object.js @@ -14,7 +14,8 @@ module.exports = { docs: { description: "disallow `Object` constructors", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-new-object" }, schema: [] diff --git a/lib/rules/no-new-require.js b/lib/rules/no-new-require.js index f9ea1f84bf3..f74daa7569c 100644 --- a/lib/rules/no-new-require.js +++ b/lib/rules/no-new-require.js @@ -14,7 +14,8 @@ module.exports = { docs: { description: "disallow `new` operators with calls to `require`", category: "Node.js and CommonJS", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-new-require" }, schema: [] diff --git a/lib/rules/no-new-symbol.js b/lib/rules/no-new-symbol.js index 5743a4748a9..a537268e38d 100644 --- a/lib/rules/no-new-symbol.js +++ b/lib/rules/no-new-symbol.js @@ -14,7 +14,8 @@ module.exports = { docs: { description: "disallow `new` operators with the `Symbol` object", category: "ECMAScript 6", - recommended: true + recommended: true, + url: "https://eslint.org/docs/rules/no-new-symbol" }, schema: [] diff --git a/lib/rules/no-new-wrappers.js b/lib/rules/no-new-wrappers.js index 65bf79b87c5..e8d516212b6 100644 --- a/lib/rules/no-new-wrappers.js +++ b/lib/rules/no-new-wrappers.js @@ -14,7 +14,8 @@ module.exports = { docs: { description: "disallow `new` operators with the `String`, `Number`, and `Boolean` objects", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-new-wrappers" }, schema: [] diff --git a/lib/rules/no-new.js b/lib/rules/no-new.js index 6e6025aac54..f9121bc18f6 100644 --- a/lib/rules/no-new.js +++ b/lib/rules/no-new.js @@ -15,7 +15,8 @@ module.exports = { docs: { description: "disallow `new` operators outside of assignments or comparisons", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-new" }, schema: [] diff --git a/lib/rules/no-obj-calls.js b/lib/rules/no-obj-calls.js index 0ca8a5effb6..320343cb2c0 100644 --- a/lib/rules/no-obj-calls.js +++ b/lib/rules/no-obj-calls.js @@ -14,7 +14,8 @@ module.exports = { docs: { description: "disallow calling global object properties as functions", category: "Possible Errors", - recommended: true + recommended: true, + url: "https://eslint.org/docs/rules/no-obj-calls" }, schema: [] diff --git a/lib/rules/no-octal-escape.js b/lib/rules/no-octal-escape.js index 04bfb6aae33..e9509b87f82 100644 --- a/lib/rules/no-octal-escape.js +++ b/lib/rules/no-octal-escape.js @@ -14,7 +14,8 @@ module.exports = { docs: { description: "disallow octal escape sequences in string literals", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-octal-escape" }, schema: [] diff --git a/lib/rules/no-octal.js b/lib/rules/no-octal.js index 58082d0d1cf..d782c23a39b 100644 --- a/lib/rules/no-octal.js +++ b/lib/rules/no-octal.js @@ -14,7 +14,8 @@ module.exports = { docs: { description: "disallow octal literals", category: "Best Practices", - recommended: true + recommended: true, + url: "https://eslint.org/docs/rules/no-octal" }, schema: [] diff --git a/lib/rules/no-param-reassign.js b/lib/rules/no-param-reassign.js index f32e42ae2fa..be1a559178a 100644 --- a/lib/rules/no-param-reassign.js +++ b/lib/rules/no-param-reassign.js @@ -15,7 +15,8 @@ module.exports = { docs: { description: "disallow reassigning `function` parameters", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-param-reassign" }, schema: [ diff --git a/lib/rules/no-path-concat.js b/lib/rules/no-path-concat.js index 1e153a43b6c..1dee7bda111 100644 --- a/lib/rules/no-path-concat.js +++ b/lib/rules/no-path-concat.js @@ -13,7 +13,8 @@ module.exports = { docs: { description: "disallow string concatenation with `__dirname` and `__filename`", category: "Node.js and CommonJS", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-path-concat" }, schema: [] diff --git a/lib/rules/no-plusplus.js b/lib/rules/no-plusplus.js index 94f259ac9ef..f754b367219 100644 --- a/lib/rules/no-plusplus.js +++ b/lib/rules/no-plusplus.js @@ -15,7 +15,8 @@ module.exports = { docs: { description: "disallow the unary operators `++` and `--`", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-plusplus" }, schema: [ diff --git a/lib/rules/no-process-env.js b/lib/rules/no-process-env.js index ef58b38e3cc..71b27ffd720 100644 --- a/lib/rules/no-process-env.js +++ b/lib/rules/no-process-env.js @@ -13,7 +13,8 @@ module.exports = { docs: { description: "disallow the use of `process.env`", category: "Node.js and CommonJS", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-process-env" }, schema: [] diff --git a/lib/rules/no-process-exit.js b/lib/rules/no-process-exit.js index 04e423b88ff..2d22d7fd96a 100644 --- a/lib/rules/no-process-exit.js +++ b/lib/rules/no-process-exit.js @@ -13,7 +13,8 @@ module.exports = { docs: { description: "disallow the use of `process.exit()`", category: "Node.js and CommonJS", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-process-exit" }, schema: [] diff --git a/lib/rules/no-proto.js b/lib/rules/no-proto.js index 933746f559c..e37c6c22e62 100644 --- a/lib/rules/no-proto.js +++ b/lib/rules/no-proto.js @@ -14,7 +14,8 @@ module.exports = { docs: { description: "disallow the use of the `__proto__` property", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-proto" }, schema: [] diff --git a/lib/rules/no-prototype-builtins.js b/lib/rules/no-prototype-builtins.js index b9f040eaf67..f52847f44d4 100644 --- a/lib/rules/no-prototype-builtins.js +++ b/lib/rules/no-prototype-builtins.js @@ -13,7 +13,8 @@ module.exports = { docs: { description: "disallow calling some `Object.prototype` methods directly on objects", category: "Possible Errors", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-prototype-builtins" }, schema: [] diff --git a/lib/rules/no-redeclare.js b/lib/rules/no-redeclare.js index ccb57003ed6..79ab21137ec 100644 --- a/lib/rules/no-redeclare.js +++ b/lib/rules/no-redeclare.js @@ -14,7 +14,8 @@ module.exports = { docs: { description: "disallow variable redeclaration", category: "Best Practices", - recommended: true + recommended: true, + url: "https://eslint.org/docs/rules/no-redeclare" }, schema: [ diff --git a/lib/rules/no-regex-spaces.js b/lib/rules/no-regex-spaces.js index 9250437caa4..a50692a4c3d 100644 --- a/lib/rules/no-regex-spaces.js +++ b/lib/rules/no-regex-spaces.js @@ -16,7 +16,8 @@ module.exports = { docs: { description: "disallow multiple spaces in regular expressions", category: "Possible Errors", - recommended: true + recommended: true, + url: "https://eslint.org/docs/rules/no-regex-spaces" }, schema: [], diff --git a/lib/rules/no-restricted-globals.js b/lib/rules/no-restricted-globals.js index 75428fc1747..691e55d1924 100644 --- a/lib/rules/no-restricted-globals.js +++ b/lib/rules/no-restricted-globals.js @@ -20,7 +20,8 @@ module.exports = { docs: { description: "disallow specified global variables", category: "Variables", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-restricted-globals" }, schema: { diff --git a/lib/rules/no-restricted-imports.js b/lib/rules/no-restricted-imports.js index eb477b4be61..11d09d6d226 100644 --- a/lib/rules/no-restricted-imports.js +++ b/lib/rules/no-restricted-imports.js @@ -56,7 +56,8 @@ module.exports = { docs: { description: "disallow specified modules when loaded by `import`", category: "ECMAScript 6", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-restricted-imports" }, schema: { diff --git a/lib/rules/no-restricted-modules.js b/lib/rules/no-restricted-modules.js index cd47975733d..54271094fd4 100644 --- a/lib/rules/no-restricted-modules.js +++ b/lib/rules/no-restricted-modules.js @@ -50,7 +50,8 @@ module.exports = { docs: { description: "disallow specified modules when loaded by `require`", category: "Node.js and CommonJS", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-restricted-modules" }, schema: { diff --git a/lib/rules/no-restricted-properties.js b/lib/rules/no-restricted-properties.js index cdc73f9e410..71cc83c65a4 100644 --- a/lib/rules/no-restricted-properties.js +++ b/lib/rules/no-restricted-properties.js @@ -16,7 +16,8 @@ module.exports = { docs: { description: "disallow certain properties on certain objects", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-restricted-properties" }, schema: { diff --git a/lib/rules/no-restricted-syntax.js b/lib/rules/no-restricted-syntax.js index 1798065ec06..c472d9432e6 100644 --- a/lib/rules/no-restricted-syntax.js +++ b/lib/rules/no-restricted-syntax.js @@ -13,7 +13,8 @@ module.exports = { docs: { description: "disallow specified syntax", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-restricted-syntax" }, schema: { diff --git a/lib/rules/no-return-assign.js b/lib/rules/no-return-assign.js index 882f94b7246..0a016cfad5e 100644 --- a/lib/rules/no-return-assign.js +++ b/lib/rules/no-return-assign.js @@ -25,7 +25,8 @@ module.exports = { docs: { description: "disallow assignment operators in `return` statements", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-return-assign" }, schema: [ diff --git a/lib/rules/no-return-await.js b/lib/rules/no-return-await.js index 2f06b611084..490ccaeb369 100644 --- a/lib/rules/no-return-await.js +++ b/lib/rules/no-return-await.js @@ -17,7 +17,11 @@ module.exports = { docs: { description: "disallow unnecessary `return await`", category: "Best Practices", - recommended: false // TODO: set to true + + // TODO: set to true + recommended: false, + + url: "https://eslint.org/docs/rules/no-return-await" }, fixable: null, schema: [ diff --git a/lib/rules/no-script-url.js b/lib/rules/no-script-url.js index 98f988ff1a3..ba74dafb8e2 100644 --- a/lib/rules/no-script-url.js +++ b/lib/rules/no-script-url.js @@ -16,7 +16,8 @@ module.exports = { docs: { description: "disallow `javascript:` urls", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-script-url" }, schema: [] diff --git a/lib/rules/no-self-assign.js b/lib/rules/no-self-assign.js index 48b922d46b8..30140420025 100644 --- a/lib/rules/no-self-assign.js +++ b/lib/rules/no-self-assign.js @@ -166,7 +166,8 @@ module.exports = { docs: { description: "disallow assignments where both sides are exactly the same", category: "Best Practices", - recommended: true + recommended: true, + url: "https://eslint.org/docs/rules/no-self-assign" }, schema: [ diff --git a/lib/rules/no-self-compare.js b/lib/rules/no-self-compare.js index 5beaa181b99..6ebc3870feb 100644 --- a/lib/rules/no-self-compare.js +++ b/lib/rules/no-self-compare.js @@ -15,7 +15,8 @@ module.exports = { docs: { description: "disallow comparisons where both sides are exactly the same", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-self-compare" }, schema: [] diff --git a/lib/rules/no-sequences.js b/lib/rules/no-sequences.js index 5e746dfa88f..8eaf55572b3 100644 --- a/lib/rules/no-sequences.js +++ b/lib/rules/no-sequences.js @@ -20,7 +20,8 @@ module.exports = { docs: { description: "disallow comma operators", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-sequences" }, schema: [] diff --git a/lib/rules/no-shadow-restricted-names.js b/lib/rules/no-shadow-restricted-names.js index 6c60232b8b4..7b92521b072 100644 --- a/lib/rules/no-shadow-restricted-names.js +++ b/lib/rules/no-shadow-restricted-names.js @@ -13,7 +13,8 @@ module.exports = { docs: { description: "disallow identifiers from shadowing restricted names", category: "Variables", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-shadow-restricted-names" }, schema: [] diff --git a/lib/rules/no-shadow.js b/lib/rules/no-shadow.js index e093d48c810..d01231ff99c 100644 --- a/lib/rules/no-shadow.js +++ b/lib/rules/no-shadow.js @@ -20,7 +20,8 @@ module.exports = { docs: { description: "disallow variable declarations from shadowing variables declared in the outer scope", category: "Variables", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-shadow" }, schema: [ diff --git a/lib/rules/no-spaced-func.js b/lib/rules/no-spaced-func.js index 361c1e0cd7e..42d1e4b243a 100644 --- a/lib/rules/no-spaced-func.js +++ b/lib/rules/no-spaced-func.js @@ -16,7 +16,8 @@ module.exports = { description: "disallow spacing between function identifiers and their applications (deprecated)", category: "Stylistic Issues", recommended: false, - replacedBy: ["func-call-spacing"] + replacedBy: ["func-call-spacing"], + url: "https://eslint.org/docs/rules/no-spaced-func" }, deprecated: true, diff --git a/lib/rules/no-sparse-arrays.js b/lib/rules/no-sparse-arrays.js index 3044896c612..1cc6f7ccba9 100644 --- a/lib/rules/no-sparse-arrays.js +++ b/lib/rules/no-sparse-arrays.js @@ -13,7 +13,8 @@ module.exports = { docs: { description: "disallow sparse arrays", category: "Possible Errors", - recommended: true + recommended: true, + url: "https://eslint.org/docs/rules/no-sparse-arrays" }, schema: [] diff --git a/lib/rules/no-sync.js b/lib/rules/no-sync.js index 06305969a1f..eb7b787d38c 100644 --- a/lib/rules/no-sync.js +++ b/lib/rules/no-sync.js @@ -16,7 +16,8 @@ module.exports = { docs: { description: "disallow synchronous methods", category: "Node.js and CommonJS", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-sync" }, schema: [ diff --git a/lib/rules/no-tabs.js b/lib/rules/no-tabs.js index 4bab96f3873..08a8fa5b758 100644 --- a/lib/rules/no-tabs.js +++ b/lib/rules/no-tabs.js @@ -19,7 +19,8 @@ module.exports = { docs: { description: "disallow all tabs", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-tabs" }, schema: [] }, diff --git a/lib/rules/no-template-curly-in-string.js b/lib/rules/no-template-curly-in-string.js index d8f6c31108b..ed74fcc6f7f 100644 --- a/lib/rules/no-template-curly-in-string.js +++ b/lib/rules/no-template-curly-in-string.js @@ -13,7 +13,8 @@ module.exports = { docs: { description: "disallow template literal placeholder syntax in regular strings", category: "Possible Errors", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-template-curly-in-string" }, schema: [] diff --git a/lib/rules/no-ternary.js b/lib/rules/no-ternary.js index 3e254f68126..4dcc8db069e 100644 --- a/lib/rules/no-ternary.js +++ b/lib/rules/no-ternary.js @@ -14,7 +14,8 @@ module.exports = { docs: { description: "disallow ternary operators", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-ternary" }, schema: [] diff --git a/lib/rules/no-this-before-super.js b/lib/rules/no-this-before-super.js index 2a686ac72e9..944a3235290 100644 --- a/lib/rules/no-this-before-super.js +++ b/lib/rules/no-this-before-super.js @@ -39,7 +39,8 @@ module.exports = { docs: { description: "disallow `this`/`super` before calling `super()` in constructors", category: "ECMAScript 6", - recommended: true + recommended: true, + url: "https://eslint.org/docs/rules/no-this-before-super" }, schema: [] diff --git a/lib/rules/no-throw-literal.js b/lib/rules/no-throw-literal.js index 5e9054399a2..b080578bf2f 100644 --- a/lib/rules/no-throw-literal.js +++ b/lib/rules/no-throw-literal.js @@ -16,7 +16,8 @@ module.exports = { docs: { description: "disallow throwing literals as exceptions", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-throw-literal" }, schema: [] diff --git a/lib/rules/no-trailing-spaces.js b/lib/rules/no-trailing-spaces.js index fbbc6402175..4d70c3b5cd2 100644 --- a/lib/rules/no-trailing-spaces.js +++ b/lib/rules/no-trailing-spaces.js @@ -19,7 +19,8 @@ module.exports = { docs: { description: "disallow trailing whitespace at the end of lines", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-trailing-spaces" }, fixable: "whitespace", diff --git a/lib/rules/no-undef-init.js b/lib/rules/no-undef-init.js index 7e58f55a690..2e0ab246299 100644 --- a/lib/rules/no-undef-init.js +++ b/lib/rules/no-undef-init.js @@ -16,7 +16,8 @@ module.exports = { docs: { description: "disallow initializing variables to `undefined`", category: "Variables", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-undef-init" }, schema: [], diff --git a/lib/rules/no-undef.js b/lib/rules/no-undef.js index 74a33dd9973..c8347d50d1a 100644 --- a/lib/rules/no-undef.js +++ b/lib/rules/no-undef.js @@ -28,7 +28,8 @@ module.exports = { docs: { description: "disallow the use of undeclared variables unless mentioned in `/*global */` comments", category: "Variables", - recommended: true + recommended: true, + url: "https://eslint.org/docs/rules/no-undef" }, schema: [ diff --git a/lib/rules/no-undefined.js b/lib/rules/no-undefined.js index 7e9f96b9218..94b514e91d8 100644 --- a/lib/rules/no-undefined.js +++ b/lib/rules/no-undefined.js @@ -13,7 +13,8 @@ module.exports = { docs: { description: "disallow the use of `undefined` as an identifier", category: "Variables", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-undefined" }, schema: [] diff --git a/lib/rules/no-underscore-dangle.js b/lib/rules/no-underscore-dangle.js index 5964da41cde..c76488a9431 100644 --- a/lib/rules/no-underscore-dangle.js +++ b/lib/rules/no-underscore-dangle.js @@ -14,7 +14,8 @@ module.exports = { docs: { description: "disallow dangling underscores in identifiers", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-underscore-dangle" }, schema: [ diff --git a/lib/rules/no-unexpected-multiline.js b/lib/rules/no-unexpected-multiline.js index 9398b8a6036..c7c26686d92 100644 --- a/lib/rules/no-unexpected-multiline.js +++ b/lib/rules/no-unexpected-multiline.js @@ -19,7 +19,8 @@ module.exports = { docs: { description: "disallow confusing multiline expressions", category: "Possible Errors", - recommended: true + recommended: true, + url: "https://eslint.org/docs/rules/no-unexpected-multiline" }, schema: [] diff --git a/lib/rules/no-unmodified-loop-condition.js b/lib/rules/no-unmodified-loop-condition.js index 349baf11ea3..623144dc064 100644 --- a/lib/rules/no-unmodified-loop-condition.js +++ b/lib/rules/no-unmodified-loop-condition.js @@ -169,7 +169,8 @@ module.exports = { docs: { description: "disallow unmodified loop conditions", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-unmodified-loop-condition" }, schema: [] diff --git a/lib/rules/no-unneeded-ternary.js b/lib/rules/no-unneeded-ternary.js index 57455378053..7f82c8ee281 100644 --- a/lib/rules/no-unneeded-ternary.js +++ b/lib/rules/no-unneeded-ternary.js @@ -27,7 +27,8 @@ module.exports = { docs: { description: "disallow ternary operators when simpler alternatives exist", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-unneeded-ternary" }, schema: [ diff --git a/lib/rules/no-unreachable.js b/lib/rules/no-unreachable.js index 217a6a42995..80d246307c3 100644 --- a/lib/rules/no-unreachable.js +++ b/lib/rules/no-unreachable.js @@ -104,7 +104,8 @@ module.exports = { docs: { description: "disallow unreachable code after `return`, `throw`, `continue`, and `break` statements", category: "Possible Errors", - recommended: true + recommended: true, + url: "https://eslint.org/docs/rules/no-unreachable" }, schema: [] diff --git a/lib/rules/no-unsafe-finally.js b/lib/rules/no-unsafe-finally.js index d25033e5453..ebef05188fb 100644 --- a/lib/rules/no-unsafe-finally.js +++ b/lib/rules/no-unsafe-finally.js @@ -23,7 +23,8 @@ module.exports = { docs: { description: "disallow control flow statements in `finally` blocks", category: "Possible Errors", - recommended: true + recommended: true, + url: "https://eslint.org/docs/rules/no-unsafe-finally" }, schema: [] diff --git a/lib/rules/no-unsafe-negation.js b/lib/rules/no-unsafe-negation.js index 761dc03386e..5dc39f183bc 100644 --- a/lib/rules/no-unsafe-negation.js +++ b/lib/rules/no-unsafe-negation.js @@ -44,7 +44,8 @@ module.exports = { docs: { description: "disallow negating the left operand of relational operators", category: "Possible Errors", - recommended: true + recommended: true, + url: "https://eslint.org/docs/rules/no-unsafe-negation" }, schema: [], fixable: "code" diff --git a/lib/rules/no-unused-expressions.js b/lib/rules/no-unused-expressions.js index b4e1074d549..fedfac17d1f 100644 --- a/lib/rules/no-unused-expressions.js +++ b/lib/rules/no-unused-expressions.js @@ -13,7 +13,8 @@ module.exports = { docs: { description: "disallow unused expressions", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-unused-expressions" }, schema: [ diff --git a/lib/rules/no-unused-labels.js b/lib/rules/no-unused-labels.js index bcd3cfdc478..3e1dcb6601f 100644 --- a/lib/rules/no-unused-labels.js +++ b/lib/rules/no-unused-labels.js @@ -14,7 +14,8 @@ module.exports = { docs: { description: "disallow unused labels", category: "Best Practices", - recommended: true + recommended: true, + url: "https://eslint.org/docs/rules/no-unused-labels" }, schema: [], diff --git a/lib/rules/no-unused-vars.js b/lib/rules/no-unused-vars.js index 04c2bc87996..1d0cef85628 100644 --- a/lib/rules/no-unused-vars.js +++ b/lib/rules/no-unused-vars.js @@ -21,7 +21,8 @@ module.exports = { docs: { description: "disallow unused variables", category: "Variables", - recommended: true + recommended: true, + url: "https://eslint.org/docs/rules/no-unused-vars" }, schema: [ diff --git a/lib/rules/no-use-before-define.js b/lib/rules/no-use-before-define.js index ada01815d9c..37b8e11ca84 100644 --- a/lib/rules/no-use-before-define.js +++ b/lib/rules/no-use-before-define.js @@ -139,7 +139,8 @@ module.exports = { docs: { description: "disallow the use of variables before they are defined", category: "Variables", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-use-before-define" }, schema: [ diff --git a/lib/rules/no-useless-call.js b/lib/rules/no-useless-call.js index e4820ac248e..925c9f79a99 100644 --- a/lib/rules/no-useless-call.js +++ b/lib/rules/no-useless-call.js @@ -52,7 +52,8 @@ module.exports = { docs: { description: "disallow unnecessary calls to `.call()` and `.apply()`", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-useless-call" }, schema: [] diff --git a/lib/rules/no-useless-computed-key.js b/lib/rules/no-useless-computed-key.js index f8114ab7543..07573075e1a 100644 --- a/lib/rules/no-useless-computed-key.js +++ b/lib/rules/no-useless-computed-key.js @@ -21,7 +21,8 @@ module.exports = { docs: { description: "disallow unnecessary computed property keys in object literals", category: "ECMAScript 6", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-useless-computed-key" }, schema: [], diff --git a/lib/rules/no-useless-concat.js b/lib/rules/no-useless-concat.js index e42781fee7d..a9ac7868436 100644 --- a/lib/rules/no-useless-concat.js +++ b/lib/rules/no-useless-concat.js @@ -69,7 +69,8 @@ module.exports = { docs: { description: "disallow unnecessary concatenation of literals or template literals", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-useless-concat" }, schema: [] diff --git a/lib/rules/no-useless-constructor.js b/lib/rules/no-useless-constructor.js index f790c789f53..59e40bef8f4 100644 --- a/lib/rules/no-useless-constructor.js +++ b/lib/rules/no-useless-constructor.js @@ -145,7 +145,8 @@ module.exports = { docs: { description: "disallow unnecessary constructors", category: "ECMAScript 6", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-useless-constructor" }, schema: [] diff --git a/lib/rules/no-useless-escape.js b/lib/rules/no-useless-escape.js index cdc3e98df85..80abec78e84 100644 --- a/lib/rules/no-useless-escape.js +++ b/lib/rules/no-useless-escape.js @@ -82,7 +82,8 @@ module.exports = { docs: { description: "disallow unnecessary escape characters", category: "Best Practices", - recommended: true + recommended: true, + url: "https://eslint.org/docs/rules/no-useless-escape" }, schema: [] diff --git a/lib/rules/no-useless-rename.js b/lib/rules/no-useless-rename.js index a489a6e51ba..83a03deb630 100644 --- a/lib/rules/no-useless-rename.js +++ b/lib/rules/no-useless-rename.js @@ -14,7 +14,8 @@ module.exports = { docs: { description: "disallow renaming import, export, and destructured assignments to the same name", category: "ECMAScript 6", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-useless-rename" }, fixable: "code", schema: [ diff --git a/lib/rules/no-useless-return.js b/lib/rules/no-useless-return.js index 5415bf59b80..8e2a6d97f67 100644 --- a/lib/rules/no-useless-return.js +++ b/lib/rules/no-useless-return.js @@ -76,7 +76,8 @@ module.exports = { docs: { description: "disallow redundant return statements", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-useless-return" }, fixable: "code", schema: [] diff --git a/lib/rules/no-var.js b/lib/rules/no-var.js index d3c163e5577..d95ca539f03 100644 --- a/lib/rules/no-var.js +++ b/lib/rules/no-var.js @@ -183,7 +183,8 @@ module.exports = { docs: { description: "require `let` or `const` instead of `var`", category: "ECMAScript 6", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-var" }, schema: [], diff --git a/lib/rules/no-void.js b/lib/rules/no-void.js index 5202fa49a85..1d3d887da66 100644 --- a/lib/rules/no-void.js +++ b/lib/rules/no-void.js @@ -13,7 +13,8 @@ module.exports = { docs: { description: "disallow `void` operators", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-void" }, schema: [] diff --git a/lib/rules/no-warning-comments.js b/lib/rules/no-warning-comments.js index c0ecaca9e7d..ce58f9ac808 100644 --- a/lib/rules/no-warning-comments.js +++ b/lib/rules/no-warning-comments.js @@ -16,7 +16,8 @@ module.exports = { docs: { description: "disallow specified warning terms in comments", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-warning-comments" }, schema: [ diff --git a/lib/rules/no-whitespace-before-property.js b/lib/rules/no-whitespace-before-property.js index 2d476b66c0a..fc4c25f8497 100644 --- a/lib/rules/no-whitespace-before-property.js +++ b/lib/rules/no-whitespace-before-property.js @@ -19,7 +19,8 @@ module.exports = { docs: { description: "disallow whitespace before properties", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-whitespace-before-property" }, fixable: "whitespace", diff --git a/lib/rules/no-with.js b/lib/rules/no-with.js index be9e3463606..d72dcdfb21e 100644 --- a/lib/rules/no-with.js +++ b/lib/rules/no-with.js @@ -14,7 +14,8 @@ module.exports = { docs: { description: "disallow `with` statements", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/no-with" }, schema: [] diff --git a/lib/rules/nonblock-statement-body-position.js b/lib/rules/nonblock-statement-body-position.js index 212e36a57c2..e447ef886b3 100644 --- a/lib/rules/nonblock-statement-body-position.js +++ b/lib/rules/nonblock-statement-body-position.js @@ -15,7 +15,8 @@ module.exports = { docs: { description: "enforce the location of single-line statements", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/nonblock-statement-body-position" }, fixable: "whitespace", schema: [ diff --git a/lib/rules/object-curly-newline.js b/lib/rules/object-curly-newline.js index ebad69de2ee..91b2ca6c97c 100644 --- a/lib/rules/object-curly-newline.js +++ b/lib/rules/object-curly-newline.js @@ -97,7 +97,8 @@ module.exports = { docs: { description: "enforce consistent line breaks inside braces", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/object-curly-newline" }, fixable: "whitespace", schema: [ diff --git a/lib/rules/object-curly-spacing.js b/lib/rules/object-curly-spacing.js index 3341e915f24..b37d6fd90f3 100644 --- a/lib/rules/object-curly-spacing.js +++ b/lib/rules/object-curly-spacing.js @@ -15,7 +15,8 @@ module.exports = { docs: { description: "enforce consistent spacing inside braces", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/object-curly-spacing" }, fixable: "whitespace", diff --git a/lib/rules/object-property-newline.js b/lib/rules/object-property-newline.js index 0463e389ab9..56ca269402f 100644 --- a/lib/rules/object-property-newline.js +++ b/lib/rules/object-property-newline.js @@ -14,7 +14,8 @@ module.exports = { docs: { description: "enforce placing object properties on separate lines", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/object-property-newline" }, schema: [ diff --git a/lib/rules/object-shorthand.js b/lib/rules/object-shorthand.js index 980d0fc35a5..c6c0b104458 100644 --- a/lib/rules/object-shorthand.js +++ b/lib/rules/object-shorthand.js @@ -27,7 +27,8 @@ module.exports = { docs: { description: "require or disallow method and property shorthand syntax for object literals", category: "ECMAScript 6", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/object-shorthand" }, fixable: "code", diff --git a/lib/rules/one-var-declaration-per-line.js b/lib/rules/one-var-declaration-per-line.js index 61b505c82d5..e17529b6bed 100644 --- a/lib/rules/one-var-declaration-per-line.js +++ b/lib/rules/one-var-declaration-per-line.js @@ -13,7 +13,8 @@ module.exports = { docs: { description: "require or disallow newlines around variable declarations", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/one-var-declaration-per-line" }, schema: [ diff --git a/lib/rules/one-var.js b/lib/rules/one-var.js index 18e21d49b8b..cd094444b6a 100644 --- a/lib/rules/one-var.js +++ b/lib/rules/one-var.js @@ -14,7 +14,8 @@ module.exports = { docs: { description: "enforce variables to be declared either together or separately in functions", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/one-var" }, schema: [ diff --git a/lib/rules/operator-assignment.js b/lib/rules/operator-assignment.js index f776609f5e3..ad516bbfc4c 100644 --- a/lib/rules/operator-assignment.js +++ b/lib/rules/operator-assignment.js @@ -92,7 +92,8 @@ module.exports = { docs: { description: "require or disallow assignment operator shorthand where possible", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/operator-assignment" }, schema: [ diff --git a/lib/rules/operator-linebreak.js b/lib/rules/operator-linebreak.js index 271cbb35c1d..558258b27df 100644 --- a/lib/rules/operator-linebreak.js +++ b/lib/rules/operator-linebreak.js @@ -20,7 +20,8 @@ module.exports = { docs: { description: "enforce consistent linebreak style for operators", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/operator-linebreak" }, schema: [ diff --git a/lib/rules/padded-blocks.js b/lib/rules/padded-blocks.js index ad65882ac6a..2fbb2671216 100644 --- a/lib/rules/padded-blocks.js +++ b/lib/rules/padded-blocks.js @@ -14,7 +14,8 @@ module.exports = { docs: { description: "require or disallow padding within blocks", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/padded-blocks" }, fixable: "whitespace", diff --git a/lib/rules/padding-line-between-statements.js b/lib/rules/padding-line-between-statements.js index a89c49decf5..9d1a4a3c7eb 100644 --- a/lib/rules/padding-line-between-statements.js +++ b/lib/rules/padding-line-between-statements.js @@ -394,7 +394,8 @@ module.exports = { docs: { description: "require or disallow padding lines between statements", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/padding-line-between-statements" }, fixable: "whitespace", schema: { diff --git a/lib/rules/prefer-arrow-callback.js b/lib/rules/prefer-arrow-callback.js index 31ae2859fea..ff7a0fa7e7a 100644 --- a/lib/rules/prefer-arrow-callback.js +++ b/lib/rules/prefer-arrow-callback.js @@ -134,7 +134,8 @@ module.exports = { docs: { description: "require using arrow functions for callbacks", category: "ECMAScript 6", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/prefer-arrow-callback" }, schema: [ diff --git a/lib/rules/prefer-const.js b/lib/rules/prefer-const.js index a8cf3b7ef61..a24a00284f5 100644 --- a/lib/rules/prefer-const.js +++ b/lib/rules/prefer-const.js @@ -233,7 +233,8 @@ module.exports = { docs: { description: "require `const` declarations for variables that are never reassigned after declared", category: "ECMAScript 6", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/prefer-const" }, fixable: "code", diff --git a/lib/rules/prefer-destructuring.js b/lib/rules/prefer-destructuring.js index 56c348a4785..e9d02da3a11 100644 --- a/lib/rules/prefer-destructuring.js +++ b/lib/rules/prefer-destructuring.js @@ -13,7 +13,8 @@ module.exports = { docs: { description: "require destructuring from arrays and/or objects", category: "ECMAScript 6", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/prefer-destructuring" }, schema: [ { diff --git a/lib/rules/prefer-numeric-literals.js b/lib/rules/prefer-numeric-literals.js index 929e660c665..051a91c81cb 100644 --- a/lib/rules/prefer-numeric-literals.js +++ b/lib/rules/prefer-numeric-literals.js @@ -41,7 +41,8 @@ module.exports = { docs: { description: "disallow `parseInt()` and `Number.parseInt()` in favor of binary, octal, and hexadecimal literals", category: "ECMAScript 6", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/prefer-numeric-literals" }, schema: [], diff --git a/lib/rules/prefer-promise-reject-errors.js b/lib/rules/prefer-promise-reject-errors.js index d2a6b5df102..f92bd58d2e6 100644 --- a/lib/rules/prefer-promise-reject-errors.js +++ b/lib/rules/prefer-promise-reject-errors.js @@ -15,7 +15,8 @@ module.exports = { docs: { description: "require using Error objects as Promise rejection reasons", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/prefer-promise-reject-errors" }, fixable: null, schema: [ diff --git a/lib/rules/prefer-reflect.js b/lib/rules/prefer-reflect.js index a47e66c5f53..56e841ff181 100644 --- a/lib/rules/prefer-reflect.js +++ b/lib/rules/prefer-reflect.js @@ -15,7 +15,8 @@ module.exports = { description: "require `Reflect` methods where applicable", category: "ECMAScript 6", recommended: false, - replacedBy: [] + replacedBy: [], + url: "https://eslint.org/docs/rules/prefer-reflect" }, deprecated: true, diff --git a/lib/rules/prefer-rest-params.js b/lib/rules/prefer-rest-params.js index 03342371b2b..133456e4d17 100644 --- a/lib/rules/prefer-rest-params.js +++ b/lib/rules/prefer-rest-params.js @@ -65,7 +65,8 @@ module.exports = { docs: { description: "require rest parameters instead of `arguments`", category: "ECMAScript 6", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/prefer-rest-params" }, schema: [] diff --git a/lib/rules/prefer-spread.js b/lib/rules/prefer-spread.js index c111d5f98e8..62cfb28e7e2 100644 --- a/lib/rules/prefer-spread.js +++ b/lib/rules/prefer-spread.js @@ -52,7 +52,8 @@ module.exports = { docs: { description: "require spread operators instead of `.apply()`", category: "ECMAScript 6", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/prefer-spread" }, schema: [], diff --git a/lib/rules/prefer-template.js b/lib/rules/prefer-template.js index 076ce6a3ea8..c583bdcf9a2 100644 --- a/lib/rules/prefer-template.js +++ b/lib/rules/prefer-template.js @@ -103,7 +103,8 @@ module.exports = { docs: { description: "require template literals instead of string concatenation", category: "ECMAScript 6", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/prefer-template" }, schema: [], diff --git a/lib/rules/quote-props.js b/lib/rules/quote-props.js index 6ac1f3c138f..36739494da4 100644 --- a/lib/rules/quote-props.js +++ b/lib/rules/quote-props.js @@ -20,7 +20,8 @@ module.exports = { docs: { description: "require quotes around object literal property names", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/quote-props" }, schema: { diff --git a/lib/rules/quotes.js b/lib/rules/quotes.js index 914762727bd..fa8bbae5fa1 100644 --- a/lib/rules/quotes.js +++ b/lib/rules/quotes.js @@ -79,7 +79,8 @@ module.exports = { docs: { description: "enforce the consistent use of either backticks, double, or single quotes", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/quotes" }, fixable: "code", diff --git a/lib/rules/radix.js b/lib/rules/radix.js index 0484c3bfb37..7e116a6fbf9 100644 --- a/lib/rules/radix.js +++ b/lib/rules/radix.js @@ -81,7 +81,8 @@ module.exports = { docs: { description: "enforce the consistent use of the radix argument when using `parseInt()`", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/radix" }, schema: [ diff --git a/lib/rules/require-await.js b/lib/rules/require-await.js index a5698ae058b..6adc84ae15c 100644 --- a/lib/rules/require-await.js +++ b/lib/rules/require-await.js @@ -34,7 +34,8 @@ module.exports = { docs: { description: "disallow async functions which have no `await` expression", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/require-await" }, schema: [] }, diff --git a/lib/rules/require-jsdoc.js b/lib/rules/require-jsdoc.js index a02ee3659c3..91b90b7d10a 100644 --- a/lib/rules/require-jsdoc.js +++ b/lib/rules/require-jsdoc.js @@ -9,7 +9,8 @@ module.exports = { docs: { description: "require JSDoc comments", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/require-jsdoc" }, schema: [ diff --git a/lib/rules/require-yield.js b/lib/rules/require-yield.js index 5cc2944bc69..83a29876f09 100644 --- a/lib/rules/require-yield.js +++ b/lib/rules/require-yield.js @@ -14,7 +14,8 @@ module.exports = { docs: { description: "require generator functions to contain `yield`", category: "ECMAScript 6", - recommended: true + recommended: true, + url: "https://eslint.org/docs/rules/require-yield" }, schema: [] diff --git a/lib/rules/rest-spread-spacing.js b/lib/rules/rest-spread-spacing.js index 91770eca74e..1fbc2c4cc58 100644 --- a/lib/rules/rest-spread-spacing.js +++ b/lib/rules/rest-spread-spacing.js @@ -14,7 +14,8 @@ module.exports = { docs: { description: "enforce spacing between rest and spread operators and their expressions", category: "ECMAScript 6", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/rest-spread-spacing" }, fixable: "whitespace", schema: [ diff --git a/lib/rules/semi-spacing.js b/lib/rules/semi-spacing.js index fd300e4a37a..07af993764a 100644 --- a/lib/rules/semi-spacing.js +++ b/lib/rules/semi-spacing.js @@ -16,7 +16,8 @@ module.exports = { docs: { description: "enforce consistent spacing before and after semicolons", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/semi-spacing" }, fixable: "whitespace", diff --git a/lib/rules/semi-style.js b/lib/rules/semi-style.js index 41fb39246c7..de65928136b 100644 --- a/lib/rules/semi-style.js +++ b/lib/rules/semi-style.js @@ -68,7 +68,8 @@ module.exports = { docs: { description: "enforce location of semicolons", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/semi-style" }, schema: [{ enum: ["last", "first"] }], fixable: "whitespace" diff --git a/lib/rules/semi.js b/lib/rules/semi.js index 78b6966deab..33a214db7c9 100644 --- a/lib/rules/semi.js +++ b/lib/rules/semi.js @@ -20,7 +20,8 @@ module.exports = { docs: { description: "require or disallow semicolons instead of ASI", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/semi" }, fixable: "code", diff --git a/lib/rules/sort-imports.js b/lib/rules/sort-imports.js index 2bd415e9746..8735be5d307 100644 --- a/lib/rules/sort-imports.js +++ b/lib/rules/sort-imports.js @@ -14,7 +14,8 @@ module.exports = { docs: { description: "enforce sorted import declarations within modules", category: "ECMAScript 6", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/sort-imports" }, schema: [ diff --git a/lib/rules/sort-keys.js b/lib/rules/sort-keys.js index 8821f629433..9318e2fbb23 100644 --- a/lib/rules/sort-keys.js +++ b/lib/rules/sort-keys.js @@ -76,7 +76,8 @@ module.exports = { docs: { description: "require object keys to be sorted", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/sort-keys" }, schema: [ { diff --git a/lib/rules/sort-vars.js b/lib/rules/sort-vars.js index c77cdf86207..334deb0657f 100644 --- a/lib/rules/sort-vars.js +++ b/lib/rules/sort-vars.js @@ -14,7 +14,8 @@ module.exports = { docs: { description: "require variables within the same declaration block to be sorted", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/sort-vars" }, schema: [ diff --git a/lib/rules/space-before-blocks.js b/lib/rules/space-before-blocks.js index f50298c9c40..2b82066d727 100644 --- a/lib/rules/space-before-blocks.js +++ b/lib/rules/space-before-blocks.js @@ -16,7 +16,8 @@ module.exports = { docs: { description: "enforce consistent spacing before blocks", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/space-before-blocks" }, fixable: "whitespace", diff --git a/lib/rules/space-before-function-paren.js b/lib/rules/space-before-function-paren.js index 8851c4587ac..51f6cc43262 100644 --- a/lib/rules/space-before-function-paren.js +++ b/lib/rules/space-before-function-paren.js @@ -19,7 +19,8 @@ module.exports = { docs: { description: "enforce consistent spacing before `function` definition opening parenthesis", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/space-before-function-paren" }, fixable: "whitespace", diff --git a/lib/rules/space-in-parens.js b/lib/rules/space-in-parens.js index 67ec5847cd1..7e315c44862 100644 --- a/lib/rules/space-in-parens.js +++ b/lib/rules/space-in-parens.js @@ -15,7 +15,8 @@ module.exports = { docs: { description: "enforce consistent spacing inside parentheses", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/space-in-parens" }, fixable: "whitespace", diff --git a/lib/rules/space-infix-ops.js b/lib/rules/space-infix-ops.js index b92c889c7fb..49b64658d19 100644 --- a/lib/rules/space-infix-ops.js +++ b/lib/rules/space-infix-ops.js @@ -13,7 +13,8 @@ module.exports = { docs: { description: "require spacing around infix operators", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/space-infix-ops" }, fixable: "whitespace", diff --git a/lib/rules/space-unary-ops.js b/lib/rules/space-unary-ops.js index 06a70fb6ade..4d122836ad6 100644 --- a/lib/rules/space-unary-ops.js +++ b/lib/rules/space-unary-ops.js @@ -19,7 +19,8 @@ module.exports = { docs: { description: "enforce consistent spacing before or after unary operators", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/space-unary-ops" }, fixable: "whitespace", diff --git a/lib/rules/spaced-comment.js b/lib/rules/spaced-comment.js index 8cdd05514ca..9d2f5f49acd 100644 --- a/lib/rules/spaced-comment.js +++ b/lib/rules/spaced-comment.js @@ -158,7 +158,8 @@ module.exports = { docs: { description: "enforce consistent spacing after the `//` or `/*` in a comment", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/spaced-comment" }, fixable: "whitespace", diff --git a/lib/rules/strict.js b/lib/rules/strict.js index 433b4713679..633a8b323da 100644 --- a/lib/rules/strict.js +++ b/lib/rules/strict.js @@ -83,7 +83,8 @@ module.exports = { docs: { description: "require or disallow strict mode directives", category: "Strict Mode", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/strict" }, schema: [ diff --git a/lib/rules/switch-colon-spacing.js b/lib/rules/switch-colon-spacing.js index 400e850997e..cf19df6ed4a 100644 --- a/lib/rules/switch-colon-spacing.js +++ b/lib/rules/switch-colon-spacing.js @@ -20,7 +20,8 @@ module.exports = { docs: { description: "enforce spacing around colons of switch statements", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/switch-colon-spacing" }, schema: [ { diff --git a/lib/rules/symbol-description.js b/lib/rules/symbol-description.js index 3f5ffd7463c..95c1a1deb5d 100644 --- a/lib/rules/symbol-description.js +++ b/lib/rules/symbol-description.js @@ -21,7 +21,8 @@ module.exports = { docs: { description: "require symbol descriptions", category: "ECMAScript 6", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/symbol-description" }, schema: [] diff --git a/lib/rules/template-curly-spacing.js b/lib/rules/template-curly-spacing.js index 1d491a24c9c..707ea76a360 100644 --- a/lib/rules/template-curly-spacing.js +++ b/lib/rules/template-curly-spacing.js @@ -27,7 +27,8 @@ module.exports = { docs: { description: "require or disallow spacing around embedded expressions of template strings", category: "ECMAScript 6", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/template-curly-spacing" }, fixable: "whitespace", diff --git a/lib/rules/template-tag-spacing.js b/lib/rules/template-tag-spacing.js index 907c537ff30..aee7ac108be 100755 --- a/lib/rules/template-tag-spacing.js +++ b/lib/rules/template-tag-spacing.js @@ -14,7 +14,8 @@ module.exports = { docs: { description: "require or disallow spacing between template tags and their literals", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/template-tag-spacing" }, fixable: "whitespace", diff --git a/lib/rules/unicode-bom.js b/lib/rules/unicode-bom.js index 7109a49edbb..03b2d5ae68e 100644 --- a/lib/rules/unicode-bom.js +++ b/lib/rules/unicode-bom.js @@ -13,7 +13,8 @@ module.exports = { docs: { description: "require or disallow Unicode byte order mark (BOM)", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/unicode-bom" }, fixable: "whitespace", diff --git a/lib/rules/use-isnan.js b/lib/rules/use-isnan.js index 5ec48a0386e..5bad5b3c6dd 100644 --- a/lib/rules/use-isnan.js +++ b/lib/rules/use-isnan.js @@ -14,7 +14,8 @@ module.exports = { docs: { description: "require calls to `isNaN()` when checking for `NaN`", category: "Possible Errors", - recommended: true + recommended: true, + url: "https://eslint.org/docs/rules/use-isnan" }, schema: [] diff --git a/lib/rules/valid-jsdoc.js b/lib/rules/valid-jsdoc.js index ea60b115ce6..5e1af10de7a 100644 --- a/lib/rules/valid-jsdoc.js +++ b/lib/rules/valid-jsdoc.js @@ -19,7 +19,8 @@ module.exports = { docs: { description: "enforce valid JSDoc comments", category: "Possible Errors", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/valid-jsdoc" }, schema: [ diff --git a/lib/rules/valid-typeof.js b/lib/rules/valid-typeof.js index fba4cc5712a..ac4e74f20ba 100644 --- a/lib/rules/valid-typeof.js +++ b/lib/rules/valid-typeof.js @@ -13,7 +13,8 @@ module.exports = { docs: { description: "enforce comparing `typeof` expressions against valid strings", category: "Possible Errors", - recommended: true + recommended: true, + url: "https://eslint.org/docs/rules/valid-typeof" }, schema: [ diff --git a/lib/rules/vars-on-top.js b/lib/rules/vars-on-top.js index f74db905b19..8f6bf1d9777 100644 --- a/lib/rules/vars-on-top.js +++ b/lib/rules/vars-on-top.js @@ -14,7 +14,8 @@ module.exports = { docs: { description: "require `var` declarations be placed at the top of their containing scope", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/vars-on-top" }, schema: [] diff --git a/lib/rules/wrap-iife.js b/lib/rules/wrap-iife.js index c4e6a9e0c73..a21bf21634c 100644 --- a/lib/rules/wrap-iife.js +++ b/lib/rules/wrap-iife.js @@ -20,7 +20,8 @@ module.exports = { docs: { description: "require parentheses around immediate `function` invocations", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/wrap-iife" }, schema: [ diff --git a/lib/rules/wrap-regex.js b/lib/rules/wrap-regex.js index 79f3d30515d..e58a4fe5376 100644 --- a/lib/rules/wrap-regex.js +++ b/lib/rules/wrap-regex.js @@ -14,7 +14,8 @@ module.exports = { docs: { description: "require parenthesis around regex literals", category: "Stylistic Issues", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/wrap-regex" }, schema: [], diff --git a/lib/rules/yield-star-spacing.js b/lib/rules/yield-star-spacing.js index eb20fc01b0b..33a37f0d991 100644 --- a/lib/rules/yield-star-spacing.js +++ b/lib/rules/yield-star-spacing.js @@ -14,7 +14,8 @@ module.exports = { docs: { description: "require or disallow spacing around the `*` in `yield*` expressions", category: "ECMAScript 6", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/yield-star-spacing" }, fixable: "whitespace", diff --git a/lib/rules/yoda.js b/lib/rules/yoda.js index 2ccb61f73a0..7f3bc6115b9 100644 --- a/lib/rules/yoda.js +++ b/lib/rules/yoda.js @@ -155,7 +155,8 @@ module.exports = { docs: { description: "require or disallow \"Yoda\" conditions", category: "Best Practices", - recommended: false + recommended: false, + url: "https://eslint.org/docs/rules/yoda" }, schema: [ diff --git a/tests/tools/internal-rules/consistent-docs-url.js b/tests/tools/internal-rules/consistent-docs-url.js new file mode 100644 index 00000000000..3d95dac065a --- /dev/null +++ b/tests/tools/internal-rules/consistent-docs-url.js @@ -0,0 +1,84 @@ +/** + * @fileoverview Tests for internal-consistent-docs-url rule. + * @author Patrick McElhaney + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const rule = require("../../../tools/internal-rules/consistent-docs-url"), + RuleTester = require("../../../lib/testers/rule-tester"); + +//------------------------------------------------------------------------------ +// Tests +//------------------------------------------------------------------------------ + +const ruleTester = new RuleTester(); + +ruleTester.run("consistent-docs-url", rule, { + valid: [ + + // wrong exports format: "internal-no-invalid-meta" reports this already + [ + "module.exports = function(context) {", + " return {", + " Program: function(node) {}", + " };", + "};" + ].join("\n"), + [ + "module.exports = {", + " meta: {", + " docs: {", + " url: 'https://eslint.org/docs/rules/'", + " }", + " },", + " create: function(context) {", + " return {};", + " }", + "};" + ].join("\n") + ], + invalid: [ + { + code: [ + "module.exports = {", + " meta: {", + " docs: {}", + " },", + + " create: function(context) {", + " return {};", + " }", + "};" + ].join("\n"), + errors: [{ + message: "Rule is missing a meta.docs.url property", + line: 3, + column: 9 + }] + }, + { + code: [ + "module.exports = {", + " meta: {", + " docs: {", + " url: 'http://example.com/wrong-url'", + " }", + " },", + " create: function(context) {", + " return {};", + " }", + "};" + ].join("\n"), + errors: [{ + message: "Incorrect url. Expected \"https://eslint.org/docs/rules/\" but got \"http://example.com/wrong-url\"", + line: 4, + column: 18 + }] + } + ] +}); diff --git a/tools/internal-rules/.eslintrc.yml b/tools/internal-rules/.eslintrc.yml index 2a8d907935b..64b3cee7f01 100644 --- a/tools/internal-rules/.eslintrc.yml +++ b/tools/internal-rules/.eslintrc.yml @@ -1,3 +1,4 @@ rules: rulesdir/no-invalid-meta: "error" rulesdir/consistent-docs-description: "error" + rulesdir/consistent-docs-url: "error" diff --git a/tools/internal-rules/consistent-docs-description.js b/tools/internal-rules/consistent-docs-description.js index 55e2a6c7645..3120a0d81e4 100644 --- a/tools/internal-rules/consistent-docs-description.js +++ b/tools/internal-rules/consistent-docs-description.js @@ -104,7 +104,7 @@ function checkMetaDocsDescription(context, exportsNode) { module.exports = { meta: { - docs: { + docs: {// eslint-disable-line rulesdir/consistent-docs-url description: "enforce correct conventions of `meta.docs.description` property in core rules", category: "Internal", recommended: false diff --git a/tools/internal-rules/consistent-docs-url.js b/tools/internal-rules/consistent-docs-url.js new file mode 100644 index 00000000000..b08783911bd --- /dev/null +++ b/tools/internal-rules/consistent-docs-url.js @@ -0,0 +1,101 @@ +/** + * @fileoverview Internal rule to enforce meta.docs.url conventions. + * @author Patrick McElhaney + */ + +"use strict"; + +const path = require("path"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Gets the property of the Object node passed in that has the name specified. + * + * @param {string} property Name of the property to return. + * @param {ASTNode} node The ObjectExpression node. + * @returns {ASTNode} The Property node or null if not found. + */ +function getPropertyFromObject(property, node) { + const properties = node.properties; + + for (let i = 0; i < properties.length; i++) { + if (properties[i].key.name === property) { + return properties[i]; + } + } + + return null; +} + +/** + * Verifies that the meta.docs.url property is present and has the correct value. + * + * @param {RuleContext} context The ESLint rule context. + * @param {ASTNode} exportsNode ObjectExpression node that the rule exports. + * @returns {void} + */ +function checkMetaDocsUrl(context, exportsNode) { + if (exportsNode.type !== "ObjectExpression") { + + // if the exported node is not the correct format, "internal-no-invalid-meta" will already report this. + return; + } + + const metaProperty = getPropertyFromObject("meta", exportsNode); + const metaDocs = metaProperty && getPropertyFromObject("docs", metaProperty.value); + const metaDocsUrl = metaDocs && getPropertyFromObject("url", metaDocs.value); + + if (!metaDocsUrl) { + context.report({ + node: metaDocs, + message: "Rule is missing a meta.docs.url property" + }); + return; + } + + const ruleId = path.basename(context.getFilename().replace(/.js$/, "")); + const expected = `https://eslint.org/docs/rules/${ruleId}`; + const url = metaDocsUrl.value.value; + + if (url !== expected) { + context.report({ + node: metaDocsUrl.value, + message: `Incorrect url. Expected "${expected}" but got "${url}"` + }); + } + +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: {// eslint-disable-line rulesdir/consistent-docs-url + description: "enforce correct conventions of `meta.docs.url` property in core rules", + category: "Internal", + recommended: false + }, + + schema: [] + }, + + create(context) { + return { + AssignmentExpression(node) { + if (node.left && + node.right && + node.left.type === "MemberExpression" && + node.left.object.name === "module" && + node.left.property.name === "exports") { + + checkMetaDocsUrl(context, node.right); + } + } + }; + } +}; diff --git a/tools/internal-rules/no-invalid-meta.js b/tools/internal-rules/no-invalid-meta.js index 8082d1000ae..670cd0899fa 100644 --- a/tools/internal-rules/no-invalid-meta.js +++ b/tools/internal-rules/no-invalid-meta.js @@ -151,7 +151,7 @@ function isCorrectExportsFormat(node) { module.exports = { meta: { - docs: { + docs: {// eslint-disable-line rulesdir/consistent-docs-url description: "enforce correct use of `meta` property in core rules", category: "Internal", recommended: false