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