mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
tidy up some linting files
This commit is contained in:
parent
2f218740c6
commit
a63df3c41d
20
.jscsrc
20
.jscsrc
@ -2,17 +2,23 @@
|
|||||||
"fileExtensions": [ ".js", "jscs" ],
|
"fileExtensions": [ ".js", "jscs" ],
|
||||||
"excludeFiles": [ "node_modules/**" ],
|
"excludeFiles": [ "node_modules/**" ],
|
||||||
"validateIndentation": 4,
|
"validateIndentation": 4,
|
||||||
"requireCurlyBraces": true,
|
"disallowKeywordsOnNewLine": [],
|
||||||
"disallowMixedSpacesAndTabs": true,
|
"disallowMixedSpacesAndTabs": true,
|
||||||
"disallowMultipleSpaces": {"allowEOLComments": true},
|
"disallowMultipleSpaces": {"allowEOLComments": true},
|
||||||
"disallowKeywordsOnNewLine": [],
|
"disallowNewlineBeforeBlockStatements": true,
|
||||||
|
"disallowTabs": true,
|
||||||
|
"disallowTrailingWhitespace": true,
|
||||||
|
"requireCurlyBraces": true,
|
||||||
//"requireKeywordsOnNewLine": ["else", "catch"],
|
//"requireKeywordsOnNewLine": ["else", "catch"],
|
||||||
"requireSpaceBeforeBlockStatements": 1,
|
|
||||||
//"requireSpaceBeforeObjectValues": false,
|
|
||||||
//"requireSemicolons": true,
|
//"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": ", ",
|
//"validateParameterSeparator": ", ",
|
||||||
//"validateQuoteMarks": false,
|
//"validateQuoteMarks": false,
|
||||||
"requireSpaceAfterKeywords": ["do","for","if","else","switch","case","try","while"],
|
"maximumLineLength": 220
|
||||||
"maximumLineLength": 255,
|
|
||||||
"disallowTabs": true
|
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,9 @@
|
|||||||
"asi": true, // allow missing semicolons
|
"asi": true, // allow missing semicolons
|
||||||
"curly": true, // require braces
|
"curly": true, // require braces
|
||||||
"eqnull": true, // ignore ==null
|
"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
|
"forin": true, // require property filtering in "for in" loops
|
||||||
"immed": true, // require immediate functions to be wrapped in ( )
|
"immed": true, // require immediate functions to be wrapped in ( )
|
||||||
"nonbsp": true, // warn on unexpected whitespace breaking chars
|
"nonbsp": true, // warn on unexpected whitespace breaking chars
|
||||||
|
16
Gruntfile.js
16
Gruntfile.js
@ -14,20 +14,7 @@ module.exports = function(grunt) {
|
|||||||
},
|
},
|
||||||
jshint: {
|
jshint: {
|
||||||
options: {
|
options: {
|
||||||
jshintrc:".jshintrc", // Use external file - configured as below...
|
jshintrc:".jshintrc", // Use external file
|
||||||
// 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')
|
|
||||||
},
|
},
|
||||||
all: {
|
all: {
|
||||||
src: ['*/*.js','*/*/*.js'],
|
src: ['*/*.js','*/*/*.js'],
|
||||||
@ -53,6 +40,7 @@ module.exports = function(grunt) {
|
|||||||
options: {
|
options: {
|
||||||
config: ".jscsrc",
|
config: ".jscsrc",
|
||||||
reporter: "inline"
|
reporter: "inline"
|
||||||
|
//,fix: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user