Add "lint:eslint:fix" task
This commit is contained in:
parent
22fd27bba9
commit
723a6d9e55
1 changed files with 12 additions and 5 deletions
17
Rakefile.rb
17
Rakefile.rb
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue