adding eslint
This commit is contained in:
11
Guardfile
11
Guardfile
@ -23,7 +23,7 @@ guard :minitest, spring: true do # , all_after_pass: true
|
||||
end
|
||||
|
||||
guard 'livereload' do
|
||||
watch(%r{app/assets/.+\.(scss|css|js)})
|
||||
watch(%r{app/assets/.+\.(scss|css|js|erb)})
|
||||
watch(%r{app/views/.+\.(erb|haml|slim)$})
|
||||
watch(%r{app/controllers/.+\.rb})
|
||||
watch(%r{app/helpers/.+\.rb})
|
||||
@ -31,7 +31,7 @@ guard 'livereload' do
|
||||
watch(%r{config/locales/.+\.yml})
|
||||
|
||||
# Rails Assets Pipeline
|
||||
watch(%r{(app|vendor)(/assets/\w+/(.+\.(scss|css|js|html|png|jpg))).*}) do |m|
|
||||
watch(%r{(app|vendor)(/assets/\w+/(.+\.(scss|css|js|erb|html|png|jpg))).*}) do |m|
|
||||
"/assets/#{m[3]}"
|
||||
end
|
||||
end
|
||||
@ -41,3 +41,10 @@ guard :rubocop do
|
||||
watch(/Rakefile/)
|
||||
watch(%r{(?:.+/)?\.rubocop\.yml$}) { |m| File.dirname(m[0]) }
|
||||
end
|
||||
|
||||
# ESLint
|
||||
guard :shell, all_on_start: true do
|
||||
watch %r{app/assets/javascripts/*/.*} do |file|
|
||||
`eslint #{file[0]}`
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user