Commit 6d070c81 authored by Steffen van Bergerem's avatar Steffen van Bergerem

Use jshintrb and guard-jshintrb instead of jshint

parent 5115582c
config/.jshint_ignore
\ No newline at end of file
config/.jshint.json
\ No newline at end of file
......@@ -213,6 +213,7 @@ end
group :development do
# Automatic test runs
gem "guard-cucumber", "1.5.3"
gem "guard-jshintrb", "1.1.1"
gem "guard-rspec", "4.5.0"
gem "guard-rubocop", "1.2.0"
gem "guard", "2.12.4", require: false
......@@ -220,8 +221,8 @@ group :development do
gem "rb-inotify", "0.9.5", require: false
# Linters
gem "jshint", "1.3.1"
gem "rubocop", "0.29.1"
gem "jshintrb", "0.3.0"
gem "rubocop", "0.29.1"
# Preloading environment
......
......@@ -317,6 +317,9 @@ GEM
guard (>= 2.0.0)
guard-compat (~> 1.0)
nenv (~> 0.1)
guard-jshintrb (1.1.1)
guard (~> 2.0)
jshintrb
guard-rspec (4.5.0)
guard (~> 2.1)
guard-compat (~> 1.1)
......@@ -366,17 +369,16 @@ GEM
sprockets-rails
js_image_paths (0.0.2)
rails (~> 4.0)
jshint (1.3.1)
execjs (>= 1.4.0)
multi_json (~> 1.0)
therubyracer (~> 0.12.1)
jshintrb (0.3.0)
execjs
multi_json (>= 1.3)
rake
json (1.8.2)
jwt (1.3.0)
kaminari (0.16.3)
actionpack (>= 3.0.0)
activesupport (>= 3.0.0)
kgio (2.9.3)
libv8 (3.16.14.7)
listen (2.8.5)
celluloid (>= 0.15.2)
rb-fsevent (>= 0.9.3)
......@@ -566,7 +568,6 @@ GEM
redis (3.2.1)
redis-namespace (1.5.1)
redis (~> 3.0, >= 3.0.4)
ref (1.0.5)
remotipart (1.2.1)
request_store (1.1.0)
responders (2.1.0)
......@@ -656,9 +657,6 @@ GEM
systemu (2.6.4)
test_after_commit (0.4.0)
activerecord (>= 3.2)
therubyracer (0.12.1)
libv8 (~> 3.16.14.0)
ref
thor (0.19.1)
thread_safe (0.3.4)
tilt (1.4.1)
......@@ -736,6 +734,7 @@ DEPENDENCIES
gon (= 5.2.3)
guard (= 2.12.4)
guard-cucumber (= 1.5.3)
guard-jshintrb (= 1.1.1)
guard-rspec (= 4.5.0)
guard-rubocop (= 1.2.0)
haml (= 4.0.6)
......@@ -747,7 +746,7 @@ DEPENDENCIES
jquery-rails (= 3.1.2)
js-routes (= 1.0.0)
js_image_paths (= 0.0.2)
jshint (= 1.3.1)
jshintrb (= 0.3.0)
json (= 1.8.2)
markerb (= 1.0.2)
messagebus_ruby_api (= 1.0.3)
......
......@@ -37,3 +37,9 @@ guard :rubocop, all_on_start: false, keep_failed: false do
watch(/(?:app|config|db|lib|features|spec)\/.+\.rb$/)
watch(/(config.ru|Gemfile|Guardfile|Rakefile)$/)
end
guard :jshintrb do
watch(/^app\/assets\/javascripts\/.+\.js$/)
watch(/^lib\/assets\/javascripts\/.+\.js$/)
watch(/^spec\/javascripts\/.+\.js$/)
end
......@@ -2,4 +2,3 @@ vendor/assets/javascripts/**.js
lib/assets/javascripts/fileuploader-custom.js
lib/assets/javascripts/jquery.autoresize.js
lib/assets/javascripts/jquery.mentionsInput.js
lib/assets/javascripts/markdown-it-diaspora-linkify.js
files: ['**/*.js']
exclude_paths: [
'vendor/assets/javascripts',
'lib/assets/javascripts'
]
options:
# enforcing options
bitwise: true
camelcase: false
curly: true
eqeqeq: true
forin: true
freeze: true
immed: true
indent: 2
latedef: true
maxlen: false
newcap: true
noarg: true
noempty: true
nonbsp: true
nonew: false
quotmark: false
undef: true
unused: true
# relaxing options
asi: false
boss: false
browser: true
devel: true
eqnull: true
evil: false
expr: false
jasmine: true
jquery: true
lastsemic: true
laxbreak: false
laxcomma: false
loopfunc: false
notypeof: false
scripturl: false
sub: false
supernew: true
globals:
"_": true
"Backbone": true
"gon": true
"Handlebars": true
"HandlebarsTemplates": true
"ImagePaths": true
"jsxc": true
"MBP": true
"Routes": true
"OSM": true
"parse_url": true
"punycode": true
"qq": true
"loginAs": true
"logout": true
"spec": true
"context": true
"factory": true
"stubView": true
"exports": true
"app": true
"Diaspora": true
"Mentions": true
"PosixBracketExpressions": true
begin
require "jshintrb/jshinttask"
Jshintrb::JshintTask.new :jshint do |t|
t.pattern = "{app/assets,lib/assets,spec}/javascripts/**/*.js"
t.options = :jshintrc
end
rescue LoadError
desc "jshint rake task not available (jshintrb not installed)"
task :jshint do
abort "JSHint rake task is not available. Be sure to install jshintrb."
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment