Skip to content

Commit

Permalink
Use the standard .jshintrc file for JSHint options.
Browse files Browse the repository at this point in the history
  • Loading branch information
eviltrout authored and rwdaigle committed Jan 6, 2014
1 parent 1177f2c commit c87791e
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 202 deletions.
68 changes: 68 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"predef":["Ember",
"jQuery",
"$",
"RSVP",
"Discourse",
"$LAB",
"Em",
"PreloadStore",
"Handlebars",
"I18n",
"bootbox",
"module",
"integration",
"test",
"ok",
"expect",
"equal",
"blank",
"present",
"visit",
"count",
"exists",
"asyncTestDiscourse",
"fixture",
"find",
"sinon",
"moment",
"start",
"_",
"console",
"alert",
"controllerFor",
"testController",
"containsInstance",
"parseHTML",
"deepEqual",
"notEqual",
"Blob",
"File"],
"node" : false,
"browser" : true,
"boss" : true,
"curly": false,
"debug": false,
"devel": false,
"eqeqeq": true,
"evil": true,
"forin": false,
"immed": false,
"laxbreak": false,
"newcap": true,
"noarg": true,
"noempty": false,
"nonew": false,
"nomen": false,
"onevar": false,
"plusplus": false,
"regexp": false,
"undef": true,
"unused": true,
"sub": true,
"strict": false,
"white": false,
"eqnull": true,
"quotmark": false,
"lastsemic": true
}
1 change: 1 addition & 0 deletions app/assets/javascripts/discourse.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ window.Discourse = Ember.Application.createWithMixins(Discourse.Ajax, {

titleChanged: function() {
var title = "";

if (this.get('title')) {
title += "" + (this.get('title')) + " - ";
}
Expand Down
133 changes: 0 additions & 133 deletions config/jshint.yml

This file was deleted.

70 changes: 1 addition & 69 deletions test/javascripts/jshint_all.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -90,74 +90,6 @@ qHint.sendRequest = function (url, callback) {
req.send();
};

var jsHintOpts = {
"predef":["Ember",
"jQuery",
"$",
"RSVP",
"Discourse",
"$LAB",
"Em",
"PreloadStore",
"Handlebars",
"I18n",
"bootbox",
"module",
"integration",
"test",
"ok",
"expect",
"equal",
"blank",
"present",
"visit",
"count",
"exists",
"asyncTestDiscourse",
"fixture",
"find",
"sinon",
"moment",
"start",
"_",
"console",
"alert",
"controllerFor",
"testController",
"containsInstance",
"parseHTML",
"deepEqual",
"notEqual",
"Blob",
"File"],
"node" : false,
"browser" : true,
"boss" : true,
"curly": false,
"debug": false,
"devel": false,
"eqeqeq": true,
"evil": true,
"forin": false,
"immed": false,
"laxbreak": false,
"newcap": true,
"noarg": true,
"noempty": false,
"nonew": false,
"nomen": false,
"onevar": false,
"plusplus": false,
"regexp": false,
"undef": true,
"unused": true,
"sub": true,
"strict": false,
"white": false,
"eqnull": true,
"lastsemic": true
};

<%
def jshint(dir, remove, to_ignore)
result = ""
Expand All @@ -172,7 +104,7 @@ var jsHintOpts = {

depend_on filename

result << "qHint('#{filename}', '/assets/#{filename}', jsHintOpts);\n" if ok
result << "qHint('#{filename}', '/assets/#{filename}', #{File.read(File.join(Rails.root, '.jshintrc'))});\n" if ok

end
result
Expand Down

0 comments on commit c87791e

Please sign in to comment.