1 task "eslint" => "eslint:check"
4 Rails.root.join("bin/yarn").to_s
8 Rails.root.join("config/eslint.json").to_s
12 Rails.application.assets.each_file.select do |file|
13 file.ends_with?(".js") && !file.match?(%r{/(gems|vendor|i18n|node_modules)/})
18 task :check => :environment do
19 system(yarn_path, "run", "eslint", "-c", config_file, *js_files) || abort
22 task :fix => :environment do
23 system(yarn_path, "run", "eslint", "-c", config_file, "--fix", *js_files) || abort