Should no-irregular-whitespace skip template strings by default?
See original GitHub issueWhat rule do you want to change?
no-irregular-whitespace
Does this change cause the rule to produce more or fewer warnings?
Fewer
How will the change be implemented? (New option, new default behavior, etc.)?
New default behavior
Please provide some example code that this change will affect:
/* eslint no-irregular-whitespace: error */
` <-- non-breaking space`;
What does the rule currently do for this code?
3:2 - Irregular whitespace not allowed. (no-irregular-whitespace)
What will the rule do after it’s changed?
No error (template strings will be skipped by default, just like other strings)
This is currently working as intended since we have skipTemplates: true
option available. The question here is, should we change the default behavior with the 5.0 release so that template strings are skipped by default? Seems like this would be the more natural behavior given that skipStrings
is also true by default. My guess is we added skipTemplates
in a semver-minor release and just never went back to change the default behavior around templates.
The change would be to have skipTemplates
default to true
.
Inspired by #10159.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (4 by maintainers)
Top GitHub Comments
Shouldn’t this use the feature request format instead of bug report format?
Unfortunately, it looks like there wasn’t enough interest from the team or community to implement this change. While we wish we’d be able to accommodate everyone’s requests, we do need to prioritize. We’ve found that issues failing to reach accepted status after 21 days tend to never be accepted, and as such, we close those issues. This doesn’t mean the idea isn’t interesting or useful, just that it’s not something the team can commit to.
Thanks for contributing to ESLint and we appreciate your understanding.