Skip to content
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

Closed
timabbott opened this issue Mar 15, 2016 · 5 comments
Closed

Migrate from jslint to eslint for the javascript linter #535

timabbott opened this issue Mar 15, 2016 · 5 comments

Comments

@timabbott
Copy link
Sponsor Member

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...

@timabbott
Copy link
Sponsor Member Author

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.

@timabbott timabbott added this to the 2016 roadmap milestone Apr 29, 2016
@timabbott
Copy link
Sponsor Member Author

Just noting that @trojan is planning to work on this.

@brainwane
Copy link
Contributor

@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!

@taranjeet
Copy link
Contributor

@brainwane : You can assign this to a new contributor. Right now much busy at my workplace.

@timabbott timabbott modified the milestones: Zulip roadmap, Old roadmap Nov 18, 2016
@timabbott
Copy link
Sponsor Member Author

This was fixed via #2246. While technically the description of this issue was about replacing jslint, the actual core goal was to integrate and add eslint so that we can start configuring more advanced linter rules; we can remove jslint now at our leisure.

brockwhittaker pushed a commit to brockwhittaker/zulip that referenced this issue Nov 30, 2016
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.
amanagr pushed a commit to amanagr/zulip that referenced this issue Aug 21, 2020
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants