1 task "eslint" => "eslint:check"
5 Rails.root.join("bin", "yarn").to_s
9 Rails.root.join("config", "eslint.json").to_s
13 Rails.application.assets.each_file.select do |file|
14 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