Using the .jsrc file, I'm getting the following error for my server/front-end files. It's throwing an error at the top of my files. How can I suppress this?
Unsupported rule: fix at js/server.js :
1 |'use strict';
Unsupported rule: fix at js/example.js :
1 |(function() {
Here is my .jscsrc
file
// .html
{
"requireOperatorBeforeLineBreak": true,
"requireCamelCaseOrUpperCaseIdentifiers": "ignoreProperties",
"maximumLineLength": {
"value": 100,
"allowComments": true,
"allowRegex": true
},
"validateIndentation": 2,
"validateQuoteMarks": { "mark": "'", "escape": true },
"disallowMultipleLineStrings": true,
"disallowMixedSpacesAndTabs": true,
"disallowTrailingWhitespace": true,
"disallowSpaceAfterPrefixUnaryOperators": true,
"disallowKeywordsOnNewLine": ["else"],
"requireSpaceAfterKeywords": [
"if",
"else",
"for",
"while",
"do",
"switch",
"return",
"try",
"catch"
],
"requireSpaceBeforeBinaryOperators": [
"=", "+=", "-=", "*=", "/=", "%=", "<<=", ">>=", ">>>=",
"&=", "|=", "^=", "+=",
"+", "-", "*", "/", "%", "<<", ">>", ">>>", "&",
"|", "^", "&&", "||", "===", "==", ">=",
"<=", "<", ">", "!=", "!=="
],
"requireSpaceAfterBinaryOperators": true,
"requireSpacesInConditionalExpression": true,
"requireSpaceBeforeBlockStatements": true,
"requireSpacesInForStatement": true,
"requireLineFeedAtFileEnd": true,
"requireSpacesInFunctionExpression": {
"beforeOpeningCurlyBrace": true
},
"disallowSpacesInAnonymousFunctionExpression": {
"beforeOpeningRoundBrace": true
},
"disallowSpacesInsideArrayBrackets": "all",
"disallowSpacesInsideParentheses": true,
"disallowMultipleLineBreaks": true,
"disallowNewlineBeforeBlockStatements": true
}
Using the .jsrc file, I'm getting the following error for my server/front-end files. It's throwing an error at the top of my files. How can I suppress this?
Unsupported rule: fix at js/server.js :
1 |'use strict';
Unsupported rule: fix at js/example.js :
1 |(function() {
Here is my .jscsrc
file
// http://jscs.info/rules.html
{
"requireOperatorBeforeLineBreak": true,
"requireCamelCaseOrUpperCaseIdentifiers": "ignoreProperties",
"maximumLineLength": {
"value": 100,
"allowComments": true,
"allowRegex": true
},
"validateIndentation": 2,
"validateQuoteMarks": { "mark": "'", "escape": true },
"disallowMultipleLineStrings": true,
"disallowMixedSpacesAndTabs": true,
"disallowTrailingWhitespace": true,
"disallowSpaceAfterPrefixUnaryOperators": true,
"disallowKeywordsOnNewLine": ["else"],
"requireSpaceAfterKeywords": [
"if",
"else",
"for",
"while",
"do",
"switch",
"return",
"try",
"catch"
],
"requireSpaceBeforeBinaryOperators": [
"=", "+=", "-=", "*=", "/=", "%=", "<<=", ">>=", ">>>=",
"&=", "|=", "^=", "+=",
"+", "-", "*", "/", "%", "<<", ">>", ">>>", "&",
"|", "^", "&&", "||", "===", "==", ">=",
"<=", "<", ">", "!=", "!=="
],
"requireSpaceAfterBinaryOperators": true,
"requireSpacesInConditionalExpression": true,
"requireSpaceBeforeBlockStatements": true,
"requireSpacesInForStatement": true,
"requireLineFeedAtFileEnd": true,
"requireSpacesInFunctionExpression": {
"beforeOpeningCurlyBrace": true
},
"disallowSpacesInAnonymousFunctionExpression": {
"beforeOpeningRoundBrace": true
},
"disallowSpacesInsideArrayBrackets": "all",
"disallowSpacesInsideParentheses": true,
"disallowMultipleLineBreaks": true,
"disallowNewlineBeforeBlockStatements": true
}
Share
Improve this question
asked Aug 19, 2015 at 19:40
cusejuicecusejuice
10.7k27 gold badges95 silver badges150 bronze badges
1
- you ever figure this out? have the same issue and I've already referred to the jscs docs. – mtpultz Commented May 5, 2016 at 21:50
2 Answers
Reset to default 8Adding below checks in .jscsrc will remove your errors:
"jsDoc": {
"checkParamNames": true,
"requireParamTypes": true
}
"validateJSDoc" is depricated; Please see visit below URLs
Visit for more info http://jscs.info/rule/jsDoc.html
Pull Request https://github./roots/sage/pull/1522
Commit SHA https://github./chrisk2020/sage/mit/bcefb5908fdb457d2126833198cd760378ffe949
I had the same error message showing up on all of my files. My .jscsrc file had a rule of "fix: true" in it; can't remember where I got that. It was supposed to auto-fix things like spacing errors. Perhaps that worked in a prior version of JSCS, but it doesn't work now. I'm using grunt, and I had to modify the grunt task to get the desired oute. Where previously I had
grunt.config.set('jscs', {
js: {
src: [ /* path to my files */ ]
}
});
I added the following after src
:
options: {
config: ".jscsrc",
fix: true
}