Last active
December 14, 2015 20:49
-
-
Save jrcryer/5374ea9422ee904cee9a to your computer and use it in GitHub Desktop.
jshint + jscs (jshintignore, jshintrc, jscs)
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
Show hidden characters
{ | |
"preset": "google", | |
"fileExtensions": [".js", "jscs"], | |
"requireSemicolons": true, | |
"requireParenthesesAroundIIFE": true, | |
"maximumLineLength": 120, | |
"validateLineBreaks": "LF", | |
"validateIndentation": 4, | |
"disallowTrailingComma": true, | |
"disallowUnusedParams": true, | |
"disallowSpacesInsideObjectBrackets": null, | |
"disallowImplicitTypeConversion": ["string"], | |
"safeContextKeyword": "_this", | |
"jsDoc": { | |
"checkAnnotations": "closurecompiler", | |
"checkParamNames": true, | |
"requireParamTypes": true, | |
"checkRedundantParams": true, | |
"checkReturnTypes": true, | |
"checkRedundantReturns": true, | |
"requireReturnTypes": true, | |
"checkTypes": "capitalizedNativeCase", | |
"checkRedundantAccess": true, | |
"requireNewlineAfterDescription": true | |
}, | |
"excludeFiles": [ | |
"node_modules/**/*.js", | |
"bad.js", | |
"Gruntfile.js" | |
] | |
} |
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
node_modules/**/*.js | |
bad.js | |
Gruntfile.j |
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
{ | |
"boss": true, | |
"curly": true, | |
"eqeqeq": true, | |
"eqnull": true, | |
"immed": true, | |
"latedef": true, | |
"newcap": true, | |
"noarg": true, | |
"sub": true, | |
"undef": true, | |
"unused": true, | |
"node": true, | |
"-W117": 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
eval("test"); |
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
console.log('test'); |
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
module.exports = function (grunt) { | |
require('load-grunt-tasks')(grunt); | |
grunt.initConfig({ | |
jscs: { | |
src: "**/*.js", | |
options: { | |
config: ".jscsrc" | |
} | |
}, | |
jshint: { | |
options: { | |
jshintrc: true | |
}, | |
uses_defaults: ['**/*.js'], | |
} | |
}); | |
grunt.registerTask('default', ['jscs', 'jshint']); | |
}; |
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
{ | |
"name": "projects", | |
"version": "1.0.0", | |
"main": "index.js", | |
"devDependencies": { | |
"grunt": "^0.4.5", | |
"grunt-contrib-jshint": "^0.11.3", | |
"grunt-jscs": "^2.5.0", | |
"load-grunt-tasks": "^3.3.0" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment