-
Couldn't load subscription status.
- Fork 152
feat: update codelyzer and add rules #257
Conversation
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.
389c384 to
1471daf
Compare
|
The update of codelyzer, along with a tslint one, is already proposed in #253 I don't think it's a good idea to enable the new |
|
The build seems to have failed with the following message. The following commit should always have a scope:
1471daf feat: update codelyzer and add rules
1 commits were found invalid...May be - this needs an 'amend'ed commit again with the right syntax with the component name in it ? Looking at the git history - we can try something like - "feat(@schematics/angular)" or "fix(@schematics/angular)"Eg: 2017-10-25 11:41 Alex Rickabaugh o feat(@schematics/angular): update Angular version to 5.0.0Would be good to have this fix in . cc @mgechev |
Yes, I found this discussion, right because of this behaviour. 😄 @mgechev |
|
Yes, the style guide doesn't specify a recommended way of using the interpolation syntax. The fact that we're using As mentioned above, this rule introduces an autofix so projects can be easily aligned to it. Although I believe wrapping an expression with whitespace characters is more readable I don't insist to enforce this coding style. If majority thinks that it's not a good idea, I don't mind excluding the rule. |
… rule While updating to Codelyzer 4.0, #257 also added a new `angular-whitespace` rule. This must be reverted because : - it is a breaking change : existing project are now failing on lint ; - it is opinionated (it is not in official Angular style guide) and so should not be forced ; - it is the contrary of what is done in the official Angular doc and in the style guide itself.
codelyzer@^4.0.0 is out 🎉! It introduces support for
@angular/compilerversion 5 and few new rules such as:angular-whitespace- checks whether we have presence of whitespacein the template to make it more readable, for instance
in
{{ expr }},check-interpolationwill check ifexprissurrounded by whitespace. This rule also introduces auto fixes.
no-output-on-prefix- warns if outputs are prefixed withonthisis based on
https://angular.io/guide/styleguide#dont-prefix-output-properties.
Tell me what you think about
angular-whitespaceand let me know if itis too opinionated. As part of
angular-whitespacewe're planning a fewmore features.
Also, since
invoke-injectableis supposed to be caught bytsc, this rule has been deprecated.Fixes angular/angular-cli#8463