- use @angular/compiler 19.2.3 and rename some AST nodes to match (#2320)
- eslint-plugin-template: [button-has-type] add option to ignore missing type (#2326)
- eslint-plugin-template: add rule prefer-contextual-for-variables (#2311)
- template-parser: visit @let child nodes (#2312)
- update typescript-eslint packages to v8.26.1 (#2313)
- update typescript-eslint packages to v8.27.0 (#2328)
- update dependency eslint to v9.23.0 (#2331)
- eslint-plugin-template: [i18n] Avoid exception in i18n rule with allowMarkupInContent=false (#2327)
- eslint-plugin-template: [attributes-order] order i18n attributes (#2307)
- eslint-plugin-template: [attributes-order] treat inputs without square brackets as attributes (#2316)
- Dave @reduckted
- m-akinc @m-akinc
- update dependency @angular/compiler to v19.2.1 (#2288)
- update dependency eslint-scope to v8.3.0 (#2296)
- update typescript-eslint packages to v8.26.0 (#2282)
- update dependency eslint to v9.22.0 (#2294)
- eslint-plugin-template: [prefer-self-closing-tags] resolve wrong reports when structural directive + no content + no self-closing (#2287)
- Guillaume DROUARD
- eslint-plugin: add rule require-lifecycle-on-prototype (#2259)
- update dependency @angular/compiler to v19.2.0 (#2268)
- update dependency eslint to v9.21.0 (#2243)
- update typescript-eslint packages to v8.25.0 (#2263)
- eslint-plugin: [no-output-native] update native event names (#2236)
- eslint-plugin-template: [prefer-self-closing-tags] do not treat comments as whitespace (#2256)
- eslint-plugin-template: [prefer-self-closing-tags] allow nested ng-content (#2257)
- eslint-plugin-template: [prefer-static-string-properties] do not check structural directives (#2253)
- eslint-plugin-template: find inline templates on components in blocks (#2238)
- prefer-static-string-properties: resolve bug with directives (#2271)
- prefer-static-string-properties: exclude special attributes (#2273)
- Dave @reduckted
- Marie Briand @mbriand-lucca
- eslint-plugin: prefer-signals read-only suggestion is now a fix (#2175)
- eslint-plugin: prefer-signals now checks .asReadonly() calls (#2218)
- eslint-plugin-template: add rule prefer-static-string-properties (#2228)
- update dependency ignore to v7 (#2200)
- update dependency @angular/compiler to v19.1.5 (#2226)
- update dependency semver to v7.7.1 (#2225)
- update typescript-eslint packages to v8.23.0 (#2212)
- update dependency eslint to v9.20.0 (#2217)
- eslint-plugin: [prefer-signals] support linkedSignal (#2213)
- eslint-plugin: [no-input-prefix] false positive on input initializer value (#2184)
- eslint-plugin-template: [prefer-self-closing-tags] do not remove HTML-encoded whitespace (#2229)
- eslint-plugin-template: [attribute-order] check for ng-template within svg (#2223)
- Cédric Exbrayat @cexbrayat
- Dave @reduckted
- Lucas Neto Moreira
- update typescript-eslint packages to v8.18.0 (#2171)
- eslint-plugin: [prefer-standalone] error range should only include property and value (#2172)
- James Henry @JamesHenry
- update dependency @angular/compiler to v19.0.3 (#2159)
- update dependency eslint to v9.16.0 (#2148)
- update typescript-eslint packages to v8.17.0 (#2153)
- eslint-plugin: add prefer-signals rule to exported config (#2150)
- eslint-plugin-template: prevent the slot tag from being self-closing (#2088)
- Joan Llenas @joanllenas
- Quentin Deroubaix @quentinderoubaix
As always we recommend that you update your existing workspaces by using ng update as we provide some helpful schematics to help migrate your workspaces to the latest and greatest.
However, please note that the angular-eslint package itself now supports being referenced as the schematics collection, so...
IF YOU ARE ALREADY USING angular-eslint and ESLint v9 and flat config you can now do the following:
ng update @angular/core @angular/cli angular-eslint(Note: If you encounter any issues with this, you may need to update to the latest v18 release of angular-eslint first)
IF YOU ARE STILL USING @angular-eslint/schematics and ESLint v8 and .eslintrc.json configs you can still do the following:
ng update @angular/core @angular/cli @angular-eslint/schematicsNOTE: There will not be any migration of your setup to ESLint v9 or flat configs for existing ESLint v8 workspaces while migrating to angular-eslint v19.
We will explore landing an opt in migration schematic in a minor release after 19.0.0.
- update angular packages to the stable v19 (#2120)
- allow referencing angular-eslint as the schematics collection (2be3107b)
⚠️ eslint-plugin: remove deprecated prefer-standalone-component rule (#2112)⚠️ eslint-plugin: prefer-standalone recognizes that standalone is the default (#2096)⚠️ eslint-plugin: remove deprecated sort-ngmodule-metadata-arrays rule (#2114)⚠️ eslint-plugin: remove deprecated no-host-metadata-property rule (#2113)- eslint-plugin: new rule prefer-signals (#1872)
⚠️ eslint-plugin: promote prefer-standalone to recommended (8dfdc4f4)
⚠️ eslint-plugin: promote prefer-standalone to recommended (8dfdc4f4)⚠️ eslint-plugin: remove deprecated no-host-metadata-property rule (#2113)⚠️ eslint-plugin: remove deprecated sort-ngmodule-metadata-arrays rule (#2114)⚠️ eslint-plugin: prefer-standalone recognizes that standalone is the default (#2096)⚠️ eslint-plugin: remove deprecated prefer-standalone-component rule (#2112)
- Daniel Kimmich @json-derulo
- Dave @reduckted
- James Henry @JamesHenry
- JamesHenry @JamesHenry
- Leosvel Pérez Espinosa @leosvelperez
- yarn pnp issues (#2143)
- update dependency @angular/compiler to v18.2.13 (#2139)
- update typescript-eslint packages to v8.16.0 (#2135)
- James Henry @JamesHenry
- update dependency eslint-scope to v8.2.0 (#2106)
- angular-eslint: allow using angular-eslint with ng add and ng update (#2134)
- eslint-plugin: handle
output()andinput()functions in various rules (#2098) - eslint-plugin: fix placement of lifecycle interface for subclasses (#1965)
- Aleksandr Martirosyan
- Dave @reduckted
- James Henry @JamesHenry
- support ESM configs and .cjs and .mjs extensions (#2068)
- update dependency aria-query to v5.3.2 (#2053)
- update dependency @angular/compiler to v18.2.8 (#2049)
- update dependency eslint-scope to v8.1.0 (#2075)
- update typescript-eslint packages to v8.10.0 (#2046)
- update dependency eslint to v9.13.0, support noConfigLookup (#2045)
- eslint-plugin: update list of native events (#1881)
- template-parser: traverse ng-content fallback content (#2031)
- Dementii K @demkalkov
- James Henry @JamesHenry
- Matt Lewis @mattlewis92
- update dependency eslint to v9.9.1 (#2008)
- update dependency @angular/compiler to v18.2.1 (#2006)
- update typescript-eslint packages to v8.2.0 (#2001)
- template-parser: visit receiver of Call expression (#2015)
- James Henry @JamesHenry
- Paweł Maniecki @P4
- eslint-plugin: new rule runtime-localize (#1898)
- update dependency eslint to v9.9.0 (#1976)
- update dependency @angular/compiler to v18.1.4 (#1973)
- update dependency ignore to v5.3.2 (#1979)
- update typescript-eslint packages to v8.1.0 (#1982)
- eslint-plugin-template: [interactive-supports-focus] allowList with form as default option to support event bubbling (#1922)
- eslint-plugin-template: [prefer-self-closing-tags] fix ng-content with rich default content (#1971)
- prefer-self-closing-tags: handle both forward and backward slash (#1967)
- Daniel Kimmich @json-derulo
- James Henry @JamesHenry
- m-akinc @m-akinc
- Sandi Barr @sandikbarr
- Simon
- update typescript-eslint to v8 stable, eslint v9.8.0 (#1956)
Run ng update @angular-eslint/schematics to automatically update your v8 prerelease dependencies of typescript-eslint to v8.0.0, as well as ESLint to v9.8.0 (if you are still using typescript-eslint v7 and ESLint v8 you will be unaffected by this migration).
- update dependency axobject-query to v4.1.0 (#1936)
- update dependency semver to v7.6.3 (#1933)
- update dependency eslint-scope to v8.0.2 (#1932)
- update dependency @angular/compiler to v18.1.3 (#1954)
- update nrwl monorepo to v19.5.4 (#1950)
- eslint-plugin: [prefer-standalone] ignore empty Directive decorators (#1949)
- eslint-plugin-template: add meta to preprocessor to resolve eslint cache error (#1924)
- James Henry @JamesHenry
- kwiateusz @kwiateusz
- Paweł Maniecki @P4
- eslint-plugin: [prefer-output-readonly] support output() function (#1876)
- eslint-plugin: [no-call-expression] add allowPrefix and allowSuffix (#1897)
- update dependency @angular/compiler to v18.0.2 (#1852)
- update dependency eslint to v9.5.0 (#1886)
- update dependency eslint to v9.6.0 (#1900)
- update dependency @angular/compiler to v18.0.5 (#1893)
- update nrwl monorepo to v19.3.2 (#1902)
- update typescript-eslint packages to v8.0.0-alpha.38 (#1904)
- eslint-plugin-template: [prefer-self-closing-tags] always ignore index.html files (#1865)
- eslint-plugin-template: [prefer-self-closing-tags] support ng-content with fallback content (#1880)
- test-utils: use configured RuleTester.afterAll over global (#1878)
- Christian Svensson
- Daniel Kimmich @json-derulo
- Dave @reduckted
- Martijn van der Meij
- Maximilian Main @MaximilianMain
- move typescript-eslint packages to peerDeps, consistently allow v7 and v8 (#1856)
As part of the v18 release, support for typescript-eslint v8 prereleases was added. For authors of custom rules that consume the @angular-eslint/utils or new @angular-eslint/test-utils packages, the initial way this was set up with dependencies could cause type conflicts between v7 and v8. To resolve this the @angular-eslint/* packages now depend on @typescript-eslint/* packages via a peerDependency which permits both v7 and v8 prereleases.
- James Henry @JamesHenry
As always we recommend that you update your existing workspaces by using ng update as we provide some helpful schematics to help migrate your workspaces to the latest and greatest. Running the following will update Angular, the Angular CLI and angular-eslint together:
ng update @angular/core @angular/cli @angular-eslint/schematicsNOTE: There will not be any migration of your setup to ESLint v9 or flat configs for existing workspaces in v18.
The ESLint team are working on auto-migrate tooling which we will leverage in an opt-in conversion generator once it is ready in a v18 minor release and consider full auto-migration in v19 in six months (aligned with Angular major release schedule as always).
If you want to manually migrate your workspace to use ESLint v9, typescript-eslint v8, and flat config you are welcome to and it should be fully supported in v18.
If you are going to attempt this, we strongly recommended creating a fresh Angular v18 workspace and adding angular-eslint to it per the instructions below and then copying the dependencies and configs that it applies into your existing workspace
Here is an example of what the new flat config with angular-eslint v18, typescript-eslint v8, and ESLint v9 looks like:
There is a decision to be made when adding to new Angular v18 workspaces.
Just as before, if you want to add angular-eslint to a workspace with no existing lint setup, you leverage ng add with the @angular-eslint/schematics package.
The difference is in v18, you have the option of using either:
- the latest version of ESLint v9, with the latest default so called "flat config" (
eslint.config.js) alongside the latest prerelease oftypescript-eslintv8 (https://typescript-eslint.io/blog/announcing-typescript-eslint-v8-beta) OR - the final stable version of ESLint v8, with the legacy so called "eslintrc" config (
.eslintrc.json) and the latest stable version oftypescript-eslintv7
The ESLint v9 option is the default scenario if you simply run ng add with no other changes. If you want to signal to angular-eslint that you instead want to go with the ESLint v8 option, simply add an eslint v8 (the exact version does not matter, it just needs to be less than 9) devDependency in your package.json before running the ng add. That's it - you don't even need to install the eslint package, it just needs to be listed there.
Here are example "after" root package.json files from the two scenarios:
1. No eslint devDependency specified before running ng add, use the default ESLint v9 setup. This will use the new angular-eslint and typescript-eslint core packages, so you will see much fewer individual devDependencies added:
2. eslint v8 devDependency is specified before running ng-add. Use ESlint 8.57.0 and the traditional @typescript-eslint/ and @angular-eslint/ packages.
⚠️ update to Angular v18, drop support for Angular v17 (#1830)⚠️ deprecate no-host-metadata-property rule and remove from recommended config of@angular-eslint/eslint-plugin(#1830)⚠️ drop support for ESLint v7 (#1830)⚠️ migrate test related utils out of@angular-eslint/utilsinto new@angular-eslint/test-utilspackage (#1830)- add support for ESLint v9 (maintaining support for the final version of ESLint v8 -
8.57.0). (#1830) - add the new
angular-eslintcore package for use in ESLint v9 workspaces (#1830) - generate new configs as the new default flat config with ESLint v9 and
typescript-eslintv8 prereleases (#1830)
- update links from angular.io to angular.dev (#1830)
⚠️ update to Angular v18, drop support for Angular v17 (#1830)⚠️ deprecate no-host-metadata-property rule and remove from recommended config of@angular-eslint/eslint-plugin(#1830)⚠️ drop support for ESLint v7 (#1830)⚠️ migrate test related utils out of@angular-eslint/utilsinto new@angular-eslint/test-utilspackage (#1830)
- James Henry @JamesHenry
- update typescript-eslint packages to v7.11.0 (#1846)
- update dependency @angular/compiler to v17.3.10 (#1835)
- eslint-plugin: [use-lifecycle-interface] add fixer for the rule (#1691)
- eslint-plugin-template: [i18n] add allowMarkupInContent option (#1795)
- update dependency @angular/compiler to v17.3.9 (#1821)
- update typescript-eslint packages to v7.10.0 (#1822)
- eslint-plugin: [no-input-rename] incorrectly triggers on input transforms (#1809)
- eslint-plugin-template: [label-has-associated-control] check id's in the for attribute of a label for existence (#1761)
- Auke Bruinsma
- Jonathan Kolberg @bulldog98
- m-akinc @m-akinc
- Mateusz
- James Henry @JamesHenry
- eslint-plugin: [no-duplicates-in-metadata-arrays] new rule (#1779)
- update dependency @angular/compiler to v17.3.4 (#1750)
- update dependency eslint-scope to v8.0.1 (#1762)
- update dependency @angular/compiler to v17.3.6 (#1775)
- update typescript-eslint packages to v7.8.0 (#1786)
- eslint-plugin: [sort-ngmodule-metadata-arrays] deprecate rule (#1781)
- eslint-plugin-template: [attributes-order] calculate valueless structural directive start/end positions correctly (#1726)
- schematics: update schema.json with latest from Angular (a5adbfc)
- “JamesHenry” @JamesHenry
- Adrian Baran @abaran30
- Brad Kovach @bradkovach
- eslint-plugin: add consistent-component-styles rule (#1710)
- eslint-plugin: add prefer-standalone rule for checking all components, directives and pipes (#1627)
- update dependency tmp to v0.2.3 (#1734)
- migrate to nx 18 (#1732)
- update dependency ignore to v5.3.1 (#1733)
- update dependency eslint to v8.57.0 (#1739)
- update typescript-eslint packages to v7 (major) (#1742)
- update dependency @angular/compiler to v17.3.0 (#1713)
- output declaration files in all packages (#1724)
- eslint-plugin-template: [eqeqeq] calculate offset to find true absolute source span (#1709)
- Christian Svensson
- Dave @reduckted
- James Henry @JamesHenry
- Joey Jacobs @joeyj
- Luis Estevez @estevezluis
- update typescript-eslint packages to v6.18.1 (#1685)
- update typescript-eslint packages to v6.19.0 (#1703)
- update dependency @angular/compiler to v17.1.0 (#1689)
- eslint-plugin-template: [no-call-expression] False negative with the new control flow syntax (#1677)
- eslint-plugin-template: handle i18n tags on structural direcives (#1662)
- Adam Reisinger @Res42
- Matt Lewis @mattlewis92
- eslint-plugin: [no-async-lifecycle-method] add rule (#1643)
- update dependency eslint to v8.56.0 (#1657)
- update typescript-eslint packages to v6.18.0 (#1682)
- update dependency @angular/compiler to v17.0.8 (#1618)
- update dependency eslint-scope to v8 (#1683)
- eslint-plugin-template: fix control flow syntax with i18n rule (#1656)
- Matt Lewis @mattlewis92
- Steven Chim @chimurai
- update nrwl monorepo to v17.1.3 (#1632)
- update typescript-eslint packages to v6.12.0 (#1631)
- update dependency ignore to v5.3.0 (#1622)
- update dependency eslint to v8.54.0 (#1625)
- update typescript-eslint packages to v6.13.0 (#1644)
- update typescript-eslint packages to v6.13.1 (#1649)
- eslint-plugin: fix max inline declarations rule for styles string (#1630)
- eslint-plugin-template: [prefer-ngsrc] Do not prefer ngsrc for base64-encoded strings (#1628)
- eslint-plugin-template: [prefer-control-flow] prevent error when… (#1634)
- Christian Svensson
- Daniel Kimmich @json-derulo
- Luis Estevez @estevezluis
- eslint-plugin-template: [no-negated-async] values used with the async pipe are not negated (#1606)
- eslint-plugin-template: [prefer-control-flow] add rule (#1600)
- update nrwl monorepo to v17.1.2 (#1617)
- update dependency @angular/compiler to v17.0.2 (#1607)
- update typescript-eslint packages to v6.11.0 (#1612)
- eslint-plugin-template: [attributes-order] fixes for structural directives and i18n ordering (#1602)
- Adrian Baran @abaran30
- Daniel Kimmich @json-derulo
- Phil McCloghry-Laing @pmccloghrylaing
All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.
17.0.1 (2023-11-09)
- parser: do not error on @defer usage in Angular 17 (#1604) (df5419f)
- update dependency @angular/compiler to v17.0.1 (#1601) (237a969)
17.0.0 (2023-11-08)
As always we recommend that you update your existing workspaces by using ng update as we provide some helpful schematics to help migrate your workspaces to the latest and greatest. Running the following will update Angular, the Angular CLI and angular-eslint together:
ng update @angular/core @angular/cli @angular-eslint/schematics- no declarations for eslint plugins (2498238)
- eslint-plugin-template: [prefer-self-closing-tags] consider ng-content and ng-template elements (#1573) (8e97d20)
- As always, the major version primarily communicates the alignment with Angular's major version. Only Angular 17 is supported by angular-eslint 17.
- Your Node version must now be 18.13.0 or higher. Node 16 support has been dropped in alignment with Angular 17, as Node 16 is EOL.
- typescript-eslint v6 is now used by angular-eslint, and we will migrate existing workspaces when you use
ng update. You may notice that some rule reports or configs have changed as a result, and we will not be able to automatically migrate all differences. Please see the typescript-eslint blog post about v6 for full information about the changes: https://typescript-eslint.io/blog/announcing-typescript-eslint-v6
16.3.1 (2023-11-08)
Note: Version bump only for package @angular-eslint/angular-eslint
16.3.0 (2023-11-08)
- generate type declarations for published packages (#1586) (ba5740b)
- update dependency @angular/compiler to v16.2.12 (#1571) (1e0704f)
- update dependency @angular/compiler to v16.2.9 (#1535) (4532eec)
- update dependency axobject-query to v4 (#1581) (0b6cd1a)
- update dependency eslint to v8.50.0 (#1538) (edfb9f7)
- update dependency eslint to v8.51.0 (#1556) (dca9e5f)
- update to @angular/cli v16.2.10 (#1593) (a49fc81)
16.2.0 (2023-09-17)
- eslint-plugin-template: [prefer-self-closing-tags] improve code style of fixer result (#1520) (6a86f19)
- eslint-plugin-template: fix fixer of inline templates (#1472) (470e12b)
- eslint-plugin: [use-component-selector] applies to template literals (#1468) (cbe60d3)
- update dependency @angular/compiler to v16.2.5 (#1517) (fcfe7cc)
- update dependency axobject-query to v3.2.1 (#1524) (bb171d4)
- update dependency eslint to v8.49.0 (#1511) (abeb9f5)
- eslint-plugin-template: [prefer-ngsrc] add rule (#1477) (0cfbc80)
- eslint-plugin: [sort-lifecycle-methods] add rule (#1320) (47f7975)
16.1.2 (2023-09-04)
- angular-eslint: ignore hostDirectives for no-output-rename and no-outputs-metadata-property (#1466) (208bf25)
- update dependency @angular/compiler to v16.2.3 (#1458) (2b895a8)
16.1.1 (2023-08-20)
- eslint-plugin-template: [attributes-order] Handle explicit ng-template usage (#1465) (7d1f592)
- eslint-plugin-template: update links to Angular i18n docs (#1476) (9633058)
- eslint-plugin: export require-localize-metadata rule (#1469) (e3dc936)
- update dependency eslint to v8.45.0 (#1461) (9c95032)
- update dependency eslint to v8.47.0 (#1489) (047338a)
- update dependency eslint-scope to v7.2.2 (#1460) (0bb6dca)
16.1.0 (2023-07-12)
- eslint-plugin-template: [attributes-order] fixes for structural directives and "dotted" names (#1448) (90c0e91)
- eslint-plugin: [valid-aria] tristate "mixed" value not handled (#1398) (e7c762a)
- update dependency @angular/compiler to v16.1.2 (#1411) (cd1622e)
- update dependency @angular/compiler to v16.1.4 (#1439) (a239094)
- update dependency aria-query to v5.3.0 (#1441) (4b3a9dd)
- update dependency eslint to v8.41.0 (#1394) (02b34fb)
- update dependency eslint to v8.44.0 (#1415) (8735f7b)
- update nrwl monorepo to v16.5.1 (#1443) (15bff48)
- update typescript-eslint packages to v5.59.8 (#1393) (5b0e87e)
- update typescript-eslint packages to v5.59.9 (#1420) (fdd817f)
- update typescript-eslint packages to v5.62.0 (#1444) (4affbf4)
- eslint-plugin-template: [no-duplicate-attributes] add allowStylePrecedenceDuplicates option (#1407) (6f69af8)
- eslint-plugin-template: [self-closing-tags] add rule (#1322) (6d26c59)
- eslint-plugin: add prefer-standalone-component rule (#1317) (94e4d4e)
16.0.3 (2023-05-29)
- update dependency @angular/compiler to v16.0.3 (#1378) (1bc04bf)
- update dependency eslint-scope to v7.2.0 (#1373) (ccbb170)
- update nrwl monorepo to v16.2.2 (#1391) (9f140e6)
- update typescript-eslint packages to v5.59.7 (#1392) (cf40e34)
16.0.2 (2023-05-17)
- update dependency eslint to v8.40.0 (#1341) (44f4233)
- update nrwl monorepo to v16.1.3 (#1371) (323d2c9)
16.0.1 (2023-05-03)
- schematics: ensure placeholder schema for convert-tslint-to-eslint is copied to dist (3c6f377)
16.0.0 (2023-05-03)
As always we recommend that you update your existing workspaces by using ng update as we provide some helpful schematics to help migrate your workspaces to the latest and greatest. Running the following will update Angular, the Angular CLI and angular-eslint together:
ng update @angular/core @angular/cli @angular-eslint/schematics- eslint-plugin-template: All accessibility rules are now grouped together and exposed via a new
@angular-eslint/template/accessibilityconfig. See the main README.md for an example of it in action. Our schematics will explicitly add it for you in new configs, but you are free to remove it if you wish (also note the BREAKING CHANGE regarding accessibility rule names below) - builder: support
reportUnusedDisableDirectivesoption - builder: respect using
eslint.config.js(a.k.a Flat Config) if it is already present. Our schematics will only be updated to generate Flat Config once it is the default way of configuring ESLint later in the year. - bump
eslintand all@typescript-eslintpackages to the latest (handled for you automatically by ourng updateschematic)
- As always, the major version primarily communicates the alignment with Angular's major version. Only Angular 16 is supported by angular-eslint 16.
- Your Node version must now be 16.13.0 or higher. Node 14 support has been dropped in alignment with Angular 16, as Node 14 is EOL.
- eslint-plugin: The legacy
base,recommended--extra,ng-cli-compatandng-cli-compat--formattingconfigs have been removed. See the updated guide on migrating from TSLint for more information: ./docs/MIGRATING_FROM_TSLINT.md - eslint-plugin-template: The legacy
baseconfig has been removed. See the updated guide on migrating from TSLint for more information: ./docs/MIGRATING_FROM_TSLINT.md - schematics: The legacy
convert-tslint-to-eslintschematic has been removed. See the updated guide on migrating from TSLint for more information: ./docs/MIGRATING_FROM_TSLINT.md - eslint-plugin-template: The deprecated
accessibility-label-forrule has been removed.label-has-associated-controlshould be used instead. An automated migration was provided whenlabel-has-associated-controlwas first added, so hopefully this should not impact too many folks. - eslint-plugin-template: Previously some, but not all, accessibility related rules had a prefix of
accessibility-in their name. This is inconsistent with all other rules which do not attempt to communicate why they exist in their names. Therefore that naming prefix has been removed from all rules for consistency. The accessibility related rules can easily be identified from the new@angular-eslint/template/accessibilityshared config. See the main README.md for an example of it in action.
15.2.1 (2023-02-10)
- eslint-plugin-template: [i18n] handle ng-template properly (#1257) (7b0877d)
- update dependency @angular/compiler to v15.1.4 (#1282) (d1b3d59)
- update dependency eslint to v8.32.0 (#1276) (15d2e23)
- update dependency eslint to v8.33.0 (#1292) (bd82b42)
- update typescript-eslint packages to v5.48.2 (#1278) (69d56a7)
15.2.0 (2023-01-14)
- eslint-plugin: [component-selector] enhance check for prefix and kebab-case (#1250) (16827e4)
- eslint-plugin: [no-inputs-metadata-property] do not report on directive composition API (#1248) (539cf9f)
- update dependency @angular/compiler to v15.0.2 (#1245) (061601f)
- update dependency @angular/compiler to v15.1.0 (#1252) (4295c59)
- update dependency eslint to v8.29.0 (#1246) (10c14d2)
- update dependency eslint to v8.31.0 (#1262) (db89c85)
- update dependency ignore to v5.2.1 (#1237) (609e06b)
- update dependency ignore to v5.2.4 (#1263) (a220e0c)
- update typescript-eslint packages to v5.45.1 (#1239) (abb7f79)
- update typescript-eslint packages to v5.48.1 (#1255) (11151d1)
- utils: use test case filename when specified (#1259) (37bfd14)
- utils: use tsconfigRootDir as root dir when specified (#1260) (19fe26c)
- eslint-plugin-template: [i18n] option to require i18n metadata meaning (#1234) (4ef0290)
- eslint-plugin-template: [no-interpolation-in-attributes] new rule added (#1242) (977cb3a)
- eslint-plugin: [require-localize-metadata] option to require meaning (#1235) (b870123)
15.1.0 (2022-11-24)
- eslint-plugin-template: [accessibility-valid-aria] use Number() to parse numeric values (#1218) (6fe40d6)
- eslint-plugin-template: [i18n] allow more attributes by default (#1220) (4232b1c)
- eslint-plugin: [no-input-rename] do not report on directive composition API (#1231) (119fba7)
- update dependency @angular/compiler to v15.0.1 (#1223) (7b7bd76)
- update typescript-eslint packages to v5.44.0 (#1222) (5750e3a)
15.0.0 (2022-11-20)
As always we recommend that you update your existing workspaces by using ng update as we provide some helpful schematics to help migrate your workspaces to the latest and greatest. Running the following will update Angular, the Angular CLI and angular-eslint together:
ng update @angular/core @angular/cli @angular-eslint/schematics- schematics: ensure scoped project names have correct eslint extends (7b3f736)
- bump minimum supported eslint version to 7.20.0 (56ad69f), closes #662
- eslint-plugin: remove no-conflicting-lifecycle from recommended config (19dd177), closes #502
- fast linting by default, set eslint and typescript-eslint recommended (#1212) (1a53ef9), closes #1174
- schematics: ng update migration to preserve v14 parserOptions.project for existing workspaces (1d45914)
- Your installed version of ESLint must be version 7.20.0 or later (naturally we recommend the latest v8 of ESLint if possible)
- eslint-plugin: no-conflicting-lifecycle is no longer included as part of the recommended config and if you wish to continue using it you will need to enable it yourself in your eslint config rules
- New projects will not include
parserOptions.projectconfiguration in.eslintrc.jsonfiles by default, see the new guide here ./docs/RULES_REQUIRING_TYPE_INFORMATION.md
14.4.0 (2022-11-20)
14.3.1 (2022-11-20)
- no-input-rename: allow input aliases that match the directive name applied to an element (#1207) (aff3344)
- update dependency eslint to v8.28.0 (#1210) (c671e74)
14.3.0 (2022-11-17)
- eslint-plugin-template: [accessibility-elements-content] add allowList option (#1201) (3877f43)
- eslint-plugin-template: [no-inline-styles] add rule (#1162) (7e1aadf)
14.2.0 (2022-11-15)
- update dependency @angular/compiler to v14.2.10 (#1165) (bb4bfe5)
- update dependency @angular/compiler to v14.2.3 (#1143) (4eb3e74)
- update dependency aria-query to v5.1.3 (#1183) (7c5b299)
- update dependency axobject-query to v3.1.1 (#1184) (dcfd43d)
- update dependency eslint to v8.27.0 (#1189) (d2ae95a)
- update dependency eslint-scope to v7 (#1156) (05bd9e6)
- update typescript-eslint packages to v5.38.1 (#1152) (8f6d0ef)
- update typescript-eslint packages to v5.43.0 (#1190) (2a4716a)
- eslint-plugin-template: [accessibility-interactive-supports-focus] add rule (#1134) (d99d8c1)
- eslint-plugin-template: [accessibility-role-has-required-aria] add rule (#1100) (f684df0)
- eslint-plugin-template: [attributes-order] add rule with fixer (#1066) (4c789c7)
- eslint-plugin-template: [no-duplicate-attributes] Add option to ignore properties (#1104) (018d390)
- update dependency eslint to v8.24.0 (#1148) (5f30b2d)
- update typescript-eslint packages to v5.38.0 (#1140) (85b4b47)
14.1.2 (2022-09-21)
14.1.1 (2022-09-18)
- eslint-plugin-template: [click-events-have-key-events]: handle additional outputs (#1101) (c608cdb)
- eslint-plugin: [sort-ngmodule-metadata-arrays]: add intl support (#1099) (30d133b)
14.1.0 (2022-09-18)
- update dependency eslint to v8.23.1 (#1137) (9c9f28b)
- update typescript-eslint packages to v5.37.0 (#1138) (96435a8)
14.0.4 (2022-09-08)
- schematics: prefer sourceRoot if available for root project (#1114) (36c62c3)
- support TS 4.8 with Angular 14.2, update dependencies (#1123) (a780b59)
14.0.3 (2022-08-23)
14.0.2 (2022-07-09)
14.0.1 (2022-07-08)
- builder: update to latest @nrwl/devkit (#1082) (cc00a21)
- remaining references to master (now main) (#1083) (8d36232)
14.0.0 (2022-06-23)
As always we recommend that you update your existing workspaces by using ng update as we provide some helpful schematics to help migrate your workspaces to the latest and greatest. Running the following will update Angular, the Angular CLI and angular-eslint together:
ng update @angular/core @angular/cli @angular-eslint/schematicsThis is a major version bump and comes with some breaking changes, one of which might possibly impact your ESLint configuration if you are targeting inline HTML templates with a very specific glob pattern because the virtual filename has changed (read on to learn more).
-
update Angular to v14
- All packages now require the use of Angular CLI >= 14.0.0 < 15.0.0
-
dropped support for Node 12 (in alignment with Angular's own version policy)
-
extracted inline HTML templates now contain the original Component filename in their processed virtual filename
- When ESLint runs on your Component files, if you are using the recommended configuration, it will invoke a processor we have set up to extract the inline HTML templates from your Component declarations. Behind the scenes we give these extracted templates virtual filenames ending in
.htmlso that rules targeting HTML files can also target your inline templates. - Before: In v13 the filename looked like this:
inline-template-${++i}.component.html, whereiwas an incrementing integer (in case for example you had multiple Component declarations in the same.tsfile. - Now: In v14 the filename now looks like this
inline-template-${baseFilename}-${++i}.component.html, whereihas the same incrementing integer behavior as before, but we now include the base filename within the virtual filename.- E.g. if you have a test file in
projects/foo/src/app/app.spec.tswhich declares a Component with an inline template, the virtual filename generated behind the scene for that template will beinline-template-app.spec.ts-1.component.html. - This new behavior allows you to use ESLint overrides to apply different behavior to Component inline templates in different files.
- E.g. if you have a test file in
- When ESLint runs on your Component files, if you are using the recommended configuration, it will invoke a processor we have set up to extract the inline HTML templates from your Component declarations. Behind the scenes we give these extracted templates virtual filenames ending in
- update eslint to
^8.18.0(automatically migrated viang update) - update typescript-eslint to
^5.29.0(automatically migrated viang update) - update deprecated
cli.defaultCollectionusage inangular.jsonto usecli.schematicCollectionsinstead (automatically migrated viang update)
13.5.0 (2022-06-12)
13.4.0 (2022-06-11)
13.3.0 (2022-06-10)
- eslint-plugin-template: [eqeqeq] update suggest message (#1000) (821cb8e)
- eslint-plugin: [sort-ngmodule-metadata-arrays] do not sort deps property (#1001) (e6d12f2)
- eslint-plugin-template: [i18n] add requireDescription option (#988) (8f55ba8)
- update dependency eslint to v8.17.0 (#979) (7cabac0)
13.2.1 (2022-04-14)
- eslint-plugin-template: false positive conditional complexity in BoundAttribute > Interpolation (#986) (c3f3120)
- template-parser: suppress parse errors by default, add suppressParseErrors parserOption (#987) (417bee6)
13.2.0 (2022-04-03)
- eslint-plugin-template: add require-localize-metadata rule (#844) (ca1edf0)
- parser: propagate parse errors from angular compiler (#969) (ab9b496)
13.1.0 (2022-02-13)
- eslint-plugin-template: [i18n] do not throw when compiler returns null i18n description (#892) (d349149)
- rule docs links in create-eslint-rule utils (#907) (94f6e21)
- update dependency ignore to v5.2.0 (#913) (5480102)
- eslint-plugin-template: [i18n] add checkDuplicateId option (#868) (edaf46f)
- update angular/compiler to v13.2.2 (#834) (9847978)
13.0.1 (2021-11-19)
13.0.0 (2021-11-18)
Whilst this is a major release of the packages, in this case the major version change is primarily there to signify alignment with v13 of Angular.
You should look to migrate to v13 of all Angular packages, as well as v8 of eslint and v5 of typescript-eslint.
All of this will be handled for you automatically if you leverage the ng update schematics provided by @angular-eslint. You can simply include @angular-eslint/schematics in your ng update command alongside @angular/cli and @angular/core, for example:
npx ng update @angular/cli @angular/core @angular-eslint/schematics12.7.0 (2021-11-18)
- builder: expose nx executor without ng-compat layer (#808) (b2cd5d1)
- i18n: option to require description for i18n metadata (#804) (7d072e2)
- schematics: add package group for ng update (#807) (ce2e47d)
12.6.1 (2021-10-26)
12.6.0 (2021-10-25)
- eslint-plugin: [sort-ngmodule-metadata-arrays] remove the property restriction (#694) (440f6dc)
- eslint-plugin: [sort-ngmodule-metadata-arrays] report the correct node (#693) (886db08)
- eslint-plugin: more appropriate language for no-attribute-decorator (#696) (4dde82c)
- eslint-plugin-template: [i18n] ignore empty strings and non-texts within
BoundTextby default (#683) (4075643)
12.5.0 (2021-09-20)
- eslint-plugin-template: [mouse-events-have-key-events] ignore custom components (#680) (f65874b)
- eslint-plugin-template: support escape chars in inline templates (#691) (8b89ec7)
12.4.1 (2021-09-09)
12.4.0 (2021-09-09)
- eslint-plugin: [no-empty-lifecycle-method] incorrect suggestions and correct reports (#606) (a446e8f)
- eslint-plugin: [sort-ngmodule-metadata-arrays] handle literal metadata and computed properties (#667) (f993069)
- eslint-plugin: properly handle computed literals for some rules (#600) (fbd6ff7)
- eslint-plugin-template: [i18n] fixes some incorrect reports (#665) (a011b9d)
- eslint-plugin-template: [no-call-expression]:
FunctionCalls not being reported (#601) (5552b13) - eslint-plugin-template: include more checks for
isHiddenFromScreenReader(#545) (db2bc05)
- eslint-plugin: [prefer-on-push-component-change-detection] add suggestion (#666) (3723c4c)
- eslint-plugin: [use-injectable-provided-in] add suggestion (#594) (bdef8c7)
- utils: make package public (#673) (0386082)
12.3.1 (2021-07-15)
- eslint-plugin: handle literal
outputsproperly for [-output-] rules (#595) (8621a62) - template-parser: correct typings for cjs (#597) (bb60224)
12.3.0 (2021-07-13)
- eslint-plugin: [no-input-prefix] handle alias and
inputsmetadata property (#582) (675ee11) - eslint-plugin: [no-input-rename] handle alias and
inputsmetadata property (#583) (2883e18) - eslint-plugin: [use-component-view-encapsulation] handle literal
encapsulationproperly (#586) (3a9b7f4) - eslint-plugin: [use-pipe-transform-interface] handle type imports properly in fix (#592) (ac3fb12)
- builder: add noEslintrc option (#588) (4b150bf)
- builder: add resolvePluginsRelativeTo option (#590) (3bea308)
- builder: add rulesdir option (#589) (ff9557d)
- builder: added outputFile option (#587) (420734b)
- eslint-plugin: [component-selector] handle shadow dom components properly (#559) (ecbe684)
- eslint-plugin: [no-pipe-impure] add suggestion (#585) (149bf2f)
- schematics: better support @angular/cli 12.1 (#591) (c5da07b)
12.2.2 (2021-07-10)
- eslint-plugin: [no-output-on-prefix] handle
gettersandoutputsmetadata property (#566) (5884482) - eslint-plugin: [no-output-rename] handle
gettersandoutputsmetadata property (#568) (c803ffd)
12.2.1 (2021-07-10)
- eslint-plugin: [no-output-native] handle
gettersandoutputsmetadata property (#567) (22b378d) - eslint-plugin: [no-output-on-prefix] correct false positives (#525) (3a66274)
12.2.0 (2021-06-20)
- eslint-plugin: [no-output-native] correct false positives (#524) (215abec)
- eslint-plugin-template: [accessibility-table-scope] ignore custom elements (#550) (53eb56d)
- eslint-plugin-template: [accessibility-valid-aria] ignore custom elements (#552) (f6466ec)
- eslint-plugin-template: [no-autofocus] ignore custom elements (#540) (366d9df)
- eslint-plugin-template: [no-positive-tabindex] ignore custom elements (#551) (5e33995)
- builder: add
cacheStrategyoption (#520) (427a9f5) - eslint-plugin: [use-component-view-encapsulation] add suggestion (#501) (ea9e98d)
- eslint-plugin-template: [no-positive-tabindex] add suggestion (#541) (0582c2a)
12.1.0 (2021-05-30)
- eslint-plugin: [no-host-metadata-property] correct false positive with
allowStaticoption (#482) (89926d8) - eslint-plugin: [no-output-on-prefix] not reporting failures on alias (#471) (f9ba372)
- eslint-plugin: [relative-url-prefix] valid relative urls being reported (#456) (2247394)
- eslint-plugin-template: [18n] ignore
checkAttributesproperly (#467) (20e54d7) - eslint-plugin-template: [eqeqeq] change fix to suggest (#465) (a497fde)
- eslint-plugin-template: [no-negated-async] ignore double-bang (#450) (9d06488)
- schematics: skip config for tsconfig.e2e.json when no e2e project is present (#484) (2673e59)
- template-parser: generate correct index.d.ts when building (#480) (e150044)
- utils: support passing
dataandsuggestionsindividually for each error (#491) (70b01bd)
- eslint-plugin: [no-empty-lifecycle-method] add suggestion (#463) (1d1a329)
- eslint-plugin: [no-host-metadata-property] add option to allow static values (#478) (d64c832)
- eslint-plugin: [no-input-rename] add option to allow some inputs (#475) (9c861dc)
- eslint-plugin: [prefer-output-readonly] add suggestion (#459) (f3ff789)
- eslint-plugin: [sort-ngmodule-metadata-arrays] add fixer (#493) (32fae47)
- eslint-plugin-template: [accessibility-table-scope] add fixer (#490) (f0c4cea)
- eslint-plugin-template: [accessibility-valid-aria] add suggestion (#489) (678e1b5)
- eslint-plugin-template: [no-any] add suggestion (#486) (720e869)
- eslint-plugin-template: [no-autofocus] add fixer (#485) (9450b7d)
- eslint-plugin-template: [no-distracting-elements] add fixer (#488) (9cefe67)
- eslint-plugin-template: [no-duplicate-attributes] add suggestion (#495) (62cadcd)
- eslint-plugin-template: [no-negated-async] add suggestion (#487) (0b3f9eb)
- schematics: on
ng addinclude a lint command if none exists (#481) (ae49af4) - utils: add support for suggestions (#458) (0ea02ae)
12.0.0 (2021-05-13)
- template-parser: add missing
Conditionaland its keys toVisitorKeys(#445) (5ad0f1a) - eslint-plugin-template: no-negated-async no longer performs equality checks (#399)
- update tslint-to-eslint-config to 2.4.0 (7352ad2)
- eslint-plugin-template: add rule eqeqeq (#444) (e15148c)
- update eslint to ^7.26.0, @typescript-eslint to 4.23.0 (9e31c38)
-
update to angular v12 (c80008d)
- All packages now require the use of Angular CLI >= 12.0.0 < 13
-
eslint-plugin-template: no-negated-async no longer performs equality checks (#399)
- You should add the new
@angular-eslint/template/eqeqeqrule to your config if you want to continue with the same functionality around equality checks. This will be applied for you byng updateautomatically.
- You should add the new
4.3.0 (2021-05-12)
4.2.1 (2021-05-12)
4.2.0 (2021-04-28)
4.1.0 (2021-04-28)
4.0.0 (2021-04-18)
We have provided automated migrations for you to move to v4.
All you need to do is run the update schematics for @angular-eslint:
npx ng update @angular-eslint/schematicsNOTE: For this release, there are no automated migrations to be run, other than automatically updating the version number of your other @angular-eslint packages.
-
Passing
--collection=@angular-eslint/schematicstong newis no longer supported:- If you attempt to do it you will get a clear error with instructions on what to do instead.
- This means we have one consistent way to add
@angular-eslintto a workspace - runng add @angular-eslint/schematics- regardless of whether that workspace is brand new or has existed for a while.
-
We have introduced two new options to the
convert-tslint-to-eslintschematic:--remove-tslint-if-no-more-tslint-targetsso that we remove TSLint and Codelyzer from the workspace automatically if we detect you have no TSLint usage remaining (trueby default).--ignore-existing-tslint-configso that we can jump straight to the up to date recommended ESLint setup, without converting the previous Angular CLI TSLint setup, which is unnecessary for brand new projects (falseby default).
3.0.1 (2021-04-18)
3.0.0 (2021-04-17)
PR #388 (f92b184)
We have provided automated migrations for you to move to v3.
All you need to do is run the update schematics for @angular-eslint:
npx ng update @angular-eslint/schematics- The
recommendedconfigs from@angular-eslint/eslin-pluginnow only configures rules directly from that plugin. This provides an overall more intuitive experience when stacking the recommended config with other plugins from the ecosystem. If you wish to continue having the same experience (with mixed@angular-eslintand@typescript-eslintrules in the configs you inherit from you can add the newrecommended--extraconfig to your ESLint extends in the relevant config.
E.g. extract from .eslintrc.json
"extends": [
"plugin:@angular-eslint/recommended",
+ "plugin:@angular-eslint/recommended--extra",
],-
Within the
builder, linting now always runs relative to your workspace root. This should not have any impact on my workflows but is important if you runng lintfrom within subdirectories of your workspace. -
Within the
builder, we always make a call to format, even if the lint results are empty. This is important for non-default formatters. -
We have removed the hard peerDependency on the 3rd party eslint plugins
importjsdocandprefer-arrow. These plugins are only required if you are converted an existing workspace to TSLint and they will still be installed on demand in that scenario. -
Within the
eslint-plugin, thecomponent-max-inline-declarationsrule will no longer accept negative values as input. Previously it would silently use the default values in this case. An automated migration is provided for this change as part of theng updateschematics.
2.1.1 (2021-04-17)
- eslint-plugin:
sort-ngmodule-metadata-arraysreporting false positives (#408) (149152a) - eslint-plugin: directive-class-suffix reporting selectorless directives (#394) (42d4e5d)
- eslint-plugin-template: [i18n] remove unsafe fix (#411) (3246b8a)
2.1.0 (2021-04-11)
- builder: expose maxWarnings option (#402) (76f5ba4)
- eslint-plugin: no-call-expression incorrect reports for conditionals (#390) (fa9cc73)
- eslint-plugin-template: accessibility-elements-content not allowing some attributes/inputs (#397) (ffedaa2)
- eslint-plugin-template: i18n ignoreTags not being ignored properly (#387) (985f6c2)
- eslint-plugin-template: i18n reporting when a parent element already contains i18n id (#398) (c937a3f)
- eslint-plugin: add rule sort-ngmodule-metadata-arrays (#386) (935afdd)
- template-parser: support eslint-disable comments in HTML templates (#405) (5dd9578)
2.0.2 (2021-03-16)
2.0.1 (2021-03-14)
2.0.0 (2021-03-13)
We have provided automated migrations for you to move to v2.
All you need to do is first update to Angular and Angular CLI v11.2.0 or above (see https://update.angular.io for full instructions relating to Angular updates):
npx ng update @angular/cli @angular/coreAnd then run the update schematics for @angular-eslint:
npx ng update @angular-eslint/schematics- template-parser: add BindingPipe exp to VisitorKeys (#337) (#338) (75c406f)
- add docs url for both plugins (#360) (4c9b068)
-
The format of results output has changed
-
The
use-pipe-decoratorrule no longer exists for use -
feat(template-parser): updated use of parseTemplate to improve loc data
- Requires @angular/compiler 11.2.0 and above
-
feat(schematics): change way indent and quotes are handled by conversion schematics
- The conversion schematic handle these rules differently
1.2.0 (2021-02-06)
- eslint-plugin: component-max-inline-declarations animations not being checked properly (#313) (61a2a0f)
- eslint-plugin: no-lifecycle-call invalid super calls not being reported (#314) (c44cd5d)
- eslint-plugin-template: accessibility-valid-aria not reporting i… (#278) (391980f)
- eslint-plugin: add fixer for use-pipe-transform-interface (#260) (e3f4db6)
- eslint-plugin-template: add no duplicate attributes rule (#302) (c387de5), closes #293



