Permalink
Show file tree
Hide file tree
2 comments
on commit
sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Adds .jshintrc files for: grunt (default set), src, tests; Adapts jQu…
…ery-UI loading method
- Loading branch information
Showing
4 changed files
with
114 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"curly": true, | ||
"eqnull": true, | ||
"eqeqeq": true, | ||
"expr": true, | ||
"latedef": true, | ||
"noarg": true, | ||
"smarttabs": true, | ||
"trailing": true, | ||
"undef": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"options": { | ||
"evil": true, | ||
"browser": true, | ||
"wsh": true, | ||
"eqnull": true, | ||
"expr": true, | ||
"curly": true, | ||
"trailing": true, | ||
"undef": true, | ||
"smarttabs": true, | ||
"maxerr": 100 | ||
}, | ||
"globals": { | ||
"define": true, | ||
"DOMParser": true, | ||
"__dirname": true, | ||
"jQuery": true, | ||
"global": true, | ||
"module": true, | ||
"exports": true, | ||
"require": true, | ||
"file": true, | ||
"log": true, | ||
"console": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{ | ||
"options": { | ||
"evil": true, | ||
"browser": true, | ||
"wsh": true, | ||
"eqnull": true, | ||
"expr": true, | ||
"curly": true, | ||
"trailing": true, | ||
"undef": true, | ||
"smarttabs": true, | ||
"maxerr": 100 | ||
}, | ||
"globals": { | ||
"define": true, | ||
"DOMParser": true, | ||
"__dirname": true, | ||
"jQuery": true, | ||
"global": true, | ||
"module": true, | ||
"exports": true, | ||
"require": true, | ||
"file": true, | ||
"log": true, | ||
"console": true, | ||
"QUnit": true, | ||
"ok": true, | ||
"equal": true, | ||
"test": true, | ||
"asyncTest": true, | ||
"notEqual": true, | ||
"deepEqual": true, | ||
"strictEqual": true, | ||
"notStrictEqual": true, | ||
"start": true, | ||
"stop": true, | ||
"expect": true, | ||
"raises": true, | ||
"testIframe": true, | ||
"testIframeWithCallback": true, | ||
"createDashboardXML": true, | ||
"moduleTeardown": true, | ||
"testFoo": true, | ||
"foobar": true, | ||
"url": true, | ||
"t": true, | ||
"q": true, | ||
"amdDefined": true, | ||
"fireNative": true, | ||
"hasPHP": true, | ||
"isLocal": true, | ||
"originaljQuery": true, | ||
"$": true, | ||
"original$": true | ||
} | ||
} |
9624633
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great. My only thought on top of this is to separate the options for linting
grunt.js
to be different from those fordist/jquery.js
. Right now, unless I'm reading this wrong, a few unnecessary globals are allowed in the dist file, and you had to add/*jshint node: true */
to thegrunt.js
file. I'd think separate .jshintrc files would eliminate the need for that.9624633
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For UI we keep the main jshintrc based on the actual code, then use that for grunt.js and add the
node: true
comment as the only additional setting.