-
-
Notifications
You must be signed in to change notification settings - Fork 29
Better abstract string concatenation #217
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
I wonder if this could be done as a post-processing step using eslint --fix or some more aggressive prettier configuration. |
Prettier has a stance of not changing ASTs, so I guess that'd be off. ESLint has no-useless-concat, but sadly no fixer for it. This is easy to do even without a postprocessor though, so maybe we should just write the code. |
I already have code for this in https://github.com/ExE-Boss/webidl2js/tree/refactor/precompute-concatenated-strings from a month ago, but I wasn’t sure whether it was something that was needed, and now it needs rebasing. |
Due to the way we construct type conversions, oftentimes we see unidiomatic code like
webidl2js/test/__snapshots__/test.js.snap
Line 167 in 7d45dfc
Related to this is #204, but this seems mostly orthogonal and more tractable.
The text was updated successfully, but these errors were encountered: