From 6cc5229c0ecde7cc6847f43cb169dd3b668413b8 Mon Sep 17 00:00:00 2001 From: Landon Abney Date: Mon, 8 Jan 2018 14:05:18 -0800 Subject: [PATCH] Docs: Add URL to rule documentation to the metadata (#10) ESLint v4.15.0 added an official location for rules to store a URL to their documentation in the rule metadata in eslint/eslint#9788. This adds the URL to all the existing rules so anything consuming them can know where their documentation is without having to resort to external packages to guess. --- lib/rules/disable-enable-pair.js | 1 + lib/rules/no-aggregating-enable.js | 1 + lib/rules/no-duplicate-disable.js | 1 + lib/rules/no-restricted-disable.js | 1 + lib/rules/no-unlimited-disable.js | 1 + lib/rules/no-unused-disable.js | 1 + lib/rules/no-unused-enable.js | 1 + lib/rules/no-use.js | 1 + 8 files changed, 8 insertions(+) diff --git a/lib/rules/disable-enable-pair.js b/lib/rules/disable-enable-pair.js index 20e0f37..3144696 100644 --- a/lib/rules/disable-enable-pair.js +++ b/lib/rules/disable-enable-pair.js @@ -22,6 +22,7 @@ module.exports = { description: "requires a `eslint-enable` comment for every `eslint-disable` comment", category: "Best Practices", recommended: true, + url: "https://github.com/mysticatea/eslint-plugin-eslint-comments/tree/master/docs/rules/disable-enable-pair.md", }, fixable: false, schema: [{ diff --git a/lib/rules/no-aggregating-enable.js b/lib/rules/no-aggregating-enable.js index d0e6bdc..9c444ce 100644 --- a/lib/rules/no-aggregating-enable.js +++ b/lib/rules/no-aggregating-enable.js @@ -51,6 +51,7 @@ module.exports = { description: "disallows `eslint-enable` comments for multiple `eslint-disable` comments", category: "Best Practices", recommended: true, + url: "https://github.com/mysticatea/eslint-plugin-eslint-comments/tree/master/docs/rules/no-aggregating-enable.md", }, fixable: false, schema: [], diff --git a/lib/rules/no-duplicate-disable.js b/lib/rules/no-duplicate-disable.js index bb438e9..909359d 100644 --- a/lib/rules/no-duplicate-disable.js +++ b/lib/rules/no-duplicate-disable.js @@ -22,6 +22,7 @@ module.exports = { description: "disallows duplicate `eslint-disable` comments", category: "Best Practices", recommended: true, + url: "https://github.com/mysticatea/eslint-plugin-eslint-comments/tree/master/docs/rules/no-duplicate-disable.md", }, fixable: false, schema: [], diff --git a/lib/rules/no-restricted-disable.js b/lib/rules/no-restricted-disable.js index 7dd0418..3288b48 100644 --- a/lib/rules/no-restricted-disable.js +++ b/lib/rules/no-restricted-disable.js @@ -58,6 +58,7 @@ module.exports = { description: "disallows `eslint-disable` comments about specific rules", category: "Stylistic Issues", recommended: false, + url: "https://github.com/mysticatea/eslint-plugin-eslint-comments/tree/master/docs/rules/no-restricted-disable.md", }, fixable: false, schema: { diff --git a/lib/rules/no-unlimited-disable.js b/lib/rules/no-unlimited-disable.js index 809c008..ccfca2d 100644 --- a/lib/rules/no-unlimited-disable.js +++ b/lib/rules/no-unlimited-disable.js @@ -30,6 +30,7 @@ module.exports = { description: "disallows `eslint-disable` comments without rule names", category: "Best Practices", recommended: true, + url: "https://github.com/mysticatea/eslint-plugin-eslint-comments/tree/master/docs/rules/no-unlimited-disable.md", }, fixable: false, schema: [], diff --git a/lib/rules/no-unused-disable.js b/lib/rules/no-unused-disable.js index 16fc17b..7a7d3ab 100644 --- a/lib/rules/no-unused-disable.js +++ b/lib/rules/no-unused-disable.js @@ -22,6 +22,7 @@ module.exports = { description: "disallows unused `eslint-disable` comments", category: "Best Practices", recommended: true, + url: "https://github.com/mysticatea/eslint-plugin-eslint-comments/tree/master/docs/rules/no-unused-disable.md", }, fixable: false, schema: [], diff --git a/lib/rules/no-unused-enable.js b/lib/rules/no-unused-enable.js index 9184947..b67b23b 100644 --- a/lib/rules/no-unused-enable.js +++ b/lib/rules/no-unused-enable.js @@ -22,6 +22,7 @@ module.exports = { description: "disallows unused `eslint-enable` comments", category: "Best Practices", recommended: true, + url: "https://github.com/mysticatea/eslint-plugin-eslint-comments/tree/master/docs/rules/no-unused-enable.md", }, fixable: false, schema: [], diff --git a/lib/rules/no-use.js b/lib/rules/no-use.js index df221b2..b1a375e 100644 --- a/lib/rules/no-use.js +++ b/lib/rules/no-use.js @@ -30,6 +30,7 @@ module.exports = { description: "disallows ESLint directive-comments", category: "Stylistic Issues", recommended: false, + url: "https://github.com/mysticatea/eslint-plugin-eslint-comments/tree/master/docs/rules/no-use.md", }, fixable: false, schema: [{