Skip to content

Commit 38b9394

Browse files
authored
Support Angular 16 (#18)
* Add support for Angular 16. * Rewritten CI testing for multiple NodeJS, ESLint and Angular version. * Fix linting for lockfile. See lirantal/lockfile-lint#175 & isaacs/jackspeak#5 * Update all packages and run linting & Prettier. * [Fix SonarCloud warning about duplicates in regex.](https://sonarcloud.io/project/issues?open=AYJ_Asgte7FPvNTvNf5F&id=jerone_eslint-plugin-angular-template-consistent-this) * Connect SonarLint VSCode extension.
1 parent 4b0ef02 commit 38b9394

File tree

9 files changed

+1657
-6063
lines changed

9 files changed

+1657
-6063
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,37 +26,44 @@ jobs:
2626
# and assume that the intermediate versions are good.
2727
node-version:
2828
# Angular supported Node.js versions.
29-
# https://gist.github.com/LayZeeDK/c822cc812f75bb07b7c55d07ba2719b3
29+
# https://angular.io/guide/versions
3030
- 14.15.0
31-
- 16.10.0
31+
- 16.14.0
3232
- 18.10.0
33-
# Latest Node.js version.
3433
- latest
3534
eslint-version: [7, 8]
3635
# Angular ESLint version, and corresponding typescript-eslint version.
3736
angular-eslint-version:
3837
- [13, "5.27.1"]
3938
- [14, "latest"]
4039
- [15, "latest"]
40+
- [16, "latest"]
41+
exclude:
42+
# Angular v16 dropped support for NodeJS v14.
43+
- node-version: 14.15.0
44+
angular-eslint-version: [16, "latest"]
4145
steps:
4246
- uses: actions/checkout@v4
4347
- name: Setup Node.js ${{ matrix.node-version }}
4448
uses: actions/setup-node@v3
4549
with:
4650
node-version: ${{ matrix.node-version }}
4751
cache: "npm"
52+
# Cannot use `npm ci`, because this package uses ESLint plugins,
53+
# which conflict with the different installations below.
54+
# Also the package-lock file is to new for npm on older NodeJS versions.
4855
- name: Install packages
49-
run: npm ci --no-fund
56+
run: npm install rimraf typescript jest jest-junit ts-jest
5057
- name: Install Angular ESLint ${{ matrix.angular-eslint-version[0] }}
5158
run: |
52-
npm install --save-dev \
59+
npm install \
5360
@angular-eslint/template-parser@${{ matrix.angular-eslint-version[0] }} \
5461
@angular-eslint/utils@${{ matrix.angular-eslint-version[0] }} \
5562
@angular/compiler@${{ matrix.angular-eslint-version[0] }} \
5663
@typescript-eslint/eslint-plugin@${{ matrix.angular-eslint-version[1] }} \
5764
@typescript-eslint/parser@${{ matrix.angular-eslint-version[1] }}
5865
- name: Install ESLint ${{ matrix.eslint-version }}
59-
run: npm install --save-dev eslint@${{ matrix.eslint-version }}
66+
run: npm install eslint@${{ matrix.eslint-version }}
6067
- name: Run tests
6168
run: npm run test
6269
- name: Test Report

.lockfile-lintrc.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
{
2-
"allowedHosts": ["npm"],
2+
"allowedHosts": [
3+
"npm"
4+
],
5+
"allowedPackageNameAliases": [
6+
"string-width-cjs:string-width",
7+
"strip-ansi-cjs:strip-ansi",
8+
"wrap-ansi-cjs:wrap-ansi"
9+
],
310
"path": "package-lock.json",
411
"type": "npm",
512
"validateHttps": true,
613
"validatePackageNames": true
7-
}
14+
}

.vscode/settings.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,9 @@
4545
"jsonc",
4646
"yaml",
4747
"markdown"
48-
]
48+
],
49+
"sonarlint.connectedMode.project": {
50+
"connectionId": "jerone",
51+
"projectKey": "jerone_eslint-plugin-angular-template-consistent-this"
52+
}
4953
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Read more about this rule [in the documentation](https://github.com/jerone/eslin
3030
You'll need to have an Angular project with the following packages installed:
3131

3232
- [ESLint](https://eslint.org/) - version 7 and 8 are tested.
33-
- [Angular ESLint](https://github.com/angular-eslint/angular-eslint) - version 13, 14 & 15 are tested.
33+
- [Angular ESLint](https://github.com/angular-eslint/angular-eslint) - version 13, 14 & 15 & 16 are tested.
3434

3535
## Installation
3636

0 commit comments

Comments
 (0)