[openstreetmap/openstreetmap-website] Replace eslint-rails-ee with direct calls to eslint (#2209)
notifications at github.com
Wed Jun 12 08:56:03 UTC 2019
gravitystorm commented on this pull request.
Normally I would hesitate about removing a gem and doing it ourselves, but I don't see much activity in either of the gems mentioned so hey-ho.
I'm also totally in favour of yarn instead of npm, beyond it being the rails default.
> @@ -0,0 +1,27 @@
+task "eslint" => "eslint:check"
+namespace "eslint" do
+ def yarn_path
+ Rails.root.join("bin", "yarn").to_s
+ def config_file
+ Rails.root.join("config", "eslint.json").to_s
+ def js_files
+ require File.dirname(__FILE__) + "/../../config/environment"
Instead of manually requiring the environment, rake tasks can be marked as depending on the rails environment e.g.
`task :check => :environment do`
- bundle exec rubocop -f fuubar
- - bundle exec rake eslint:run_all
+ - bundle exec rake eslint
We should add this to CONTRIBUTING.md in the Coding Style section. I mean, I expect a change like this to have a corresponding change to the documentation, but the documentation mentioning eslint is missing :smile:
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rails-dev