Skip to content

Additional codelyzer rules #6759

@mgechev

Description

@mgechev
  • feature request

In the latest release of codelyzer@3.1.0, there are a few new rules:

  • - angular-whitespace: [true, 'check-interpolation', 'check-pipe'] - Checks if there's whitespace around an expression surrounded by interpolation characters, and after a pipe symbol.
  • - banana-in-box: true - Checks for proper banana in a box syntax - [(ngModel)] instead of ([ngModel]).
  • - templates-no-negated-async: true - Enforces (foo | async) === false, rather than !(foo | async), because of the initial falsy value emitted.
  • - use-view-encapsulation: true - Enforces enabled view encapsulation.

I'm opening this issue in order to discuss which rules align with the vision of the CLI. After that I'll open a PR updating the configuration.

I'd vote for angular-whitespace, banana-in-box and templates-no-negated-async. Although use-view-encapsulation is very useful, it feels restrictive, however, I'd use it in personal projects.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P5The team acknowledges the request but does not plan to address it, it remains open for discussioneffort1: easy (hours)featureLabel used to distinguish feature request from other issueshelp wantedLabel noting an issue which the team is looking for contribution from the community to fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions