2016-03-28 17:25:22 -04:00
|
|
|
{
|
2016-10-27 14:48:47 -04:00
|
|
|
"rulesDirectory": [
|
2021-07-06 13:41:48 -04:00
|
|
|
"tools/tslint",
|
|
|
|
"dev-infra/tslint-rules",
|
2016-12-08 16:46:08 -05:00
|
|
|
"node_modules/vrsource-tslint-rules/rules",
|
2019-05-02 11:44:24 -04:00
|
|
|
"node_modules/tslint-eslint-rules/dist/rules",
|
|
|
|
"node_modules/tslint-no-toplevel-property-access/rules"
|
2016-10-27 14:48:47 -04:00
|
|
|
],
|
|
|
|
"rules": {
|
2021-07-06 13:41:48 -04:00
|
|
|
// The first rule needs to be `ts-node-loader` which sets up `ts-node` within TSLint so
|
|
|
|
// that rules written in TypeScript can be loaded without needing to be transpiled.
|
|
|
|
"ts-node-loader": true,
|
|
|
|
// Custom rules written in TypeScript.
|
|
|
|
"require-internal-with-underscore": true,
|
|
|
|
"no-implicit-override-abstract": true,
|
|
|
|
|
2021-06-04 10:57:07 -04:00
|
|
|
"eofline": true,
|
2018-08-16 18:55:45 -04:00
|
|
|
"file-header": [
|
|
|
|
true,
|
2020-05-19 15:07:26 -04:00
|
|
|
{
|
|
|
|
"match": "Copyright Google LLC",
|
|
|
|
"allow-single-line-comments": false
|
|
|
|
}
|
2018-08-16 18:55:45 -04:00
|
|
|
],
|
|
|
|
"no-console": [
|
|
|
|
true,
|
|
|
|
"log"
|
|
|
|
],
|
2019-10-16 19:52:48 -04:00
|
|
|
"no-construct": true,
|
2016-10-27 14:48:47 -04:00
|
|
|
"no-duplicate-imports": true,
|
|
|
|
"no-duplicate-variable": true,
|
2016-11-12 08:14:20 -05:00
|
|
|
"no-var-keyword": true,
|
2019-10-16 20:46:50 -04:00
|
|
|
"prefer-literal": [
|
|
|
|
true,
|
|
|
|
"object"
|
|
|
|
],
|
2019-05-02 11:44:24 -04:00
|
|
|
"no-toplevel-property-access": [
|
|
|
|
true,
|
|
|
|
"packages/animations/src/",
|
|
|
|
"packages/animations/browser/",
|
|
|
|
"packages/common/src/",
|
|
|
|
"packages/core/src/",
|
|
|
|
"packages/elements/src/",
|
|
|
|
"packages/forms/src/",
|
|
|
|
"packages/platform-browser/src/",
|
|
|
|
"packages/router/src/"
|
|
|
|
],
|
2018-08-16 18:55:45 -04:00
|
|
|
"semicolon": [
|
|
|
|
true
|
|
|
|
],
|
|
|
|
"variable-name": [
|
|
|
|
true,
|
|
|
|
"ban-keywords"
|
|
|
|
],
|
|
|
|
"no-inner-declarations": [
|
|
|
|
true,
|
|
|
|
"function"
|
|
|
|
],
|
2021-05-29 07:25:53 -04:00
|
|
|
"no-debugger": true,
|
|
|
|
"ban": [
|
|
|
|
true,
|
|
|
|
{"name": "fdescribe", "message": "Don't keep jasmine focus methods."},
|
|
|
|
{"name": "fit", "message": "Don't keep jasmine focus methods."}
|
|
|
|
]
|
2017-09-22 13:51:03 -04:00
|
|
|
},
|
|
|
|
"jsRules": {
|
2021-07-06 13:41:48 -04:00
|
|
|
// The first rule needs to be `ts-node-loader` which sets up `ts-node` within TSLint so
|
|
|
|
// that rules written in TypeScript can be loaded without needing to be transpiled.
|
|
|
|
"ts-node-loader": true,
|
|
|
|
// Custom rules written in TypeScript.
|
|
|
|
"require-internal-with-underscore": true,
|
|
|
|
|
2021-06-04 10:57:07 -04:00
|
|
|
"eofline": true,
|
2018-08-16 18:55:45 -04:00
|
|
|
"file-header": [
|
|
|
|
true,
|
2020-05-19 15:07:26 -04:00
|
|
|
{
|
|
|
|
"match": "Copyright Google LLC",
|
|
|
|
"allow-single-line-comments": false
|
|
|
|
}
|
2018-08-16 18:55:45 -04:00
|
|
|
],
|
|
|
|
"no-console": [
|
|
|
|
true,
|
|
|
|
"log"
|
|
|
|
],
|
2017-09-22 13:51:03 -04:00
|
|
|
"no-duplicate-imports": true,
|
|
|
|
"no-duplicate-variable": true,
|
2018-08-16 18:55:45 -04:00
|
|
|
"semicolon": [
|
|
|
|
true
|
|
|
|
],
|
|
|
|
"variable-name": [
|
|
|
|
true,
|
|
|
|
"ban-keywords"
|
|
|
|
],
|
|
|
|
"no-inner-declarations": [
|
|
|
|
true,
|
|
|
|
"function"
|
2021-05-29 07:25:53 -04:00
|
|
|
],
|
|
|
|
"ban": [
|
|
|
|
true,
|
|
|
|
{"name": "fdescribe", "message": "Don't keep jasmine focus methods."},
|
|
|
|
{"name": "fit", "message": "Don't keep jasmine focus methods."}
|
2018-08-16 18:55:45 -04:00
|
|
|
]
|
2020-03-02 12:35:30 -05:00
|
|
|
},
|
|
|
|
"linterOptions": {
|
|
|
|
"exclude": [
|
|
|
|
"**/node_modules/**/*",
|
|
|
|
// Ignore AIO and integration tests.
|
|
|
|
"./aio/**/*",
|
|
|
|
"./integration/**/*",
|
|
|
|
// Ignore output directories
|
|
|
|
"./built/**/*",
|
|
|
|
"./dist/**/*",
|
|
|
|
"./bazel-out/**/*",
|
|
|
|
// Ignore special files
|
|
|
|
"**/*.externs.js",
|
|
|
|
// Ignore test files
|
2020-11-11 10:29:43 -05:00
|
|
|
"./packages/compiler-cli/test/compliance/test_cases/**/*",
|
2020-03-02 12:35:30 -05:00
|
|
|
"./packages/localize/**/test_files/**/*",
|
|
|
|
"./tools/public_api_guard/**/*.d.ts",
|
|
|
|
"./modules/benchmarks_external/**/*",
|
|
|
|
// Ignore zone.js directory
|
|
|
|
// TODO(JiaLiPassion): add zone.js back later
|
2020-10-01 19:06:56 -04:00
|
|
|
"./packages/zone.js/**/*",
|
2020-12-07 13:57:43 -05:00
|
|
|
"./dev-infra/ng-dev.js",
|
|
|
|
"./dev-infra/build-worker.js"
|
2020-03-02 12:35:30 -05:00
|
|
|
]
|
2016-10-27 14:48:47 -04:00
|
|
|
}
|
2019-05-02 11:44:24 -04:00
|
|
|
}
|