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

Best way to ignore //= requires in rails? #918

Closed
tom-sherman opened this issue Jun 17, 2017 · 2 comments · Fixed by standard/eslint-config-standard#89
Closed

Best way to ignore //= requires in rails? #918

tom-sherman opened this issue Jun 17, 2017 · 2 comments · Fixed by standard/eslint-config-standard#89

Comments

@tom-sherman
Copy link

So with the rails asset pipeline you do things like

//= link_directory ../javascripts .js

What's the best way to ignore these missing space offences?

@tom-sherman
Copy link
Author

tom-sherman commented Jun 17, 2017

Ok there was an obvious solution that I somehow missed; enclose the requires in an eslint-disable comment like so:

/* eslint-disable */
//= require jquery
//= require jquery_ujs
//= require turbolinks
//
// Pull compiled from /public/assets/javascripts
//= require global
/* eslint-enable */

@feross
Copy link
Member

feross commented Jun 21, 2017

We should consider not treating = as an error, like we've done for other extensions: https://github.com/feross/eslint-config-standard/blob/bff0a4bb3447b90fc65a2de57be5d123842f6f69/eslintrc.json#L162-L165

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants