-
Notifications
You must be signed in to change notification settings - Fork 739
Reduce quote escaping by using template literals #788
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
Comments
To clarify, this should be limited to only our tests (because those use ES6). Once we drop support for node 4/5, we can expand this to cover the whole source tree. Preferring template literals for all of the tests might be a bit harsh, but preferring them over string concatenation sound reasonable. |
I would be happy to have a crack at this gruntwork. It seems pretty simple, if a little tedious(hence the 'chore' label, I guess). So I cloned the repo and ran Is that right - 51 package vulnerabilities? I figure I gotta be doing something wrong. (Ubuntu 18.04, node 12.7.0, npm 6.11.3) Fortunately, it seems that only one of them is considered to be a Do you think I should raise this as a separate issue? |
@blubrick yes, please file a separate issue. I'm happy to take a look at the report (and would also appreciate PRs to update flagged packages if doing so does not break the project). |
Filed as #969 |
This swaps out quote characters to limit how often we need to escape strings. This is just to improve code readability. Almost all of the changes could be done without changes to .eslintrc, however this amends the lint rule to also permit backtick strings which can be useful to eliminate a few extra instances of quote escaping. Fixes issue #788 Test: npm run lint
This swaps out quote characters to limit how often we need to escape strings. This is just to improve code readability. Almost all of the changes could be done without changes to .eslintrc, however this amends the lint rule to also permit backtick strings which can be useful to eliminate a few extra instances of quote escaping. Fixes issue #788 Test: npm run lint
This swaps out quote characters to limit how often we need to escape strings. This is just to improve code readability. Almost all of the changes could be done without changes to .eslintrc, however this amends the lint rule to also permit backtick strings which can be useful to eliminate a few extra instances of quote escaping. Fixes issue shelljs#788 Test: npm run lint
I noticed that we're escaping quote characters in some of our test descriptions (example). We should be able to avoid this by preferring template literals for such scenarios. The motivation is to improve readability.
We should also consider:
The text was updated successfully, but these errors were encountered: