Skip to content
This repository was archived by the owner on Apr 4, 2025. It is now read-only.

Commit 389c384

Browse files
committed
chore: update codelyzer and add rules
Codelyzer@^4.0.0 is out! It introduces few new rules such as: - `angular-whitespace` - checks whether we have presence of whitespace in the template to make it more readable, for instance in `{{ expr }}`, `check-interpolation` will check if `expr` is surrounded by whitespace. This rule also introduces auto fixes. - `no-output-on-prefix` - warns if outputs are prefixed with `on` this is based on https://angular.io/guide/styleguide#dont-prefix-output-properties. Tell me what you think about `angular-whitespace` and let me know if it is too opinionated. As part of `angular-whitespace` we're planning a few more features.
1 parent 6d7a7ea commit 389c384

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

packages/schematics/angular/application/files/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"@types/jasmine": "~2.5.53",
3333
"@types/jasminewd2": "~2.0.2",
3434
"@types/node": "~6.0.60",
35-
"codelyzer": "~3.2.0",
35+
"codelyzer": "^4.0.1",
3636
"jasmine-core": "~2.6.2",
3737
"jasmine-spec-reporter": "~4.1.0",
3838
"karma": "~1.7.0",

packages/schematics/angular/application/files/tslint.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@
127127
"<%= prefix %>",
128128
"kebab-case"
129129
],
130+
"angular-whitespace": [true, "check-interpolation"],
131+
"no-output-on-prefix": true,
130132
"use-input-property-decorator": true,
131133
"use-output-property-decorator": true,
132134
"use-host-property-decorator": true,
@@ -135,7 +137,6 @@
135137
"use-life-cycle-interface": true,
136138
"use-pipe-transform-interface": true,
137139
"component-class-suffix": true,
138-
"directive-class-suffix": true,
139-
"invoke-injectable": true
140+
"directive-class-suffix": true
140141
}
141142
}

0 commit comments

Comments
 (0)