Created
September 8, 2016 15:47
-
-
Save paulryan/4a31767e18ecb3d95f418d4b8c9a1dd0 to your computer and use it in GitHub Desktop.
SharePoint Framework: The tslint.json file from the config folder extended to support the same set of rules from my preferred tslint file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
// Display errors as warnings | |
"displayAsWarning": true, | |
// The TSLint task may have been configured with several custom lint rules | |
// before this config file is read (for example lint rules from the tslint-microsoft-contrib | |
// project). If true, this flag will deactivate any of these rules. | |
"removeExistingRules": true, | |
// When true, the TSLint task is configured with some default TSLint "rules.": | |
"useDefaultConfigAsBase": false, | |
// Since removeExistingRules=true and useDefaultConfigAsBase=false, there will be no lint rules | |
// which are active, other than the list of rules below. | |
"lintConfig": { | |
// Opt-in to Lint rules which help to eliminate bugs in JavaScript | |
"rules": { | |
// This section of rules is not supported by the tslint VS Code extension | |
"export-name": false, | |
"no-duplicate-case": true, | |
"no-function-expression": true, | |
"no-unnecessary-semicolons": true, | |
"no-unused-imports": true, | |
"no-use-before-declare": true, | |
"no-with-statement": true, | |
"use-named-parameter": true, | |
"valid-typeof": true, | |
"prefer-const": true, | |
"a11y-role": true, | |
"member-ordering": [false], | |
"no-constant-condition": [false], | |
// This section of rules *is* supported by the tslint VS Code extension | |
"class-name": false, | |
"forin": false, | |
"label-position": false, | |
"label-undefined": false, | |
"member-access": true, | |
"no-arg": false, | |
"no-console": [true, "log", "error"], | |
"no-construct": false, | |
"no-duplicate-key": false, | |
"no-duplicate-variable": true, | |
"no-eval": false, | |
"no-internal-module": true, | |
"no-shadowed-variable": true, | |
"no-switch-case-fall-through": true, | |
"no-unused-expression": true, | |
"no-unused-variable": true, | |
"no-unreachable": true, | |
"semicolon": [true, "always"], | |
"typedef": [true, "call-signature", "parameter", "member-variable-declaration", "property-declaration"], | |
"typedef-whitespace": [ | |
true, | |
{ | |
"call-signature": "nospace", | |
"index-signature": "nospace", | |
"parameter": "nospace", | |
"property-declaration": "nospace", | |
"variable-declaration": "nospace" | |
}, | |
{ | |
"call-signature": "onespace", | |
"index-signature": "onespace", | |
"parameter": "onespace", | |
"property-declaration": "onespace", | |
"variable-declaration": "onespace" | |
} | |
], | |
"variable-name": false, | |
"whitespace": [false], | |
"no-constructor-vars": true, | |
"comment-format": [false], // [true, "check-space"], | |
"curly": false, | |
"indent": [false], | |
"interface-name": [true, "always-prefix"], | |
"max-line-length": [true, 180], | |
"no-any": false, | |
"no-bitwise": false, | |
"no-consecutive-blank-lines": true, | |
"no-debugger": false, | |
"no-empty": true, | |
"no-null-keyword": false, | |
"no-string-literal": false, | |
"no-trailing-whitespace": false, | |
"no-var-keyword": true, | |
"one-line": [true, "check-open-brace"], | |
"quotemark": [true, "avoid-escape"], | |
"radix": false, | |
"triple-equals": true, | |
"trailing-comma": [true, {"multiline": "never", "singleline": "never"}], | |
"object-literal-sort-keys": false | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment