appfolio / eslint-rails

MIT License
39 stars 22 forks source link

Print source filename #20

Closed dkniffin closed 8 years ago

dkniffin commented 8 years ago

It'd be great if this gem could also print the filename the error was found in, specifically for when we run it on the whole app. It kinda works to know where it is in the application.js, but with a large project, it's hard to tell what source file that maps to.

I started looking into this, and it looks like right now there's no concept of where each line of application.js came from. We could loop over the files from sprockets, using Rails.application.assets.each_file, but I think we'd run into linting issues where variables are defined in different files. I may dig into this some more and see if there's a good solution, but I'd also love to hear some feedback on how feasible this sounds.

dkniffin commented 8 years ago

@jonkessler This is resolved now.