Closed nzakas closed 3 years ago
Welcome! 👋
Thank you for posting this issue. 🙇🏼♂️ As I am currently on vacation I will come back to you begin of August. Stay safe!
Sorry, just seeing this. Busy times.
I am torn on this one. I'd say it's in general rare that these kinds of strings exist (just in comparison to what's else in a code base). And for those cases it could be simply disabled for the line - on purpose by the developer.
Yes, one-off disabling was created for such instances. In my case, though, this wasn’t just a one-off occurrence, and because I don’t want to litter my code with disable comments my only choice is to disable the entire rule. Rules get used more when there are some basic options that let people opt-out of some cases.
Up to you, of course, just speaking from experience.
Point well made. Thanks for raising it.
I'd put it down as an enhancement in the next iteration to allow disabling text occurrences, but would leave the default on "on".
Just released v2.1.0 that switched string value linting to opt-in.
First, thanks for creating this plugin. I think it will be quite helpful to the JavaScript community.
I'd like to suggest adding an option to not search inside of strings. Frequently, the content of strings cannot be changed without changing the meaning of the text inside the strings. For example, if I'm running
execSync("git fetch origin/master")
, I can't actually change the use of "master" until the Git repository is updated.I'd suggest that the rule not search inside of strings by default and then allow people to turn this ability on with an option.
Thanks again.