mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Add onevar to jshintrc, but remove the option for linting the concatenated file
This commit is contained in:
parent
6bf2c3e49a
commit
738b8f8431
11
Gruntfile.js
11
Gruntfile.js
@ -14,7 +14,12 @@ module.exports = function( grunt ) {
|
|||||||
data = grunt.file.readJSON( filepath );
|
data = grunt.file.readJSON( filepath );
|
||||||
} catch(e) {}
|
} catch(e) {}
|
||||||
return data;
|
return data;
|
||||||
};
|
},
|
||||||
|
srcHintOptions = readOptionalJSON("src/.jshintrc");
|
||||||
|
|
||||||
|
// The concatenated file won't pass onevar
|
||||||
|
// But our modules can
|
||||||
|
delete srcHintOptions.onevar;
|
||||||
|
|
||||||
grunt.initConfig({
|
grunt.initConfig({
|
||||||
pkg: grunt.file.readJSON("package.json"),
|
pkg: grunt.file.readJSON("package.json"),
|
||||||
@ -72,9 +77,7 @@ module.exports = function( grunt ) {
|
|||||||
jshint: {
|
jshint: {
|
||||||
dist: {
|
dist: {
|
||||||
src: [ "dist/jquery.js" ],
|
src: [ "dist/jquery.js" ],
|
||||||
options: {
|
options: srcHintOptions
|
||||||
jshintrc: "src/.jshintrc"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
grunt: {
|
grunt: {
|
||||||
src: [ "Gruntfile.js" ],
|
src: [ "Gruntfile.js" ],
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
"expr": true,
|
"expr": true,
|
||||||
"immed": true,
|
"immed": true,
|
||||||
"noarg": true,
|
"noarg": true,
|
||||||
|
"onevar": true,
|
||||||
"quotmark": "double",
|
"quotmark": "double",
|
||||||
"smarttabs": true,
|
"smarttabs": true,
|
||||||
"trailing": true,
|
"trailing": true,
|
||||||
|
Loading…
Reference in New Issue
Block a user