Skip to content

Commit

Permalink
chore(tsconfig, tslint): my package, my rules
Browse files Browse the repository at this point in the history
  • Loading branch information
toverux committed Aug 17, 2019
1 parent bf91a7e commit 4416eb7
Show file tree
Hide file tree
Showing 5 changed files with 86 additions and 100 deletions.
45 changes: 33 additions & 12 deletions projects/ngx-sweetalert2-demo/tslint.json
@@ -1,17 +1,38 @@
{
"extends": "../../tslint.json",
"rulesDirectory": ["codelyzer"],
"rules": {
"directive-selector": [
true,
"attribute",
"app",
"camelCase"
],
"component-selector": [
true,
"element",
"app",
"kebab-case"
]
"component-class-suffix": true,
"component-max-inline-declarations": true,
"component-selector": [true, "element", "demo", "kebab-case"],
"contextual-lifecycle": true,
"directive-class-suffix": true,
"directive-selector": [true, "attribute", "demo", "camelCase"],
"no-attribute-decorator": true,
"no-conflicting-lifecycle": true,
"no-forward-ref": true,
"no-host-metadata-property": true,
"no-input-rename": true,
"no-inputs-metadata-property": true,
"no-lifecycle-call": true,
"no-output-native": true,
"no-output-on-prefix": true,
"no-output-rename": true,
"no-outputs-metadata-property": true,
"no-pipe-impure": true,
"no-queries-metadata-property": true,
"no-unused-css": false,
"prefer-inline-decorator": false,
"prefer-output-readonly": true,
"template-banana-in-box": true,
"template-conditional-complexity": [true, 4],
"template-cyclomatic-complexity": [false, 5],
"template-i18n": [false, "check-id", "check-text"],
"template-no-negated-async": true,
"template-use-track-by-function": false,
"use-component-selector": false,
"use-component-view-encapsulation": true,
"use-lifecycle-interface": true,
"use-pipe-transform-interface": true
}
}
6 changes: 5 additions & 1 deletion projects/ngx-sweetalert2/tsconfig.lib.json
Expand Up @@ -6,7 +6,11 @@
"declaration": true,
"inlineSources": true,
"types": [],
"lib": ["dom", "es2018"]
"lib": ["dom", "es2018"],
"strict": true,
"noImplicitAny": true,
"noImplicitThis": true,
"noUnusedLocals": true
},
"angularCompilerOptions": {
"annotateForClosureCompiler": true,
Expand Down
45 changes: 33 additions & 12 deletions projects/ngx-sweetalert2/tslint.json
@@ -1,17 +1,38 @@
{
"extends": "../../tslint.json",
"rulesDirectory": ["codelyzer"],
"rules": {
"directive-selector": [
true,
"attribute",
"swal",
"camelCase"
],
"component-selector": [
true,
"element",
"swal",
"kebab-case"
]
"component-class-suffix": true,
"component-max-inline-declarations": true,
"component-selector": [true, "element", "swal", "kebab-case"],
"contextual-lifecycle": true,
"directive-class-suffix": true,
"directive-selector": [true, "attribute", "swal", "camelCase"],
"no-attribute-decorator": true,
"no-conflicting-lifecycle": true,
"no-forward-ref": true,
"no-host-metadata-property": true,
"no-input-rename": true,
"no-inputs-metadata-property": true,
"no-lifecycle-call": true,
"no-output-native": true,
"no-output-on-prefix": true,
"no-output-rename": true,
"no-outputs-metadata-property": true,
"no-pipe-impure": true,
"no-queries-metadata-property": true,
"no-unused-css": false,
"prefer-inline-decorator": false,
"prefer-output-readonly": true,
"template-banana-in-box": true,
"template-conditional-complexity": [true, 4],
"template-cyclomatic-complexity": [false, 5],
"template-i18n": [false, "check-id", "check-text"],
"template-no-negated-async": true,
"template-use-track-by-function": false,
"use-component-selector": false,
"use-component-view-encapsulation": true,
"use-lifecycle-interface": true,
"use-pipe-transform-interface": true
}
}
4 changes: 4 additions & 0 deletions tsconfig.json
Expand Up @@ -13,6 +13,10 @@
"target": "es2015",
"typeRoots": ["node_modules/@types"],
"lib": ["es2018", "dom"],
"strict": true,
"noImplicitAny": true,
"noImplicitThis": true,
"noUnusedLocals": true,
"paths": {
"@sweetalert2/ngx-sweetalert2": ["dist/ngx-sweetalert2"],
"@sweetalert2/ngx-sweetalert2/*": ["dist/ngx-sweetalert2/*"]
Expand Down
86 changes: 11 additions & 75 deletions tslint.json
@@ -1,80 +1,16 @@
{
"extends": "tslint:recommended",
"rulesDirectory": [
"codelyzer"
],
"extends": "tslint:latest",
"rules": {
"array-type": false,
"arrow-parens": false,
"deprecation": {
"severity": "warning"
},
"import-blacklist": [
true,
"rxjs/Rx"
],
"interface-name": false,
"max-classes-per-file": false,
"max-line-length": [
true,
140
],
"member-access": false,
"member-ordering": [
true,
{
"order": [
"static-field",
"instance-field",
"static-method",
"instance-method"
]
}
],
"no-consecutive-blank-lines": false,
"no-console": [
true,
"debug",
"info",
"time",
"timeEnd",
"trace"
],
"no-empty": false,
"no-inferrable-types": [
true,
"ignore-params"
],
"no-non-null-assertion": true,
"no-redundant-jsdoc": true,
"no-switch-case-fall-through": true,
"no-use-before-declare": true,
"no-var-requires": false,
"object-literal-key-quotes": [
true,
"as-needed"
],
"object-literal-sort-keys": false,
"ordered-imports": false,
"quotemark": [
true,
"single"
],
"curly": false,
"quotemark": [true, "single"],
"no-submodule-imports": [true, "@angular", "zone.js"],
"no-implicit-dependencies": [true, [
"@angular/platform-browser-dynamic", "@sweetalert2/ngx-sweetalert2", "zone.js"
]],
"trailing-comma": false,
"component-class-suffix": true,
"contextual-lifecycle": true,
"directive-class-suffix": true,
"no-conflicting-lifecycle": true,
"no-host-metadata-property": true,
"no-input-rename": true,
"no-inputs-metadata-property": true,
"no-output-native": true,
"no-output-on-prefix": true,
"no-output-rename": true,
"no-outputs-metadata-property": true,
"template-banana-in-box": true,
"template-no-negated-async": true,
"use-lifecycle-interface": true,
"use-pipe-transform-interface": true
"object-literal-sort-keys": false,
"comment-format": false,
"arrow-parens": false,
"interface-name": false
}
}

0 comments on commit 4416eb7

Please sign in to comment.