Update jshint grunt task to exclude eqeqeq and curly for now, until we've resolved other code smells.

props kadamwhite.
see #25187.


git-svn-id: https://develop.svn.wordpress.org/trunk@26041 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2013-11-07 21:14:49 +00:00
parent aacc286f7c
commit 8bdd289576
2 changed files with 41 additions and 46 deletions

View File

@ -3,20 +3,22 @@
"curly": true,
"eqeqeq": true,
"eqnull": true,
"es3": true,
"expr": true,
"immed": true,
"noarg": true,
"onevar": true,
"quotmark": "single",
"smarttabs": true,
"trailing": true,
"undef": true,
"unused": true,
"es3": true,
"onevar": true,
"browser": true,
"globals": {
"_": false,
"Backbone": false,
"jQuery": false,
"wp": false
}

View File

@ -83,54 +83,47 @@ module.exports = function(grunt) {
jshint: {
options: grunt.file.readJSON('.jshintrc'),
grunt: {
files: {
src: ['Gruntfile.js']
},
options: {
onevar: true
}
},
tests: {
files: {
src: [
'tests/qunit/**/*.js',
'!tests/qunit/vendor/qunit.js'
]
},
],
options: grunt.file.readJSON('tests/qunit/.jshintrc')
},
'wp-admin': {
files: {
core: {
expand: true,
cwd: SOURCE_DIR,
src: [
'src/wp-admin/js/**/*.js',
'!src/wp-admin/js/farbtastic.js',
'!src/wp-admin/js/iris.min.js'
]
}
},
'wp-includes': {
files: {
src: [
'src/wp-includes/js/**/*.js',
// 3rd-Party Scripts
'!src/wp-includes/js/backbone.min.js',
'!src/wp-includes/js/colorpicker.js',
'!src/wp-includes/js/crop/**/*.js',
'!src/wp-includes/js/hoverIntent.js',
'!src/wp-includes/js/imgareaselect/**/*.js',
'!src/wp-includes/js/jcrop/**/*.js',
'!src/wp-includes/js/jquery/**/*.js',
'!src/wp-includes/js/json2.js',
'!src/wp-includes/js/mediaelement/**/*.js',
'!src/wp-includes/js/plupload/**/*.js',
'!src/wp-includes/js/swfobject.js',
'!src/wp-includes/js/swfupload/**/*.js',
'!src/wp-includes/js/thickbox/**/*.js',
'!src/wp-includes/js/tinymce/**/*.js',
'!src/wp-includes/js/tw-sack.js',
'!src/wp-includes/js/underscore.min.js',
'!src/wp-includes/js/zxcvbn.min.js'
]
'wp-admin/js/*.js',
'wp-includes/js/*.js',
// WordPress scripts inside directories
'wp-includes/js/jquery/jquery.table-hotkeys.js',
'wp-includes/js/mediaelement/wp-mediaelement.js',
'wp-includes/js/plupload/handlers.js',
'wp-includes/js/plupload/wp-plupload.js',
'wp-includes/js/tinymce/langs/wp-langs-en.js',
'wp-includes/js/tinymce/plugins/wordpress/editor_plugin_src.js',
'wp-includes/js/tinymce/plugins/wp*/editor_plugin_src.js',
'wp-includes/js/tinymce/mark_loaded_src.js',
'wp-includes/js/tinymce/wp-tinymce-schema.js',
// Third party scripts
'!wp-admin/js/farbtastic.js',
'!wp-admin/js/iris.min.js',
'!wp-includes/js/backbone.min.js',
'!wp-includes/js/swfobject.js',
'!wp-includes/js/underscore.min.js',
'!wp-includes/js/zxcvbn.min.js',
'!wp-includes/js/colorpicker.js',
'!wp-includes/js/hoverIntent.js',
'!wp-includes/js/json2.js',
'!wp-includes/js/tw-sack.js'
],
// Remove once other JSHint errors are resolved
options: {
curly: false,
eqeqeq: false
}
}
},