adding eslint

This commit is contained in:
Mark Moser
2016-08-09 11:36:52 -05:00
parent 5f395dcf41
commit 084a1a2326
13 changed files with 190 additions and 144 deletions

View File

@ -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