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
namespace :linter do
desc "Run the Ruby linter"
task :ruby do
namespace :lint do
desc "Run rubocop (Ruby)"
task :rubocop do
sh "bundle exec rubocop lib/ src/"
end
desc "Run the TypeScript linter"
task :typescript do
desc "Run eslint (TypeScript)"
task :eslint do
sh "npm run eslint"
end
namespace :eslint do
desc "Run eslint with the --fix option (TypeScript)"
task :fix do
sh "npm run eslint-autofix"
end
end
end
task lint: ["linter:ruby", "linter:typescript"]
task default: "deploy:local"