codelyzer

Static analysis for Angular projects.

MIT License

Downloads
2.7M
Stars
2.4K
Committers
65

Bot releases are hidden (Show)

codelyzer - Latest Release

Published by mgechev over 5 years ago

Bug Fixes

  • rule: 'contextual-decorator' - decorators with arguments, accessors and some missing decorators not being handled (#798) (efbcb69)
  • rule: template-banana-in-box regex failing in some environments (#820) (3b82574)

Features

  • rule: add use-injectable-provided-in (#814) (656816f)
codelyzer -

Published by mgechev over 5 years ago

Bug Fixes

  • rule: detect trackBy function when ngFor spans multiple lines (#813) (2260dfd)
  • rule: template-accessibility-label-for not recognizing options and interpolated values (#812) (1fb5d8a)
codelyzer -

Published by mgechev over 5 years ago

🙇🏼‍♂️ Thanks to @rafaelss95, @mohammedzamakhan, @wKoza, @mgechev

BREAKING CHANGES

Angular CLI will automatically migrate your projects to reflect the latest config.

  • contextual-life-cycle is renamed to contextual-lifecycle
  • no-conflicting-life-cycle-hooks is renamed to no-conflicting-lifecycle
  • no-life-cycle-call is renamed to no-lifecycle-call
  • use-life-cycle-interface is renamed to use-lifecycle-interface
  • decorator-not-allowed is renamed to contextual-decorator
  • enforce-component-selector is renamed to use-component-selector
  • no-output-named-after-standard-event is renamed to no-output-native
  • use-host-property-decorator is renamed to no-host-metadata-property
  • use-input-property-decorator is renamed to no-inputs-metadata-property
  • use-output-property-decorator is renamed to no-outputs-metadata-property
  • no-queries-parameter is renamed to no-queries-metadata-property
  • pipe-impure is renamed to no-pipe-impure
  • use-view-encapsulation is renamed to use-component-view-encapsulation
  • i18n is renamed to template-i18n
  • banana-in-box is renamed to template-banana-in-box
  • no-template-call-expression is renamed to template-no-call-expression
  • templates-no-negated-async is renamed to template-no-negated-async
  • trackBy-function is renamed to template-use-track-by-function
  • no-attribute-parameter-decorator is renamed to no-attribute-decorator
  • max-inline-declarations is renamed to component-max-inline-declarations

Bug Fixes

  • rule: template-no-call-expression should allow $any usages (#735) (a75c204)
  • rule: no-input-rename reporting some failures incorrectly (#723) (f692dcb)
  • rule: prefer-inline-decorator should not set a max number of options (#787) (31b2b6a)
  • rule: add template-accessibility-elements-content to index.ts (#803) (1e8cbbf), closes #801
  • update peerDependencies (d5bfbd5)

Features

  • rule: add component-change-detection (#737) (a23ccde), closes #135
  • rule: add relative-url-prefix (#725) (f12f27b)
  • rule: add template-accessibility-alt-text (#741) (0815ec5)
  • rule: add template-accessibility-elements-content (#742) (6ff8c56)
  • rule: add template-accessibility-label-for (#739) (76c24fa)
  • rule: add template-accessibility-tabindex-no-positive (#744) (43902f7)
  • rule: add template-accessibility-table-scope (#743) (2832615)
  • rule: add template-accessibility-valid-aria (#746) (762f67f)
  • rule: add template-click-events-have-key-events (#761) (b0b330f)
  • rule: add template-mouse-events-have-key-events (#759) (3a7b15d)
  • rule: add template-no-autofocus (#749) (799382f)
  • rule: add template-no-distracting-elements (#760) (6b21a9e)
  • rule: add template-no-any (#755) (77a5e32)
  • add support for svg templates (#800) (dadf8ec)
    This release contains many breaking changes due to the rename of several rules (see more at (bbf7a32)). Currently, there's an open PR (https://github.com/angular/angular-cli/pull/13801) that will help migrate your app if you are affected by these changes.
codelyzer -

Published by mgechev over 5 years ago

codelyzer -

Published by mgechev over 5 years ago

Bug fixes

  • update peerDependencies (d5bfbd5)

Keep in mind the following renames:

contextual-life-cycle => contextual-lifecycle
no-conflicting-life-cycle-hooks => no-conflicting-lifecycle
no-life-cycle-call => no-lifecycle-call
use-life-cycle-interface => use-lifecycle-interface
decorator-not-allowed => contextual-decorator
enforce-component-selector => use-component-selector
no-output-named-after-standard-event => no-output-native
use-host-property-decorator => no-host-metadata-property
use-input-property-decorator => no-inputs-metadata-property
use-output-property-decorator => no-outputs-metadata-property
no-queries-parameter => no-queries-metadata-property
pipe-impure => no-pipe-impure
use-view-encapsulation => use-component-view-encapsulation
i18n => template-i18n
banana-in-box => template-banana-in-box
no-template-call-expression => template-no-call-expression
templates-no-negated-async => template-no-negated-async
trackBy-function => template-use-track-by-function
no-attribute-parameter-decorator => no-attribute-decorator
max-inline-declarations => component-max-inline-declarations

codelyzer -

Published by mgechev over 5 years ago

Bug Fixes

  • allow-template-call-expression: allow $any in expressions (#735) (a75c204)
  • no-input-rename: some failures being reported incorrectly (#723) (f692dcb)
  • rule: don't check keyup events for some elements (#772) (a9c4ae9)
  • rule: 'prefer-inline-decorator' limiting the number of options (#787) (31b2b6a)
  • rule: fix spelling error (#753) (512a5bd)
  • rule: remove an astray console.log (#764) (fdcb07a)

Features

  • component-change-detection: add change detection strategy rule (#737) (a23ccde), closes #135
  • rule: accessibility rule for alt text (#741) (0815ec5)
  • rule: add new Rule RelativePathExternalResourcesRule (#725) (f12f27b)
  • rule: anchor element should have content (#742) (6ff8c56)
  • rule: autofocus attribute should not be used (#749) (799382f)
  • rule: click event should be accompanied with key event (#761) (b0b330f)
  • rule: heading and anchor elements should have content (#762) (865ec3b)
  • rule: label accessibility - should have associated control (#739) (76c24fa)
  • rule: mouse events should accompany key events (#759) (3a7b15d)
  • rule: no distracting elements should be used (#760) (6b21a9e)
  • rule: only th element can have scope (#743) (2832615)
  • add template-no-any rule (#755) (77a5e32)
  • rule: tabindex should not be positive (#744) (43902f7)
  • rule: use valid aria rules (#746) (762f67f)
codelyzer -

Published by mgechev over 5 years ago

Bug Fixes

  • assertFailure catch exception throw by assert (#703) (#704) (0bac287)
  • no-unused-css: blank lines being left after fixing (#701) (c69e2ae)
codelyzer -

Published by mgechev about 6 years ago

Bug Fixes

  • errors not being displayed in the correct files (#700) (db3cf5a)
codelyzer -

Published by mgechev about 6 years ago

Bug Fixes

  • url not passed to transformStyle when using styleUrls (#686) (5a84041)
  • templates-no-negated-async: not reporting failures for some cases (#694) (2ffe2ea)
codelyzer - 4.4.2

Published by mgechev over 6 years ago

Bug Fixes

  • no-output-on-prefix: fix regular expression (#674) (adc974a)
codelyzer - 4.4.1

Published by mgechev over 6 years ago

Bug Fixes

  • TypeError: ts.isStringLiteralLike is not a function #669 d922dcb
  • prefer-inline-decorator is missing in v4.4 #670 d922dcb
codelyzer - 4.4.0

Published by mgechev over 6 years ago

Bug Fixes

  • no-input-prefix: exact strings not being reported (#597) (1ed8d8c)
  • no-input-rename: aria attributes not being allowed to be renamed (#665) (2c905ab), closes #663
  • no-input-rename: fix bugs (#585) (75f9de6), closes #580
  • no-template-call-expression: not being exported (#582) (ad57552), closes #577
  • no-life-cycle-call: fix bugs (#575) (4415cc2), closes #573
  • no-input-prefix: not being able to check for multiple concurrent prefixes (#590) (43d415a), closes #589
  • no-output-rename: not being reported for some cases (#614) (5e34f41), closes #613
  • template-conditional-complexity: not reporting failures for '[ngIf]' (#611) (7fc3b09), closes #607
  • template-cyclomatic-complexity: not reporting failures for '[ngForOf]' and '[ngIf]' (#612) (fedd331), closes #609
  • trackBy-function: not reporting failures for '[ngForOf]' (#610) (af52912), closes #608
  • some rules not considering options correctly (#617) (bce0026)

Features

  • import-destructuring-spacing: add fixer (#595) (2acc27b)
  • max-inline-declarations: add option to limit animations lines (#569) (25f3e16), closes #568
  • rule: add no-queries-parameter rule (#571) (e9f4d23)
  • rule: add prefer-inline-decorator rule (#586) (5d5e21d), closes #549
  • build scripts are not cross-platform #581 204c8ef, closes #454
  • upgrade TypeScript dependency to 2.7.2 #584 d4bf62d, closes #583
  • turn on strict TS compilation mode (#631) (da0f553), closes #629
  • externalizing template, css visitor abstractions and NgWalker (#658) (b79ea58)

Credits to the codelyzer's maintainers and contributors.

codelyzer -

Published by mgechev over 6 years ago

New Rules

  • max-inline-declarations which limits the size of inline templates and/or styles. Credits to NagRock #536 174ed46.
  • prefer-output-readonly requires the @Outputs of a component to be readonly. Credits to rafaelss95 #515 3d652d1.
  • no-conflicting-life-cycle-hooks prevents to implement OnChanges and DoCheck on the same class. Credits to rafaelss95 #560 e521115.
  • enforce-component-selector Component Selector Required #551 b9c899b. Credits to wKoza.
  • no-life-cycle-call disallow explicit calls to lifecycle hooks. Credits to rafaelss95 #427 3e10013

Bug Fixes

  • Possible bug with no-input-rename #374 f3a53bd.
  • Removed dependency on @angular/platform-browser-dynamic #525 671e954.
  • Rule contextual-life-cycle too aggressively scoped #545 dcb4b3e.
  • no-output-named-after-standard-event Does Not Check Output Rename #537 96d9292.
  • Template Conditional Complexity reports incorrect threshold #533 5851306.

A lot of credits go to rafaelss95, wKoza. The rest of the amazing people who work on codelyzer can be found here.

codelyzer -

Published by mgechev over 6 years ago

Bug Fixes

  • Improved peerDependencies range.
codelyzer -

Published by mgechev over 6 years ago

New Rules

  • template-cyclomatic-complexity which limits the estimated Cyclomatic complexity in your templates. Credits to wKoza.
  • template-conditional-complexity which limits the complexity of boolean expressions inside of your templates. Credits to wKoza.

Features

  • Support for Angular version 6 #524 50fa2d6
  • Cyclomatic complexity rule template-cyclomatic-complexity #514 3221330
  • Limiting template condition complexity (rule template-conditional-complexity) #508 bb86295
  • Complete Rules Status section in README and complete Rules Page #501 1fe9d22

Bug Fixes

  • "extends": ["codelyzer"] is broken #505 7b76dfa
  • Message for 'use-host-property-decorator' includes invalid link to Angular style docs #510 5fc77c9
codelyzer -

Published by mgechev almost 7 years ago

Features

  • Feature request: no output named after a standard DOM event #473 ae3f07b
  • Support for Angular Compiler 5.2 #496 6a6b3de

Bug Fixes

  • i18n check-text edge cases #442 4c1c8d4
  • Codelyzer hanging for "styles" attribute in Angular component #446 a31c6d2 and 9c90ac3
  • no-output-on-prefix incorrectly throws error if output property name starts with "one" #480 9b844cc

Thanks to @gbilodeau for NoOutputNamedAfterStandardEventRule and wKoza for the code reviews!

codelyzer -

Published by mgechev almost 7 years ago

Bug Fixes

  • Two issues in angular-whitespace related to check-semicolon and check-interpolation #469 2ef7438
  • Check multiple semicolons inside the directive expressions #472 e6036d2

Thanks to @sagittarius-rev for the bug fixes!

codelyzer - 4.0.1

Published by mgechev almost 7 years ago

Bug Fixes

  • Fix noOutputOnPrefixRule and rename it to no-output-on-prefix. You can now enable it with:
"no-output-on-prefix": true
  • Fix broken tests for noOutputOnPrefixRule.
codelyzer - 4.0.0

Published by mgechev almost 7 years ago

Features

Enable the new rule by adding the following line in your tslint.json config file:

"no-output-on-prefix-name": true

Thanks to @eromano for the rule implementation!

Breaking Changes

  • The rules templates-use-public, no-access-missing-member, invoke-injectable and template-to-ng-template no longer exist. Remove them from your tslint.json configuration.
codelyzer -

Published by mgechev almost 7 years ago

Features

Bug Fixes