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
Migrate from jslint to eslint for the javascript linter #535
Comments
This is probably a manageable task for someone new to the project, since an initial goal would be to get eslint to check for the issues we're checking with jslint and throw no errors (I'm sure there are guides on the internet for how to do this) and then we can go from there. |
Just noting that @trojan is planning to work on this. |
@trojan Are you still planning to work on this? If so, please speak up here by Wednesday the 21st. If not, I'd like to suggest it to a new contributor. Thanks! |
@brainwane : You can assign this to a new contributor. Right now much busy at my workplace. |
This was fixed via #2246. While technically the description of this issue was about replacing |
This commit adds a basic eslintrc that emulates jslint defaults. Rules that conflict with our existing code have been switched to warnings instead of errors. Globals have been added to the eslintrc. The bundled js file (generated by webpack) and blueslip.js are ignored with .eslintignore. To display warnings, run npm run lint-loud. This runs eslint without the --quiet option on static/js and frontend_tests. npm run --silent lint is run by tools/lint-all (in addition to jslint). The --silent option is used to suppress the default output from npm run. Fixes zulip#535.
This commit adds a basic eslintrc that emulates jslint defaults. Rules that conflict with our existing code have been switched to warnings instead of errors. Globals have been added to the eslintrc. The bundled js file (generated by webpack) and blueslip.js are ignored with .eslintignore. To display warnings, run npm run lint-loud. This runs eslint without the --quiet option on static/js and frontend_tests. npm run --silent lint is run by tools/lint-all (in addition to jslint). The --silent option is used to suppress the default output from npm run. Fixes zulip#535. (imported from zulip/zulip commit 497c770)
jslint is pretty clearly no longer the preferred choice for javascript linter, and eslint has a pretty active plugin ecosystem which should make it easy to add new options.
Since the projects likely have different configurations by default, the way I'd want to do this project is to first replace jslint with eslint configured to check as close to the same rules as we have jslint doing (to minimize the amount of refactoring involved in switching), and then if we want to, we can incrementally improve the eslint configuration...
The text was updated successfully, but these errors were encountered: