add Rake tasks eslint and lint:javascript

This commit is contained in:
winniehell 2016-07-23 00:06:17 +02:00
parent bf389a79b7
commit bf418fcd75
2 changed files with 16 additions and 0 deletions

7
lib/tasks/eslint.rake Normal file
View File

@ -0,0 +1,7 @@
unless Rails.env.production?
desc "GitLab | Run ESLint"
task :eslint do
system("npm", "run", "eslint")
end
end

9
lib/tasks/lint.rake Normal file
View File

@ -0,0 +1,9 @@
unless Rails.env.production?
namespace :lint do
desc "GitLab | lint | Lint JavaScript files using ESLint"
task :javascript do
Rake::Task['eslint'].invoke
end
end
end