diff --git a/packages/cli/generators/project/templates/tslint.build.json b/packages/cli/generators/project/templates/tslint.build.json index 11aa5c89be1e..0ace3417fa90 100644 --- a/packages/cli/generators/project/templates/tslint.build.json +++ b/packages/cli/generators/project/templates/tslint.build.json @@ -1,17 +1,4 @@ { "$schema": "http://json.schemastore.org/tslint", - "extends": ["./tslint.json"], - // This configuration files enabled rules which require type checking - // and therefore cannot be run by Visual Studio Code TSLint extension - // See https://github.com/Microsoft/vscode-tslint/issues/70 - "rules": { - // These rules find errors related to TypeScript features. - - // These rules catch common errors in JS programming or otherwise - // confusing constructs that are prone to producing bugs. - - "await-promise": true, - "no-floating-promises": true, - "no-void-expression": [true, "ignore-arrow-function-shorthand"] - } + "extends": ["./node_modules/@loopback/build/config/tslint.build.json"] } diff --git a/packages/cli/generators/project/templates/tslint.json b/packages/cli/generators/project/templates/tslint.json index f151a872949c..6a8445c727c3 100644 --- a/packages/cli/generators/project/templates/tslint.json +++ b/packages/cli/generators/project/templates/tslint.json @@ -1,7 +1,7 @@ { "$schema": "http://json.schemastore.org/tslint", <% if (project.loopbackBuild) { -%> - "extends": ["./node_modules/@loopback/build/config/tslint.build.json"] + "extends": ["./node_modules/@loopback/build/config/tslint.common.json"] <% } else { -%> // See https://palantir.github.io/tslint/rules/ "rules": { diff --git a/tslint.build.json b/tslint.build.json index 67f07ae8d46f..0de4205d0047 100644 --- a/tslint.build.json +++ b/tslint.build.json @@ -1,20 +1,10 @@ { "$schema": "http://json.schemastore.org/tslint", - "extends": [ - "./tslint.json" - ], - // This configuration files enabled rules which require type checking - // and therefore cannot be run by Visual Studio Code TSLint extension - // See https://github.com/Microsoft/vscode-tslint/issues/70 - "rules": { - // These rules find errors related to TypeScript features. - - - // These rules catch common errors in JS programming or otherwise - // confusing constructs that are prone to producing bugs. - - "await-promise": true, - "no-floating-promises": true, - "no-void-expression": [true, "ignore-arrow-function-shorthand"] + "extends": ["./packages/build/config/tslint.build.json"], + "linterOptions": { + "exclude": [ + "./packages/cli/generators/*/templates/**/*", + "./packages/cli/test/sandbox/**/*" + ] } } diff --git a/tslint.json b/tslint.json index 0de4205d0047..57fe820a65da 100644 --- a/tslint.json +++ b/tslint.json @@ -1,6 +1,6 @@ { "$schema": "http://json.schemastore.org/tslint", - "extends": ["./packages/build/config/tslint.build.json"], + "extends": ["./packages/build/config/tslint.common.json"], "linterOptions": { "exclude": [ "./packages/cli/generators/*/templates/**/*",