29 lines
622 B
Ruby
29 lines
622 B
Ruby
# frozen_string_literal: true
|
|
|
|
namespace :format do
|
|
desc "Apply all formats"
|
|
task apply: %i[format:rubocop:apply format:eslint:apply]
|
|
|
|
desc "Run rubocop (Ruby)"
|
|
task :rubocop do
|
|
sh "bundle exec rubocop --config etc/rubocop.yml"
|
|
end
|
|
|
|
desc "Apply rubocop (Ruby)"
|
|
task :"rubocop:apply" do
|
|
sh "bundle exec rubocop -A --config etc/rubocop.yml"
|
|
end
|
|
|
|
desc "Run eslint (TypeScript)"
|
|
task :eslint do
|
|
sh "npm run eslint"
|
|
end
|
|
|
|
desc "Run eslint (TypeScript)"
|
|
task :"eslint:apply" do
|
|
sh "npm run eslint:apply"
|
|
end
|
|
end
|
|
|
|
desc "Run all formats"
|
|
task format: ["format:rubocop", "format:eslint"]
|