]> git.openstreetmap.org Git - rails.git/commitdiff
Add JSHint support
authorTom Hughes <tom@compton.nu>
Mon, 23 Feb 2015 21:42:54 +0000 (21:42 +0000)
committerTom Hughes <tom@compton.nu>
Mon, 23 Feb 2015 21:45:57 +0000 (21:45 +0000)
Gemfile
Gemfile.lock
config/jshint.yml [new file with mode: 0644]

diff --git a/Gemfile b/Gemfile
index 83a941d6fe2859cd1a01f92c2e1f182a35f69cc4..6a1bbc66ed5154b23a24c90c41010158f3095b7e 100644 (file)
--- a/Gemfile
+++ b/Gemfile
@@ -90,6 +90,7 @@ end
 
 # Needed in development as well so rake can see konacha tasks
 group :development, :test do
+  gem "jshint"
   gem "konacha"
   gem "poltergeist"
 end
index f4a2c9b5b746b742c6d7453345a31daff30766c2..f40dc2b72aaef4c0abf54569f7d7478fbd743d40 100644 (file)
@@ -88,6 +88,10 @@ GEM
       rails-dom-testing (~> 1.0)
       railties (>= 4.2.0)
       thor (>= 0.14, < 2.0)
+    jshint (1.3.1)
+      execjs (>= 1.4.0)
+      multi_json (~> 1.0)
+      therubyracer (~> 0.12.1)
     json (1.8.2)
     jsonify (0.3.1)
       multi_json (~> 1.0)
@@ -102,6 +106,7 @@ GEM
       colorize
       railties (>= 3.1, < 5)
       sprockets
+    libv8 (3.16.14.7)
     libxml-ruby (2.8.0)
     loofah (2.0.1)
       nokogiri (>= 1.5.9)
@@ -186,6 +191,7 @@ GEM
     rainbow (2.0.0)
     rake (10.4.2)
     redcarpet (3.2.2)
+    ref (1.0.5)
     rinku (1.7.3)
     rubocop (0.29.1)
       astrolabe (~> 1.3)
@@ -195,7 +201,7 @@ GEM
       ruby-progressbar (~> 1.4)
     ruby-openid (2.6.0)
     ruby-progressbar (1.7.1)
-    sanitize (3.1.1)
+    sanitize (3.1.2)
       crass (~> 1.0.1)
       nokogiri (>= 1.4.4)
       nokogumbo (= 1.2.0)
@@ -216,6 +222,9 @@ GEM
       actionpack (>= 3.0)
       activesupport (>= 3.0)
       sprockets (>= 2.8, < 4.0)
+    therubyracer (0.12.1)
+      libv8 (~> 3.16.14.0)
+      ref
     thor (0.19.1)
     thread_safe (0.3.4)
     tilt (1.4.1)
@@ -228,7 +237,7 @@ GEM
     validates_email_format_of (1.6.2)
       i18n
     vendorer (0.1.16)
-    websocket-driver (0.5.2)
+    websocket-driver (0.5.3)
       websocket-extensions (>= 0.1.0)
     websocket-extensions (0.1.2)
     xpath (2.0.0)
@@ -251,6 +260,7 @@ DEPENDENCIES
   http_accept_language (~> 2.0.0)
   httpclient
   jquery-rails
+  jshint
   json
   jsonify-rails
   kgio
diff --git a/config/jshint.yml b/config/jshint.yml
new file mode 100644 (file)
index 0000000..5ce7665
--- /dev/null
@@ -0,0 +1,30 @@
+files:
+  - "**/*.js"
+exclude_paths:
+  - "vendor/assets/javascripts"
+options:
+  eqeqeq: true
+  freeze: true
+  latedef: "nofunc"
+  noarg: true
+  noempty: true
+  nonew: true
+  undef: true
+  browser: true
+  jquery: true
+  unused: true
+  trailing: true
+  globals:
+    I18n: true
+    L: true
+    OSM: true
+    Piwik: true
+    escapeHTML: false
+    getUserIcon: false
+    initializeBrowse: false
+    initializeNotes: false
+    maximiseMap: false
+    minimiseMap: false
+    querystring: false
+    remoteEditHandler: false
+    updateLinks: false