New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecate prefer-exponentiation-operator
rule
#484
Deprecate prefer-exponentiation-operator
rule
#484
Conversation
14ae67d
to
83208a8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small comment on testing, but otherwise looks good to me!
t.is(Object.keys(usageRules).length - ignoredRules.length, ruleFiles.length, 'There are more rules in readme.md ## Usage than rule files.'); | ||
t.is(Object.keys(rules).length, ruleFiles.length, 'There are more rules in readme.md ## Rules than rule files.'); | ||
t.is(Object.keys(usageRules).length - ignoredRules.length, availableRules.length, 'There are more rules in readme.md ## Usage than rule files.'); | ||
t.is(Object.keys(rules).length, availableRules.length, 'There are more rules in readme.md ## Rules than rule files.'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be worth it to add a check that ensures deprecated rules are described in the readme?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it's really nessary.
readme.md
Outdated
|
||
|Deprecated rule|Replaced by|Rule Details| | ||
|:--|:--|:--| | ||
|[unicorn/prefer-exponentiation-operator](docs/rules/prefer-exponentiation-operator.md)|[prefer-exponentiation-operator](https://eslint.org/docs/rules/prefer-exponentiation-operator)|Prefer the exponentiation operator over `Math.pow()`| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should use a table for this. Markdown tables are annoying to edit and comes with little benefit here. Not every deprecated rule will have a replacement either. Better to just use a plain list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
…m:fisker/eslint-plugin-unicorn into deprecated-prefer-exponentiation-operator
f158a41
to
9b288d8
Compare
9b288d8
to
1d6aad2
Compare
Deprecate
unicorn/prefer-exponentiation-operator
rule, replace it with ESLint official ruleprefer-exponentiation-operator
I ran
prefer-exponentiation-operator
over our test cases, little difference:fixes #483