Skip to content

Commit

Permalink
splits config into common typescript, react and angular
Browse files Browse the repository at this point in the history
  • Loading branch information
kaihenzler committed Mar 29, 2021
1 parent 407020e commit 41080f3
Show file tree
Hide file tree
Showing 7 changed files with 134 additions and 92 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,26 @@ npm install -D @w11k/tslint-presets
## Usage
After adding the package to your project, create or update your `tslint.json` file:

### Angular
```json
{
"extends": "@w11k/tslint-presets/angular.json",
"rules": {}
}
```

### React
```json
{
"extends": "@w11k/tslint-presets/react.json",
"rules": {}
}
```

### Typescript
```json
{
"extends": "@w11k/tslint-presets/typescript.recommended.json",
"rules": {}
}
```
92 changes: 2 additions & 90 deletions angular.recommended.json
Original file line number Diff line number Diff line change
@@ -1,84 +1,11 @@
{
"defaultSeverity": "warning",
"extends": "tslint:recommended",
"extends": "./typescript.recommended.json",
"rulesDirectory": [
"codelyzer",
"../../@w11k/rx-ninja/dist/bundle/tslint_rules"
],
"rules": {
"member-ordering": {
"options": {
"order": [
"public-static-field",
"protected-static-field",
"private-static-field",
"public-instance-field",
"protected-instance-field",
"private-instance-field",
"public-constructor",
"protected-constructor",
"private-constructor",
"public-static-method",
"protected-static-method",
"private-static-method",
"public-instance-method",
"protected-instance-method",
"private-instance-method"
]
}
},
"array-type": false,
"arrow-parens": false,
"deprecation": {
"severity": "warn"
},
"import-blacklist": [
true,
"rxjs/Rx"
],
"interface-name": false,
"max-classes-per-file": false,
"max-line-length": [
true,
140
],
"member-access": false,
"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": [
false,
"single"
],
"trailing-comma": [
true,
{
"multiline": "always",
"singleline": "never"
}
],
"no-output-on-prefix": true,
"no-inputs-metadata-property": true,
"no-outputs-metadata-property": true,
Expand All @@ -88,22 +15,7 @@
"use-lifecycle-interface": true,
"use-pipe-transform-interface": true,
"component-class-suffix": true,
"directive-class-suffix": true,
"one-variable-per-declaration": [true, "ignore-for-loop"],
"no-var-keyword": true,
"prefer-for-of": true,
"await-promise": true,
"no-string-throw": true,
"strict-boolean-expressions": true,
"no-any": true,
"no-unsafe-any": true,
"rx-ninja-subscribe-takeuntil": true,
"rx-ninja-subscribe-in-subscribe": true,
"whitespace": [
true,
"check-module",
"check-separator"
]
"directive-class-suffix": true
},
"jsRules": {}
}
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@w11k/tslint-presets",
"version": "0.0.12",
"version": "0.0.13",
"description": "tslint preset used a W11K",
"keywords": [
"tslint",
Expand Down
3 changes: 3 additions & 0 deletions react.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "./react.recommended.json"
}
10 changes: 10 additions & 0 deletions react.recommended.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"defaultSeverity": "warning",
"extends": "./typescript.recommended.json",
"rulesDirectory": [
"codelyzer",
"../../@w11k/rx-ninja/dist/bundle/tslint_rules"
],
"rules": {},
"jsRules": {}
}
100 changes: 100 additions & 0 deletions typescript.recommended.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
{
"defaultSeverity": "warning",
"extends": "tslint:recommended",
"rulesDirectory": [
"codelyzer",
"../../@w11k/rx-ninja/dist/bundle/tslint_rules"
],
"rules": {
"member-ordering": {
"options": {
"order": [
"public-static-field",
"protected-static-field",
"private-static-field",
"public-instance-field",
"protected-instance-field",
"private-instance-field",
"public-constructor",
"protected-constructor",
"private-constructor",
"public-static-method",
"protected-static-method",
"private-static-method",
"public-instance-method",
"protected-instance-method",
"private-instance-method"
]
}
},
"array-type": false,
"arrow-parens": false,
"deprecation": {
"severity": "warn"
},
"import-blacklist": [
true,
"rxjs/Rx"
],
"interface-name": false,
"max-classes-per-file": false,
"max-line-length": [
true,
140
],
"member-access": false,
"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": [
false,
"single"
],
"trailing-comma": [
true,
{
"multiline": "always",
"singleline": "never"
}
],
"one-variable-per-declaration": [true, "ignore-for-loop"],
"no-var-keyword": true,
"prefer-for-of": true,
"await-promise": true,
"no-string-throw": true,
"strict-boolean-expressions": true,
"no-any": true,
"no-unsafe-any": true,
"rx-ninja-subscribe-takeuntil": true,
"rx-ninja-subscribe-in-subscribe": true,
"whitespace": [
true,
"check-module",
"check-separator"
],
"interface-over-type-literal": false
},
"jsRules": {}
}

0 comments on commit 41080f3

Please sign in to comment.