Skip to content

Latest commit

 

History

History
921 lines (584 loc) · 82.1 KB

CHANGELOG.md

File metadata and controls

921 lines (584 loc) · 82.1 KB

17.4.0 (2024-05-07)

🚀 Features

  • eslint-plugin: [no-duplicates-in-metadata-arrays] new rule (#1779)

🩹 Fixes

  • 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)

❤️ Thank You

  • “JamesHenry” @JamesHenry
  • Adrian Baran @abaran30
  • Brad Kovach @bradkovach

17.3.0 (2024-03-15)

🚀 Features

  • eslint-plugin: add consistent-component-styles rule (#1710)
  • eslint-plugin: add prefer-standalone rule for checking all components, directives and pipes (#1627)

🩹 Fixes

  • 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)

❤️ Thank You

  • Christian Svensson
  • Dave @reduckted
  • James Henry @JamesHenry
  • Joey Jacobs @joeyj
  • Luis Estevez @estevezluis

17.2.1 (2024-01-20)

🩹 Fixes

  • 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)

❤️ Thank You

  • Adam Reisinger @Res42
  • Matt Lewis @mattlewis92

17.2.0 (2024-01-06)

🚀 Features

  • eslint-plugin: [no-async-lifecycle-method] add rule (#1643)

🩹 Fixes

  • 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)

❤️ Thank You

  • Matt Lewis @mattlewis92
  • Steven Chim @chimurai

17.1.1

🩹 Fixes

  • 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)

❤️ Thank You

  • Christian Svensson
  • Daniel Kimmich @json-derulo
  • Luis Estevez @estevezluis

17.1.0

🚀 Features

  • 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)

🩹 Fixes

  • 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)

❤️ Thank You

  • Adrian Baran @abaran30
  • Daniel Kimmich @json-derulo
  • Phil McCloghry-Laing @pmccloghrylaing

Change Log

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

17.0.1 (2023-11-09)

Bug Fixes

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

Bug Fixes

  • no declarations for eslint plugins (2498238)

Features

  • eslint-plugin-template: [prefer-self-closing-tags] consider ng-content and ng-template elements (#1573) (8e97d20)

BREAKING CHANGES

  • 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)

Bug Fixes

Features

  • eslint-plugin-template: allow alias option in [use-track-by-function] (#1497) (354d394)

16.2.0 (2023-09-17)

Bug Fixes

  • 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)

Features

  • eslint-plugin-template: [prefer-ngsrc] add rule (#1477) (0cfbc80)
  • eslint-plugin: [sort-lifecycle-methods] add rule (#1320) (47f7975)

16.1.2 (2023-09-04)

Bug Fixes

  • 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)

Bug Fixes

  • 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)

Bug Fixes

  • 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)

Features

  • 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)

Bug Fixes

16.0.2 (2023-05-17)

Bug Fixes

16.0.1 (2023-05-03)

Bug Fixes

  • 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

Features

  • eslint-plugin-template: All accessibility rules are now grouped together and exposed via a new @angular-eslint/template/accessibility config. 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 reportUnusedDisableDirectives option
  • 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 eslint and all @typescript-eslint packages to the latest (handled for you automatically by our ng update schematic)

BREAKING CHANGES

  • 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-compat and ng-cli-compat--formatting configs have been removed. See the updated guide on migrating from TSLint for more information: ./docs/MIGRATING_FROM_TSLINT.md
  • eslint-plugin-template: The legacy base config 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-eslint schematic 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-for rule has been removed. label-has-associated-control should be used instead. An automated migration was provided when label-has-associated-control was 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/accessibility shared config. See the main README.md for an example of it in action.

15.2.1 (2023-02-10)

Bug Fixes

  • 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)

Bug Fixes

  • 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)

Features

  • 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)

Bug Fixes

  • 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)

Features

  • eslint-plugin-template: [no-call-expression] add allowList option (#1217) (a69c809)

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

Bug Fixes

  • schematics: ensure scoped project names have correct eslint extends (7b3f736)

Features

  • 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)

BREAKING CHANGES

  • 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.project configuration in .eslintrc.json files by default, see the new guide here ./docs/RULES_REQUIRING_TYPE_INFORMATION.md

14.4.0 (2022-11-20)

Features

14.3.1 (2022-11-20)

Bug Fixes

  • 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)

