-
-
Notifications
You must be signed in to change notification settings - Fork 35.6k
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
Add support for linting example scripts #17225
Conversation
Maybe it's better to first fix the styles before merging this. Otherwise travis will die for all PRs in the next time until somebody cleans everything up. I'd like to avoid that since everyone will ignore travis and miss real/important linter/test errors. |
Oh I definitely agree. I added this now just to propose the idea (and see how many linting errors there actually were). I'd start fixing the issues now but with #16920 it seems unclear whether or not it's worth proposing new fixes to the js example files or waiting to lint the jsm ones. Any thoughts? |
I think we can wait. The issue is not that urgent. I would proceed with this PR as soon as #16920 lands. |
Okay, since #16920 will not be merged, it's okay to solve the linter issues for all js files and the run It seems that almost all linter errors are produce in the
we would have to do this:
So the padding is applied within the string. I'm not sure somebody want's to change all the files by hand... |
@Mugen87 Sounds good to me -- I'll update this PR when I get the chance and can start contributing linting fixes to the examples. |
…amples # Conflicts: # package.json
Okay this should pass now -- it looks like there are still some linter warnings mostly of the "no-unused-vars" flavor but those shouldn't cause CI to break and can be fixed in subsequent PRs. |
I remember now that @mrdoob does not want to apply strict linter rules to the examples code in order to simplify contribution. I think we can get this merged if we let the current lint command unchanged ( |
@Mugen87 Sounds good -- I've updated the PR so there are just The |
LGTM! |
It actually lints the TS files in |
Yup! Sorry looks like I forgot to commit that change. I've added it now! |
@mrdoob This looks good now! |
Let's merge this 👍 |
Thanks! |
I feel like I've see quite a few PRs that introduce code-style issues into the examples files -- this should make it easier to automatically catch those problems. This is can be changed to lint the module files (or both?) once #16920 is merged.
Note this is expected to fail until the linting issues are fixed.
In another PR we can enable linting on the HTML files