Add "lint:eslint:fix" task

This commit is contained in:
0x1eef 2023-01-05 00:14:54 -03:00
parent 22fd27bba9
commit 723a6d9e55

View file

@ -86,16 +86,23 @@ namespace :env do
end end
end end
namespace :linter do namespace :lint do
desc "Run the Ruby linter" desc "Run rubocop (Ruby)"
task :ruby do task :rubocop do
sh "bundle exec rubocop lib/ src/" sh "bundle exec rubocop lib/ src/"
end end
desc "Run the TypeScript linter" desc "Run eslint (TypeScript)"
task :typescript do task :eslint do
sh "npm run eslint" sh "npm run eslint"
end end
namespace :eslint do
desc "Run eslint with the --fix option (TypeScript)"
task :fix do
sh "npm run eslint-autofix"
end
end
end end
task lint: ["linter:ruby", "linter:typescript"] task lint: ["linter:ruby", "linter:typescript"]
task default: "deploy:local" task default: "deploy:local"