Bug Fixes

  • update dependency @angular/compiler to v14.2.11 (#1202) (6c1eb81)

Features

  • 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)

Bug Fixes

  • 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)

Features

  • 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)

Bug Fixes

  • builder: remove nrwl/devkit from builder implementation (#1142) (9d5a7fc)

14.1.1 (2022-09-18)

Bug Fixes

  • 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)

Features

14.0.4 (2022-09-08)

Bug Fixes

  • 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)

Bug Fixes

  • builder: ensure package works with Angular 14.1.3 (#1112) (b00ef2e)

14.0.2 (2022-07-09)

Bug Fixes

14.0.1 (2022-07-08)

Bug Fixes

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/schematics

BREAKING CHANGES

This 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 .html so that rules targeting HTML files can also target your inline templates.
    • Before: In v13 the filename looked like this: inline-template-${++i}.component.html, where i was an incrementing integer (in case for example you had multiple Component declarations in the same .ts file.
    • Now: In v14 the filename now looks like this inline-template-${baseFilename}-${++i}.component.html, where i has 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.ts which declares a Component with an inline template, the virtual filename generated behind the scene for that template will be inline-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.

Features

  • update eslint to ^8.18.0 (automatically migrated via ng update)
  • update typescript-eslint to ^5.29.0 (automatically migrated via ng update)
  • update deprecated cli.defaultCollection usage in angular.json to use cli.schematicCollections instead (automatically migrated via ng update)

13.5.0 (2022-06-12)

Features

  • eslint-plugin-template: [button-has-type] add rule (#928) (f19bb30)

13.4.0 (2022-06-11)

Features

  • update typescript-eslint packages to v5.27.1 (#1022) (99e8d4a)

13.3.0 (2022-06-10)

Bug Fixes

  • eslint-plugin-template: [eqeqeq] update suggest message (#1000) (821cb8e)
  • eslint-plugin: [sort-ngmodule-metadata-arrays] do not sort deps property (#1001) (e6d12f2)

Features

  • eslint-plugin-template: [i18n] add requireDescription option (#988) (8f55ba8)
  • update dependency eslint to v8.17.0 (#979) (7cabac0)

13.2.1 (2022-04-14)

Bug Fixes

  • 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)

Bug Fixes

  • schematics: support more permutations of ng-add (#970) (0bf549b)

Features

  • 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)

Bug Fixes

  • 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)

Features

  • eslint-plugin-template: [i18n] add checkDuplicateId option (#868) (edaf46f)
  • update angular/compiler to v13.2.2 (#834) (9847978)

13.0.1 (2021-11-19)

Bug Fixes

  • schematics: auto update eslint-plugin-import as part of v13 ng update (#836) (705e83b)

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/schematics

Features

12.7.0 (2021-11-18)

Bug Fixes

Features

  • 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)

Bug Fixes

12.6.0 (2021-10-25)

Bug Fixes

  • 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 BoundText by default (#683) (4075643)

Features

  • bundled-angular-compiler: create own bundle for @angular/compiler (#720) (0c42299)

12.5.0 (2021-09-20)

Bug Fixes

  • eslint-plugin-template: [mouse-events-have-key-events] ignore custom components (#680) (f65874b)
  • eslint-plugin-template: support escape chars in inline templates (#691) (8b89ec7)

Features

  • utils: publicly expose utils related to eslint-plugin (#676) (07711f1)

12.4.1 (2021-09-09)

Bug Fixes

  • utils: add missing filename option for invalid case utils (#674) (80b72b3)

12.4.0 (2021-09-09)

Bug Fixes

  • 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)

Features

  • 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)

Bug Fixes

  • eslint-plugin: handle literal outputs properly for [-output-] rules (#595) (8621a62)
  • template-parser: correct typings for cjs (#597) (bb60224)

12.3.0 (2021-07-13)

Bug Fixes

  • eslint-plugin: [no-input-prefix] handle alias and inputs metadata property (#582) (675ee11)
  • eslint-plugin: [no-input-rename] handle alias and inputs metadata property (#583) (2883e18)
  • eslint-plugin: [use-component-view-encapsulation] handle literal encapsulation properly (#586) (3a9b7f4)
  • eslint-plugin: [use-pipe-transform-interface] handle type imports properly in fix (#592) (ac3fb12)

Features

  • 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)

Bug Fixes

  • eslint-plugin: [no-output-on-prefix] handle getters and outputs metadata property (#566) (5884482)
  • eslint-plugin: [no-output-rename] handle getters and outputs metadata property (#568) (c803ffd)

12.2.1 (2021-07-10)

Bug Fixes

  • eslint-plugin: [no-output-native] handle getters and outputs metadata property (#567) (22b378d)
  • eslint-plugin: [no-output-on-prefix] correct false positives (#525) (3a66274)

12.2.0 (2021-06-20)

Bug Fixes

  • 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)

Features

  • builder: add cacheStrategy option (#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)

Bug Fixes

  • eslint-plugin: [no-host-metadata-property] correct false positive with allowStatic option (#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 checkAttributes properly (#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 data and suggestions individually for each error (#491) (70b01bd)

Features

  • 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 add include a lint command if none exists (#481) (ae49af4)
  • utils: add support for suggestions (#458) (0ea02ae)

12.0.0 (2021-05-13)

Bug Fixes

  • template-parser: add missing Conditional and its keys to VisitorKeys (#445) (5ad0f1a)
  • eslint-plugin-template: no-negated-async no longer performs equality checks (#399)

Features

BREAKING CHANGES

  • 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/eqeqeq rule to your config if you want to continue with the same functionality around equality checks. This will be applied for you by ng update automatically.

4.3.0 (2021-05-12)

Features

  • eslint-plugin-template: add rule accessibility-label-has-associated-control (#392) (0851f3e)

4.2.1 (2021-05-12)

Bug Fixes

  • eslint-plugin-template: no-negated-async message tweak (#427) (08a8330)

4.2.0 (2021-04-28)

Features

  • schematics: add add-eslint-to-project schematic (#426) (7ae557d)

4.1.0 (2021-04-28)

Bug Fixes

  • schematics: support workspaces which use targets alias (#424) (da6bcf7)

Features

  • schematics: dynamically install tslint-to-eslint-config as needed (#425) (27ca474)

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/schematics

NOTE: For this release, there are no automated migrations to be run, other than automatically updating the version number of your other @angular-eslint packages.

BREAKING CHANGES

  • Passing --collection=@angular-eslint/schematics to ng new is 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-eslint to a workspace - run ng 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-eslint schematic:

    • --remove-tslint-if-no-more-tslint-targets so that we remove TSLint and Codelyzer from the workspace automatically if we detect you have no TSLint usage remaining (true by default).
    • --ignore-existing-tslint-config so 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 (false by default).

Features

  • schematics: options for convert-tslint-to-eslint (#419) (18fd863)

3.0.1 (2021-04-18)

Bug Fixes

  • eslint-plugin: correctly expose recommended-extra config (#418) (f727d8c)

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

BREAKING CHANGES

  • The recommended configs from @angular-eslint/eslin-plugin now 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-eslint and @typescript-eslint rules in the configs you inherit from you can add the new recommended--extra config 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 run ng lint from 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 import jsdoc and prefer-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, the component-max-inline-declarations rule 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 the ng update schematics.

2.1.1 (2021-04-17)

Bug Fixes

  • eslint-plugin: sort-ngmodule-metadata-arrays reporting 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)

Bug Fixes

  • 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)

Features

  • 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)

Bug Fixes

  • builder: printInfo should not be taken into account for report (#376) (d7c6aa4)

2.0.1 (2021-03-14)

Bug Fixes

  • eslint-plugin-template: conditional-complexity error from bundling (#373) (f466c01)

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/core

And then run the update schematics for @angular-eslint:

npx ng update @angular-eslint/schematics

Bug Fixes

Features

BREAKING CHANGES

  • The format of results output has changed

  • The use-pipe-decorator rule 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)

Bug Fixes

  • 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)

Features

  • eslint-plugin: add fixer for use-pipe-transform-interface (#260) (e3f4db6)
  • eslint-plugin-template: add no duplicate attributes rule (#302) (c387de5), closes #293

1.1.0 (2021-01-14)

Bug Fixes

  • eslint-plugin: handle DoBootstrap correctly in lifecycle rules (#243) (5010b3f)
  • eslint-plugin-template: conditional-complexity not reporting all cases (#279) (a4fd077)

Features

  • eslint-plugin-template: accessibility-label-for (#268) (49ab76a)