-
Notifications
You must be signed in to change notification settings - Fork 942
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 eslint-plugin-erb to provide linting of our .js.erb files #5549
Conversation
…b files These have been flagged by eslint-plugin-erb, and need to be fixed before that plugin can be enabled.
✖ 40 problems (31 errors, 9 warnings) Is |
We run eslint via I'd like to get it running directly at some point, to improve integration between eslint and IDEs, which are more likely to support eslint directly than via rails tasks. Maybe there's also a way to get the |
According to https://github.com/openstreetmap/openstreetmap-website/blob/master/lib/tasks/eslint.rake#L23 we would need to use It's not documented anywhere unfortunately. Would be a good fit for https://github.com/openstreetmap/openstreetmap-website/blob/master/CONTRIBUTING.md#coding-style Situation before: (file: /app/assets/javascripts/osm.js.erb)
After running eslint:fix:
|
|
Superseded by #5559 |
Fixes #5523
This is a draft, since our .js.erb files don't currently pass the linting. I've fixed the straightforward ones in #5548 but there are a few more to complete before this can be merged.
I've opened this pull request to make it easier for other developers (who have more JS skills) to help. My recommendation is to checkout this pull request locally, fix the errors, and submit those fixes separately as PRs (e.g. cherry-pick your fixes onto our master branch).