2016-01-15 17:47:43 -08:00
|
|
|
{
|
2017-04-14 13:06:38 -07:00
|
|
|
"rulesDirectory": [
|
|
|
|
|
"./tools/tslint-rules/"
|
|
|
|
|
],
|
2016-01-15 17:47:43 -08:00
|
|
|
"rules": {
|
|
|
|
|
"max-line-length": [true, 100],
|
2017-02-09 19:33:35 +01:00
|
|
|
// Disable this flag because of SHA tslint#48b0c597f9257712c7d1f04b55ed0aa60e333f6a
|
|
|
|
|
// TSLint now shows warnings if types for properties are inferred. This rule needs to be
|
|
|
|
|
// disabled because all properties need to have explicit types set to work for Dgeni.
|
|
|
|
|
"no-inferrable-types": false,
|
2016-01-15 17:47:43 -08:00
|
|
|
"class-name": true,
|
|
|
|
|
"comment-format": [
|
|
|
|
|
true,
|
|
|
|
|
"check-space"
|
|
|
|
|
],
|
|
|
|
|
"indent": [
|
|
|
|
|
true,
|
|
|
|
|
"spaces"
|
|
|
|
|
],
|
|
|
|
|
"eofline": true,
|
|
|
|
|
"no-duplicate-variable": true,
|
|
|
|
|
"no-eval": true,
|
|
|
|
|
"no-arg": true,
|
|
|
|
|
"no-internal-module": true,
|
|
|
|
|
"no-trailing-whitespace": true,
|
|
|
|
|
"no-bitwise": true,
|
|
|
|
|
"no-shadowed-variable": true,
|
2016-01-29 14:01:19 -08:00
|
|
|
"no-unused-expression": true,
|
2017-03-17 19:15:50 +01:00
|
|
|
"no-var-keyword": true,
|
2017-04-14 13:06:38 -07:00
|
|
|
"no-exposed-todo": true,
|
2017-08-04 14:01:30 -07:00
|
|
|
"member-access": [true, "no-public"],
|
2017-03-13 22:26:13 +01:00
|
|
|
"no-debugger": true,
|
2017-07-07 20:42:52 +02:00
|
|
|
"no-unused-variable": [true, {"ignore-pattern": "^_"}],
|
2017-06-24 14:45:44 +02:00
|
|
|
"no-rxjs-patch-imports": [
|
|
|
|
|
true,
|
2017-08-04 23:00:29 +02:00
|
|
|
"src/+(lib|cdk)/**/*.ts"
|
2017-06-24 14:45:44 +02:00
|
|
|
],
|
2017-07-31 21:13:33 +03:00
|
|
|
"missing-rollup-globals": [
|
|
|
|
|
true,
|
2017-08-02 23:31:31 +02:00
|
|
|
"./tools/package-tools/rollup-globals.ts",
|
2017-08-04 23:00:29 +02:00
|
|
|
"src/+(lib|cdk|material-examples)/**/*.ts"
|
2017-07-31 21:13:33 +03:00
|
|
|
],
|
2016-01-15 17:47:43 -08:00
|
|
|
"one-line": [
|
|
|
|
|
true,
|
|
|
|
|
"check-catch",
|
|
|
|
|
"check-else",
|
|
|
|
|
"check-open-brace",
|
|
|
|
|
"check-whitespace"
|
|
|
|
|
],
|
|
|
|
|
"quotemark": [
|
|
|
|
|
true,
|
|
|
|
|
"single",
|
|
|
|
|
"avoid-escape"
|
|
|
|
|
],
|
|
|
|
|
"semicolon": true,
|
|
|
|
|
"typedef-whitespace": [
|
|
|
|
|
true,
|
|
|
|
|
{
|
|
|
|
|
"call-signature": "nospace",
|
|
|
|
|
"index-signature": "nospace",
|
|
|
|
|
"parameter": "nospace",
|
|
|
|
|
"property-declaration": "nospace",
|
|
|
|
|
"variable-declaration": "nospace"
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"curly": true,
|
|
|
|
|
"variable-name": [
|
|
|
|
|
true,
|
|
|
|
|
"ban-keywords",
|
|
|
|
|
"check-format",
|
2016-03-09 15:11:52 -08:00
|
|
|
"allow-leading-underscore"
|
2016-01-15 17:47:43 -08:00
|
|
|
],
|
|
|
|
|
"whitespace": [
|
|
|
|
|
true,
|
|
|
|
|
"check-branch",
|
|
|
|
|
"check-decl",
|
|
|
|
|
"check-operator",
|
|
|
|
|
"check-separator",
|
2017-06-29 19:31:08 +02:00
|
|
|
"check-type",
|
|
|
|
|
"check-preblock"
|
2017-03-13 22:26:13 +01:00
|
|
|
],
|
|
|
|
|
// Bans jasmine helper functions that will prevent the CI from properly running tests.
|
2017-08-07 23:24:13 +02:00
|
|
|
"ban": [
|
|
|
|
|
true,
|
|
|
|
|
["fit"],
|
|
|
|
|
["fdescribe"],
|
|
|
|
|
["xit"],
|
|
|
|
|
["xdescribe"],
|
|
|
|
|
{ "name": "HostBinding", "message": "Use `host` in the component definition instead." },
|
|
|
|
|
{ "name": "HostListener", "message": "Use `host` in the component definition instead." }
|
|
|
|
|
],
|
2017-03-13 22:26:13 +01:00
|
|
|
// Disallows importing the whole RxJS library. Submodules can be still imported.
|
|
|
|
|
"import-blacklist": [true, "rxjs"],
|
|
|
|
|
// Avoids inconsistent linebreak styles in source files. Forces developers to use LF linebreaks.
|
2017-06-14 23:16:40 +02:00
|
|
|
"linebreak-style": [true, "LF"],
|
2017-08-04 23:00:29 +02:00
|
|
|
"require-license-banner": [true, "src/+(lib|cdk)/**/!(*.spec).ts"]
|
2016-01-15 17:47:43 -08:00
|
|
|
}
|
|
|
|
|
}
|