Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unsupported jsdoc rule fix

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
  }
like image 823
cusejuice Avatar asked Aug 19 '15 19:08

cusejuice


1 Answers

Adding 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.com/roots/sage/pull/1522

Commit SHA https://github.com/chrisk2020/sage/commit/bcefb5908fdb457d2126833198cd760378ffe949

like image 184
Ashwin Hegde Avatar answered Oct 19 '22 02:10

Ashwin Hegde