Open metapraveen opened 8 years ago
So I think we should just add a variable parameter to the rake task. When we do rake test
, we can do
rake test TEST=path/to/my_test.rb TESTOPTS='--name=test_a_feature'
So I'm thinking we could add something so you can do
rake eslint:run ESLINTOPTS='--cached'
The only downside I see is that we probably should not mirror this capability in the web interface because I haven't thought of a good way to do it yet. Also, maybe people don't use the web interface?
I certainly love the web interface when I am manually fixing warnings/errors by hand. It helps a lot, and reduces the strain of having to read terminal output, which isn't always pretty.
I do wish there was an easier way to provide flags, and think it is critical considering eslint can attempt to auto correct issues with the --fix
flag. Rubocop has an excellent way of handling flags like that, and I would very much like to see this be a thing with eslint-rails.
I will consider taking a look at this perhaps contributing in order to make this a reality 😎🤔🍻
So I forked this repo and wrote in code to allow for auto-correction, as well as a few more goodies. Seeing as this repo isn't really being actively maintained, I will keep the fork separate unless it is desired that they be merged.
New features include
force_deafult
I'll be continuing my own support for this in my free time, and intend to include many more features and improvements :)
Sorry if I have missed any obvious point, how do I pass option to eslint while running
rake eslint:run
I am adding this gem to my rails project and I want to run eslint on only chnaged or new files, so I need to pass option--cache
to eslint