-
Notifications
You must be signed in to change notification settings - Fork 14
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
Lint rule: Unicode characters in JS should be escaped with ASCII #732
Comments
Here's a stack overflow page that may help: @ariel-phet can this be completed by another developer? |
Going to look for a volunteer/voluntold at dev meeting |
Is this something developers feel strongly about? Our minifier just unescapes those and puts them in raw unicode in our built files, but if people prefer the limit than I wouldn't object to it. |
Keep in mind that there are probably all sorts of unescaped unicode characters in the string translation files (in the babel repo), so these should be excluded from any sort of check like this. We should decide if the English strings need to adhere to this rule and, if so, we may need to check them a bit differently since they are in a JSON file. |
I believe our lint tools are set up around JS at the moment. |
Presumably this would only need to apply to js code, I'm not sure JSON is linted. It seems like this was decided in phetsims/wave-interference#285 (comment). I am totally fine with this restriction, and it makes sense, but @pixelzoom do you mind explaining your reasoning for that post. Regardless of the need, I have the following thoughts on the rule itself:
|
@zepumph asked:
See phetsims/wave-interference#285 (comment) in that same issue. |
Discussed at dev meeting: 09/19/19 Devs don't mind a new rule to handle this. Let’s make the lint rule, but if it takes too much effort we can bail. @jessegreenberg would take care of making this rule. |
@jessegreenberg please note that a new lint rule is not needed here. |
From phetsims/wave-interference#285 (comment). Sims should use ASCII. When unicode is needed, it should be escaped.
The text was updated successfully, but these errors were encountered: