Expand Minimize

Specify TypeScript linting rules

Specify TypeScript linting rules to use when verifying TypeScript code

CheckId SPF050101
TypeName LintConfigExists
Severity Error
Type Project

Each SharePoint Framework project should define the TypeScript validation rules using the 'config\tslint.json' file.

config\tslint.json example

{
  "lintConfig": {
    "rules": {
      "comment-format": false,
      "curly": false,
      "indent": false,
      "interface-name": false,
      "max-line-length": false,
      "member-ordering": false,
      "no-any": false,
      "no-bitwise": false,
      "no-consecutive-blank-lines": false,
      "no-constant-condition": false,
      "no-debugger": false,
      "no-empty": false,
      "no-null-keyword": false,
      "no-string-literal": false,
      "no-trailing-whitespace": false,
      "no-var-keyword": false,
      "one-line": false,
      "quotemark": false,
      "radix": false,
      "triple-equals": false
    }
  }
}

To suppress this violation in XML SharePoint code add the following comment right before the XML tag which causes the rule violation. Learn more about SuppressMessage here.

<!-- "SuppressMessage":{"rule":"SPF050101:LintConfigExists","justification":"Provide reason for suppression here"} -->
Disclaimer: The views and opinions expressed in this documentation and in SPCAF do not necessarily reflect the opinions and recommendations of Microsoft or any member of Microsoft. SPCAF and RENCORE are registered trademarks of Rencore. All other trademarks, service marks, collective marks, copyrights, registered names, and marks used or cited by this documentation are the property of their respective owners.