Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: separate tslint config files for build and vscode #969

Merged
merged 1 commit into from
Feb 8, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 1 addition & 14 deletions packages/cli/generators/project/templates/tslint.build.json
Original file line number Diff line number Diff line change
@@ -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"]
}
2 changes: 1 addition & 1 deletion packages/cli/generators/project/templates/tslint.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
22 changes: 6 additions & 16 deletions tslint.build.json
Original file line number Diff line number Diff line change
@@ -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/**/*"
]
}
}
2 changes: 1 addition & 1 deletion tslint.json
Original file line number Diff line number Diff line change
@@ -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/**/*",
Expand Down