tidy up some linting files

This commit is contained in:
Dave Conway-Jones 2017-03-09 23:18:22 +00:00
parent 2f218740c6
commit a63df3c41d
3 changed files with 18 additions and 21 deletions

20
.jscsrc
View File

@ -2,17 +2,23 @@
"fileExtensions": [ ".js", "jscs" ],
"excludeFiles": [ "node_modules/**" ],
"validateIndentation": 4,
"requireCurlyBraces": true,
"disallowKeywordsOnNewLine": [],
"disallowMixedSpacesAndTabs": true,
"disallowMultipleSpaces": {"allowEOLComments": true},
"disallowKeywordsOnNewLine": [],
"disallowNewlineBeforeBlockStatements": true,
"disallowTabs": true,
"disallowTrailingWhitespace": true,
"requireCurlyBraces": true,
//"requireKeywordsOnNewLine": ["else", "catch"],
"requireSpaceBeforeBlockStatements": 1,
//"requireSpaceBeforeObjectValues": false,
//"requireSemicolons": true,
//"requireSpaceAfterBinaryOperators": true,
//"requireSpaceAfterComma": {"allExcept": ["trailing"]},
"requireSpaceAfterKeywords": ["do","for","if","else","switch","case","try","while"],
"requireSpaceBeforeBlockStatements": 1,
"requireSpaceBeforeObjectValues": false,
"requireSpacesInForStatement": true,
"requireSpacesInFunction": { "beforeOpeningCurlyBrace": true },
//"validateParameterSeparator": ", ",
//"validateQuoteMarks": false,
"requireSpaceAfterKeywords": ["do","for","if","else","switch","case","try","while"],
"maximumLineLength": 255,
"disallowTabs": true
"maximumLineLength": 220
}

View File

@ -2,6 +2,9 @@
"asi": true, // allow missing semicolons
"curly": true, // require braces
"eqnull": true, // ignore ==null
//"eqeqeq": true, // enforce ===
"freeze": true, // don't allow override
"indent": 4, // default indent of 4
"forin": true, // require property filtering in "for in" loops
"immed": true, // require immediate functions to be wrapped in ( )
"nonbsp": true, // warn on unexpected whitespace breaking chars

View File

@ -14,20 +14,7 @@ module.exports = function(grunt) {
},
jshint: {
options: {
jshintrc:".jshintrc", // Use external file - configured as below...
// http://www.jshint.com/docs/options/
//"asi": true, // allow missing semicolons
//"curly": true, // require braces
//"eqnull": true, // ignore ==null
//"forin": true, // require property filtering in "for in" loops
//"immed": true, // require immediate functions to be wrapped in ( )
//"nonbsp": true, // warn on unexpected whitespace breaking chars
////"strict": true, // commented out for now as it causes 100s of warnings, but want to get there eventually
//"loopfunc": true, // allow functions to be defined in loops
//"sub": true, // don't warn that foo['bar'] should be written as foo.bar
////"unused": true, // Check for unused functions
////"forin":false, // turn off check for "for (x in y...)"
//"reporter": require('jshint-stylish')
jshintrc:".jshintrc", // Use external file
},
all: {
src: ['*/*.js','*/*/*.js'],
@ -53,6 +40,7 @@ module.exports = function(grunt) {
options: {
config: ".jscsrc",
reporter: "inline"
//,fix: true
}
}
});