Solvedangular eslint v13

Update on v13 (as of Nov 3, 2021)

The first prerelease has been published, anybody wanting to migrate to v13 can run:

npx ng update @angular-eslint/schematics --next

OR (for new workspaces)

npx ng add @angular-eslint/schematics@next

After they have already upgraded to Angular v13.

Please note: more breaking changes are likely at this stage before we declare v13 of angular-eslint stable, so please be aware of that when deciding whether or not to upgrade.

We will cut the stable release within the next week or so.

The PR is here if you wish to subscribe for updates: #780


This is the summary issue for work which will be included in v13 of the @angular-eslint/* packages.

The primary goals are:

  • Support angular 13
  • Support typescript-eslint 5
  • Support eslint 8
  • Support TypeScript 4.4

We will look to include other minor work which require breaking changes alongside this, but those are the priority items.

We will create a v13 branch and publish prereleases from it alongside patches to v12 from the master branch until angular-eslint v13 is deemed stable.


Update on supporting Angular 13 (as of Oct 25, 2021)

Between me and the Angular Team we have decided to start bundling the @angular/compiler within the @angular-eslint repo as a new package (which should never need to care about) called @angular-eslint/bundled-angular-compiler.

As reported below, the original reason to consider this was the fact that the Angular Team has stopped publishing bundles which can be synchronously required in node as of v13, but actually in discussing it further with the team there is another important reason to start bundling ourselves - they are planning on making a larger number of breaking changes to the internals of the compiler from v13 onwards, and the APIs we depend on are not officially part of the public API and so are not subject to the normal major version schedule.

Thanks to Alan from the Angular Tooling Team, we have already landed the new package and the way is now clear to focus on the remaining breaking changes related to Angular 13.

Notes on supporting Angular 13 (as of Oct 17, 2021)

Currently in the v13 prereleases the Angular Team has dropped all non-ESM artifacts from the packages. This is a huge problem for us because ESLint will not allow any of our tooling to be async and we therefore cannot resolve the runtime elements of @angular/compiler we need from node_modules in a way that is compatible with Node 12, which is still not EOL and is rightly supported by ESLint.

As things stand we would need to bundle an exact patch version of the @angular/compiler ourselves and keep this up to date.

I have written to the Angular Team on this point.

28 Answers

✔️Accepted Answer

The first prerelease has been published, anybody wanting to migrate to v13 can run:

npx ng update @angular-eslint/schematics --next

After they have already upgraded to Angular v13.

Please note: more breaking changes are likely at this stage before we declare v13 of angular-eslint stable, so please be aware of that when deciding whether or not to upgrade.

We will cut the stable release within the next week or so.

Other Answers:

Thanks for your patience everyone, v13.0.0 of angular-eslint has been released, if you encounter any issues with the stable version please kindly open new issues and follow the provided issue templates.

I have updated the original description with the latest status on Angular 13: #715 (comment)

@JounQin that is a very clever solution, as noted above there is now a significant secondary reason to want to bundle.

@Badisi @byrondover We will separate them if we can - meaning if it requires no breaking changes to @angular-eslint. I did already quickly try a dedicated eslint 8 a few weeks ago but it was not straightforward at all.

If somebody wants to take a crack at upgrading master to eslint 8 + typescript-eslint v5 with no breaking changes then please feel free (although please don't open the PR until it is ready so as not to create noise or discourage others from working on it).

Otherwise, I will be looking at it again very soon.

Awesome. Thanks for all your hard work!

#780 is nearly ready and I will begin publishing prereleases from that PR later today/tomorrow.

I have a long-haul flight today and will be offline for a large part of the day.

In the meantime I’ve been told by a user that version 12.6.0 functions with Angular 13 (thanks to the fact that we now bundle the compiler I imagine) so hopefully nobody is blocked if they are keen to jump on Angular 13 as soon as it’s released today.

More Issues: