Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
rafaelss95 opened this issue Sep 2, 2021 · 5 comments
Labels
blocked:@angular/compiler This issue requires changes to the @angular/compiler in order to be resolved package: eslint-plugin-template Angular Template rules

Comments

@rafaelss95
Copy link
Member

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

@rafaelss95 rafaelss95 added question Further information is requested package: eslint-plugin-template Angular Template rules labels Sep 2, 2021
@JamesHenry JamesHenry added this to the v13 milestone Sep 20, 2021
@JamesHenry
Copy link
Member

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

@JamesHenry JamesHenry removed the question Further information is requested label Sep 20, 2021
@JamesHenry
Copy link
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

@JamesHenry JamesHenry changed the title About banana-in-box banana-in-box can be deprecated once new Angular compiler checks are exposed publicly Sep 21, 2021
@JamesHenry JamesHenry added the blocked:@angular/compiler This issue requires changes to the @angular/compiler in order to be resolved label Sep 21, 2021
@JamesHenry JamesHenry removed this from the v13 milestone Sep 21, 2021
@JamesHenry
Copy link
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

@JamesHenry JamesHenry 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 Jul 4, 2022
@DerZyklop
Copy link

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

@JamesHenry
Copy link
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.

@JamesHenry JamesHenry closed this as not planned Won't fix, can't repro, duplicate, stale Nov 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked:@angular/compiler This issue requires changes to the @angular/compiler in order to be resolved package: eslint-plugin-template Angular Template rules
Projects
None yet
Development

No branches or pull requests

3 participants