-
-
Notifications
You must be signed in to change notification settings - Fork 367
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
43 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Deprecated Rules | ||
|
||
## prefer-exponentiation-operator | ||
|
||
This rule is deprecated in favor of the built-in ESLint [`prefer-exponentiation-operator`](https://eslint.org/docs/rules/prefer-exponentiation-operator) rule. | ||
|
||
## regex-shorthand | ||
|
||
This rule was renamed to [`better-regex`](rules/better-regex.md). |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
'use strict'; | ||
const packageJson = require('../../package'); | ||
const repoUrl = 'https://github.com/sindresorhus/eslint-plugin-unicorn'; | ||
|
||
function createDeprecatedRules(data) { | ||
const rules = {}; | ||
for (const [ruleId, replacedBy = []] of Object.entries(data)) { | ||
rules[ruleId] = { | ||
create: () => ({}), | ||
meta: { | ||
docs: { | ||
url: `${repoUrl}/blob/v${packageJson.version}/docs/deprecated-rules.md#${ruleId}` | ||
}, | ||
deprecated: true, | ||
replacedBy: Array.isArray(replacedBy) ? replacedBy : [replacedBy] | ||
} | ||
}; | ||
} | ||
} | ||
|
||
module.exports = createDeprecatedRules; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.