-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
tools: simplify no-unescaped-regexp-dot rule #14561
Conversation
//------------------------------------------------------------------------------ | ||
// Rule Definition | ||
//------------------------------------------------------------------------------ | ||
|
||
module.exports = function(context) { | ||
const sourceCode = context.getSourceCode(); | ||
const s = context.getSourceCode(); |
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 think the original, more descriptive variable name should be kept.
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.
Is it sufficiently more desirable to have a descriptive variable name that we're OK that it requires a line break in the object literal (to wrap at 80 chars due to the descriptive variable name) on line 20?
I'm OK either way. Just want to make sure the cost of the descriptive variable name is taken into account.
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.
You don't need to break the object format if you don't want to. You could temporarily store all or part of the loc
in a separate variable to avoid that.
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.
OK, restored the longer name etc.
no-unescaped-regexp-dot ESLint custom rule contains feature detection that is not needed on master or the v6.x-staging branch. The rule does not exist in the v4.x-staging branch. Remove the unnecessary complexity.
Failures in CI are a concern but are not related to this PR. |
no-unescaped-regexp-dot ESLint custom rule contains feature detection that is not needed on master or the v6.x-staging branch. The rule does not exist in the v4.x-staging branch. Remove the unnecessary complexity. PR-URL: #14561 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
Landed in a92a5c1 |
no-unescaped-regexp-dot ESLint custom rule contains feature detection that is not needed on master or the v6.x-staging branch. The rule does not exist in the v4.x-staging branch. Remove the unnecessary complexity. PR-URL: #14561 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
no-unescaped-regexp-dot rule doesn't exist on LTS right now. |
@MylesBorins It was added in #11834 which has not yet been backported. |
no-unescaped-regexp-dot ESLint custom rule contains feature detection
that is not needed on master or the v6.x-staging branch. The rule does
not exist in the v4.x-staging branch. Remove the unnecessary complexity.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
tools