Skip to content

banana-in-box can be deprecated once new Angular compiler checks have auto-fixing #660

Closed as not planned

Description

@rafaelss95

According to angular/angular#42966, the compiler will start complain about wrong syntax in two-way binding, like we already do in banana-in-box rule.

In fact, the check has already been implemented in angular/angular#42984 (angular/angular@d6411c2) and angular/angular#43232 (angular/angular@fc85fa8).

So, with this in mind, should the banana-in-box rule be deprecated? cc @JamesHenry

Activity

  1. added
    question
    package: eslint-plugin-template
    on Sep 2, 2021
  2. added this to the v13 milestone on Sep 20, 2021
  3. JamesHenry commented on Sep 20, 2021

    @JamesHenry
    Member

    Cool, good catch! Yeah looks like we should mark this as deprecated in v13 onwards

  4. removed
    question
    on Sep 20, 2021
  5. JamesHenry commented on Sep 20, 2021

    @JamesHenry
    Member

    FYI Joost from the Angular Team said that these compiler checks are still behind a flag so it’s not time to deprecate it yet

  6. changed the title [-]About `banana-in-box`[/-] [+]`banana-in-box` can be deprecated once new Angular compiler checks are exposed publicly[/+] on Sep 21, 2021
  7. added
    blocked:@angular/compiler
    on Sep 21, 2021
  8. removed this from the v13 milestone on Sep 21, 2021
  9. JamesHenry commented on Apr 14, 2022

    @JamesHenry
    Member

    Extended diagnostics are available as of Angular 13.2, but until autofixing gets implemented it really isn't a fully viable alternative to the current lint rule.

    Autofixing tracked in angular/angular#44941

  10. changed the title [-]`banana-in-box` can be deprecated once new Angular compiler checks are exposed publicly[/-] [+]`banana-in-box` can be deprecated once new Angular compiler checks have auto-fixing[/+] on Jul 4, 2022
  11. DerZyklop commented on Oct 13, 2022

    @DerZyklop

    FYI:
    »support to fix invalid banana in box« got merged.

  12. JamesHenry commented on Nov 17, 2022

    @JamesHenry
    Member

    I don't think it makes sense to press ahead with this.

    Even in the newly released Angular v15 does not configured Extended Diagnostics for you, and for them to work you have to have opted into strictTemplates type checking, which we cannot rely on the user having done (source https://angular.io/extended-diagnostics)

    Overall there are just too many moving pieces here to provide a seamless switchover for users, the vast majority of which will have no idea about Extended Diagnostics at all.

    The minority of power users who want to switch over from the lint rule to the Extended Diagnostic can do so by simply disabling the rule in their ESLint config and wiring up the necessary tsconfig config per the above link.

    We can potentially revisit this if Angular switches its approach to Extended Diagnostics in the future and sets all users up with them by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    blocked:@angular/compilerpackage: eslint-plugin-template

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions