Skip to content

Commit

Permalink
Docs: supported rules + link
Browse files Browse the repository at this point in the history
  • Loading branch information
aladdin-add committed Feb 10, 2019
1 parent 7289267 commit 7c5a8f4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
8 changes: 1 addition & 7 deletions lib/rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@

const fs = require("fs");
const path = require("path");
const packageMetadata = require("../package");
const PLUGIN_VERSION = packageMetadata.version;

// ------------------------------------------------------------------------------
// Plugin Definition
// ------------------------------------------------------------------------------

/**
* Loads a given rule from the filesystem and generates its documentation URL
Expand All @@ -27,7 +21,7 @@ function loadRule(ruleName) {
const rule = require(path.join(__dirname, "rules", ruleName));

rule.meta.docs.url =
`https://github.com/aladdin-add/eslint-plugin-autofix/tree/v${PLUGIN_VERSION}/docs/rules/${ruleName}.md`;
`https://eslint.org/docs/rules/${ruleName}`;

return rule;
}
Expand Down
6 changes: 3 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ add prefix "autofix" to the rulename in eslintrc:

## Supported rules

+ 🛠no-debugger
+ 🛠no-console
+ 🛠prefer-spread
+ 🛠[no-debugger](https://eslint.org/docs/rules/no-debugger)
+ 🛠[no-console](https://eslint.org/docs/rules/no-console)
+ 🛠[prefer-spread](https://eslint.org/docs/rules/prefer-spread)

## Acknowledgement
+ [ESLint](https://eslint.org)
Expand Down

0 comments on commit 7c5a8f4

Please sign in to comment.