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

Comments

2 participants
@tom-sherman
Copy link

commented Jun 17, 2017

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

This comment has been minimized.

Copy link
Author

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

This comment has been minimized.

Copy link
Member

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.
You can’t perform that action at this time.