代码拉取完成,页面将自动刷新
{
"extends": [
"rxjs-tslint-rules"
],
"rulesDirectory": [
"./tools/tslint-rules/",
"node_modules/vrsource-tslint-rules/rules",
"node_modules/codelyzer"
],
"rules": {
"max-line-length": [true, {
"limit": 100,
"check-strings": true,
"check-regex": true,
"ignore-pattern": "//\\s+https?://"
}
],
// 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,
"comment-format": [
true,
"check-space"
],
"indent": [
true,
"spaces"
],
"eofline": true,
"no-construct": true,
"prefer-literal": [true, "object"],
"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,
"no-unused-expression": true,
"no-unused-variable": true,
"no-var-keyword": true,
"member-access": [true, "no-public"],
"no-debugger": true,
"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",
"allow-leading-underscore",
"allow-snake-case"
],
"whitespace": [
true,
"check-branch",
"check-decl",
"check-operator",
"check-separator",
"check-type",
"check-preblock"
],
// Bans jasmine helper functions that will prevent the CI from properly running tests.
"ban": [
true,
["fit"],
["fdescribe"],
["xit"],
["xdescribe"],
{"name": ["first"], "message": "Use take(1) instead."},
{"name": ["Object", "assign"], "message": "Use the spread operator instead."},
{"name": ["*", "asObservable"], "message": "Cast to Observable type instead."},
{"name": ["isDevMode"], "message": "Use `typeof ngDevMode === 'undefined' || ngDevMode` instead"}
],
// Avoids inconsistent linebreak styles in source files. Forces developers to use LF linebreaks.
"linebreak-style": [true, "LF"],
// Namespaces are not allowed, because of Closure compiler.
"no-namespace": true,
"jsdoc-format": [true, "check-multiline-start"],
"no-duplicate-imports": true,
"await-promise": [true, "PromiseLike"],
"array-type": [true, "array"],
// Codelyzer
"template-banana-in-box": true,
"contextual-lifecycle": true,
"contextual-decorator": true,
"no-output-on-prefix": true,
"template-no-negated-async": true,
"use-lifecycle-interface": true,
// RxJS
"rxjs-no-unsafe-takeuntil": true,
"rxjs-no-unsafe-catch": true,
// Custom Rules
"ts-loader": true,
"no-exposed-todo": true,
"no-import-export-spacing": true,
"no-private-getters": [true, "^_"],
"no-undecorated-base-class-di": true,
"no-undecorated-class-with-angular-features": true,
"setters-after-getters": true,
"ng-on-changes-property-access": true,
"require-breaking-change-version": true,
"class-list-signatures": true,
"no-nested-ternary": true,
"prefer-const-enum": true,
"no-lifecycle-invocation": [true, "**/!(*.spec).ts"],
"lightweight-tokens": [
true,
["src/**/!(*.spec).ts"],
// Directionality is always used in Angular Material and therefore does not
// need a lightweight token. Date Adapter is not very significant and does not
// need a dedicated token.
["Directionality", "DateAdapter"]
],
"coercion-types": [true,
["coerceBooleanProperty", "coerceCssPixelValue", "coerceNumberProperty"],
{
"CanDisable": ["disabled"],
"CanDisableRipple": ["disableRipple"],
"HasTabIndex": ["tabIndex"]
}
],
"no-host-decorator-in-concrete": [
true,
"HostBinding",
"HostListener"
],
"member-naming": [true, {
"private": "^_"
}],
"symbol-naming": [true, "^_?[A-Z][a-zA-Z0-9]*$"],
"validate-decorators": [true, {
"Component": {
"argument": 0,
"properties": {
"!host": "\\[class\\]",
"!preserveWhitespaces": ".*",
"!styles": ".*",
"!moduleId": ".*",
"changeDetection": "\\.OnPush$",
"encapsulation": "\\.None$"
}
},
"Directive": {
"argument": 0,
"properties": {
"!host": "\\[class\\]"
}
},
"NgModule": {
"argument": 0,
"properties": {
"*": "^(?!\\s*$).+"
}
},
"ContentChildren": {
"argument": 1,
"required": true,
"properties": {
"descendants": "^(true|false)$"
}
}
}, "src/!(e2e-app|components-examples|universal-app|dev-app)/**/!(*.spec).ts"],
"require-license-banner": [
true,
"src/!(e2e-app|components-examples|universal-app)/**/!(*.spec).ts",
"test/benchmarks/**/*.ts"
],
"no-cross-entry-point-relative-imports": [
true,
"src/!(e2e-app|components-examples|universal-app|dev-app)/**/!(*.spec).ts",
"!src/+(cdk|material)/schematics/**/*",
"!src/cdk/testing/+(private|tests)/**/*",
"!src/google-maps/testing/**/*"
],
"file-name-casing": [true, {
// Exclude custom lint rule files since they have to always be camel-cased and end
// with "Rule".
"\\w+Rule.ts": "camel-case",
".*": "kebab-case"
}],
"no-unescaped-html-tag": true,
// Ensures that all rxjs imports come only from `rxjs` and `rxjs/operators`. Also ensures
// that no AST utils from `@schematics/angular` are imported. These should be vendored.
"import-blacklist": [true, ["^@schematics/angular/.*(ast).*", "^rxjs(?!$|/operators$).*"]]
},
"linterOptions": {
"exclude": [
// Exclude the API golden files
"tools/public_api_guard/**/*.d.ts",
// Exclude schematic template files and test cases that can't be linted.
"src/material/schematics/ng-generate/*/files/**/*",
"src/cdk/schematics/ng-generate/*/files/**/*",
"src/cdk/schematics/ng-update/test-cases/**/*",
"src/material/schematics/ng-update/test-cases/**/*"
]
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。