-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BREAKING CHANGE: chore: sync with internal lint (#75)
This synchronizes the lint rules to be closer to the lint rules used internally at Google. Not all rules are available externally, so this is not *exactly* the same. Also updated the TypeScript version to 2.6.1. A fair number of new lint rules are being applied now, which means that the code will be alot more consistent with other Google code, but it also means that users of gts may need to modify the source to pick up this release. For most of the new lint rules, a fixer is also available which should help with migration. TypeScript 2.6.x enables contravariant types for function parameters, which may also require some changes. See [1] for more info. [1] https://blogs.msdn.microsoft.com/typescript/2017/10/31/announcing-typescript-2-6/
- Loading branch information
Showing
11 changed files
with
100 additions
and
54 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,64 @@ | ||
{ | ||
"rules": { | ||
"array-type": [true, "array-simple"], | ||
"arrow-return-shorthand": true, | ||
"ban": [true, | ||
{"name": "parseInt", "message": "tsstyle#type-coercion"}, | ||
{"name": "parseFloat", "message": "tsstyle#type-coercion"}, | ||
{"name": "Array", "message": "tsstyle#array-constructor"} | ||
], | ||
"ban-types": [true, | ||
["Object", "Use {} instead."], | ||
["String", "Use 'string' instead."], | ||
["Number", "Use 'number' instead."], | ||
["Boolean", "Use 'boolean' instead."] | ||
], | ||
"class-name": true, | ||
"comment-format": [true, "check-space"], | ||
"curly": [true, "ignore-same-line"], | ||
"eofline": true, | ||
"forin": true, | ||
"indent": [true, "spaces"], | ||
"interface-name": [true, "never-prefix"], | ||
"jsdoc-format": true, | ||
"label-position": true, | ||
"member-access": [true, "no-public"], | ||
"new-parens": true, | ||
"no-angle-bracket-type-assertion": true, | ||
"no-any": true, | ||
"no-arg": true, | ||
"no-conditional-assignment": true, | ||
"no-construct": true, | ||
"no-debugger": true, | ||
"no-default-export": true, | ||
"no-duplicate-variable": true, | ||
"no-empty": true, | ||
"no-inferrable-types": true, | ||
"no-internal-module": true, | ||
"no-namespace": [true, "allow-declarations"], | ||
"no-reference": true, | ||
"no-shadowed-variable": true, | ||
"no-string-throw": true, | ||
"no-switch-case-fall-through": true, | ||
"no-trailing-whitespace": true, | ||
"no-unused-expression": true, | ||
"no-use-before-declare": true, | ||
"no-var-keyword": true, | ||
"object-literal-shorthand": true, | ||
"only-arrow-functions": [true, "allow-declarations", "allow-named-functions"], | ||
"prefer-const": true, | ||
"quotemark": [true, "single"], | ||
"radix": true, | ||
"semicolon": [true, "always"], | ||
"semicolon": [true, "always", "ignore-bound-class-methods"], | ||
"switch-default": true, | ||
"triple-equals": [true, "allow-null-check"], | ||
"variable-name": [true, "check-format", "ban-keywords"] | ||
"use-isnan": true, | ||
"variable-name": [ | ||
true, | ||
"check-format", | ||
"ban-keywords", | ||
"allow-leading-underscore", | ||
"allow-trailing-underscore" | ||
] | ||
} | ||
} | ||
} |