-
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
chipper should be lint-able #92
Comments
@samreid @jonathanolson @jbphet Does anyone mind if I move all chipper JavaScript files under chipper/js, so that it will be lint-able? |
Are you planning to change the *-config.js files for each simulation? They currently reference: paths like |
I agree we should try to move things under chipper/js, keeping the directory structure as much as possible. For instance we will have: chipper/js/requirejs-plugins/ Like I mentioned above, this will affect all config files, and it is worth briefly checking (by copy/paste to the js directory) that our other js files will have a chance of passing hint. @pixelzoom feel free to proceed if you wish or let me know if you'd like me to do so. |
Curiously due to phetsims/build-a-molecule#71, BAM is now linting chipper files under js/. Does it make sense for all sims to have chipper in their dependencies like that? |
@samreid asked:
No, I haven't. But if it's not possible to make some chipper code conform to PhET's jshint standards, I think it would be preferable to disable specific warnings (e.g. @jonathanolson asked:
chipper should be lint-able independently of sims or other repos. |
@samreid asked:
Yes. I'm proposing to move chipper/requirejs-plugins to chipper/js/requirejs-plugins, and change all sim *-config.js to reflect the new location. Also proposing to move chipper/grunt to chipper/js/grunt. Then fix paths in chipper/js/grunt/Gruntfile.js, and in all sim top-level Gruntfile.js files. |
This issue was moved out of #62.
chipper contains JS code, and we currently have no build support for linting it. The JS code includes:
• chipper/requirejs-plugins/ - A quick look at these files shows that they will fail lint. (Hence the 'bug' label for this issue.) Some files are missing 'use strict'. And there may be other issues that we don't know about.
• chipper/grunt/ - implementation of grunt tasks, is not currently linted.
• And in phetsims/phetcommon#23, we decided to consolidate 'check' scripts into initialize-globals.js and relocate under chipper.
The easiest (and most consistent) solution would be to put all JS code under chipper/js/, so that the existing
grunt lint
works. Another alternative would be to add something to package.json that enumerates the JS-source directories. My preference would be to put all JS source under js/.Assigning to @samreid for comment, and since he's handling #62.
The text was updated successfully, but these errors were encountered: