-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Provide config files for format and linting #336
Comments
Yes .jshintrc would be nice. It would suffice if each .js file had (the same) jshint options in it which is currently not the case.. Having jshint in files would have the advantage of not putting too many files in the root of the project which have nothing to do with the python code.. Of course jshintrc could also be put in the js/ folder but I find this a bit unconventional. But the big question would be: what options to choose and who defines those.. Regarding .jsbeautifyrc: same thing about having it in the root as with jshintrc. A code snippet on how to run it before a commit would be enough for me.. |
I'd put the files into the js folder; There are two sub-projects and like you wrote, it doesn't make sense to have the settings file global even over the python code. So, from the point of view of the js sub-project, these settings would be in its 'root' folder. As for which options to choose, my suggestion is:
Regarding the script: I'd opt for a Grunt based build with a small manually written task that runs the project on itself. |
Actually you could have the jshint settings in package.json. As there already is a package.json in the root there will be no overhead. Furthermore you could use a 'script' in package.json to run jshint/jsbeautifier via npm (similar to the existing npm test command) This would probably be the cleanest solution with no extra files and no 'special' directives in the various .js files. For an example package.json see: https://github.com/jshint/jshint/blob/master/package.json#L51 |
Having the settings not in their respective standard files would be contrary to my motivation: I want to have these settings files in order to work with editors, such as SublimeText in my case. The corresponding plugins (jshint, jsbeautifier) look for the respective standard settings files and apply the rules. |
@dertseha - This sounds like a fine idea. Please submit a pull request. |
Moved this out of 1.5.0 since we're seeing no movement on it. It can wait. |
It would be great to have .jsbeautifyrc and .jshintrc files for the project (Possibly an .editorconfig as well).
Apart from easier contribution, eating your own dog food is always good.
The text was updated successfully, but these errors were encountered: