Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5833a5e

Browse files
authored
Merge branch 'main' into feature/update-native-event-names
2 parents 510fceb + 796e657 commit 5833a5e

File tree

54 files changed

+1311
-637
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+1311
-637
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
echo "NX_CI_EXECUTION_ENV=Node $(node --version) -" >> $GITHUB_ENV
3737
3838
- name: Start Nx Cloud CI Run
39-
run: npx nx-cloud start-ci-run --distributes-on="6 custom-linux-medium-plus-js" --stop-agents-after="e2e-suite"
39+
run: npx nx-cloud start-ci-run --distribute-on="6 custom-linux-medium-plus-js" --stop-agents-after="e2e-suite"
4040

4141
- uses: actions/cache@v4
4242
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
@@ -61,7 +61,7 @@ jobs:
6161
cmd1: npx nx run-many -t build,typecheck,check-rule-docs,lint,check-rule-lists,check-rule-configs
6262
cmd2: npx nx run-many -t test --codeCoverage
6363
cmd3: npx nx-cloud record -- yarn format-check
64-
64+
6565
# Run distributed e2e test suites with independent local registries (max 1 per agent via parallel=1)
6666
- name: Run e2e test suites
6767
run: npx nx run-many -t e2e-suite --parallel 1

.nx/workflows/agents.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ launch-templates:
44
image: 'ubuntu22.04-node20.11-v7'
55
init-steps:
66
- name: checkout repo
7-
uses: 'nrwl/nx-cloud-workflows/main/workflow-steps/checkout/main.yaml'
7+
uses: 'nrwl/nx-cloud-workflows/v4/workflow-steps/checkout/main.yaml'
88
env:
99
GIT_FETCH_TAGS: 'true'
1010
- name: node_modules cache
11-
uses: 'nrwl/nx-cloud-workflows/main/workflow-steps/cache/main.yaml'
11+
uses: 'nrwl/nx-cloud-workflows/v4/workflow-steps/cache/main.yaml'
1212
inputs:
1313
key: 'yarn.lock'
1414
paths: 'node_modules'
1515
baseBranch: 'main'
1616
- name: NPM Install
17-
uses: 'nrwl/nx-cloud-workflows/main/workflow-steps/install-node-modules/main.yaml'
17+
uses: 'nrwl/nx-cloud-workflows/v4/workflow-steps/install-node-modules/main.yaml'
1818
env:
1919
SKIP_POSTINSTALL: 'true'
2020
- name: Apply patches

CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,30 @@
1+
## 18.1.0 (2024-07-01)
2+
3+
### 🚀 Features
4+
5+
- **eslint-plugin:** [prefer-output-readonly] support output() function ([#1876](https://github.com/angular-eslint/angular-eslint/pull/1876))
6+
- **eslint-plugin:** [no-call-expression] add allowPrefix and allowSuffix ([#1897](https://github.com/angular-eslint/angular-eslint/pull/1897))
7+
8+
### 🩹 Fixes
9+
10+
- update dependency @angular/compiler to v18.0.2 ([#1852](https://github.com/angular-eslint/angular-eslint/pull/1852))
11+
- update dependency eslint to v9.5.0 ([#1886](https://github.com/angular-eslint/angular-eslint/pull/1886))
12+
- update dependency eslint to v9.6.0 ([#1900](https://github.com/angular-eslint/angular-eslint/pull/1900))
13+
- update dependency @angular/compiler to v18.0.5 ([#1893](https://github.com/angular-eslint/angular-eslint/pull/1893))
14+
- update nrwl monorepo to v19.3.2 ([#1902](https://github.com/angular-eslint/angular-eslint/pull/1902))
15+
- update typescript-eslint packages to v8.0.0-alpha.38 ([#1904](https://github.com/angular-eslint/angular-eslint/pull/1904))
16+
- **eslint-plugin-template:** [prefer-self-closing-tags] always ignore index.html files ([#1865](https://github.com/angular-eslint/angular-eslint/pull/1865))
17+
- **eslint-plugin-template:** [prefer-self-closing-tags] support ng-content with fallback content ([#1880](https://github.com/angular-eslint/angular-eslint/pull/1880))
18+
- **test-utils:** use configured RuleTester.afterAll over global ([#1878](https://github.com/angular-eslint/angular-eslint/pull/1878))
19+
20+
### ❤️ Thank You
21+
22+
- Christian Svensson
23+
- Daniel Kimmich @json-derulo
24+
- Dave @reduckted
25+
- Martijn van der Meij
26+
- Maximilian Main @MaximilianMain
27+
128
## 18.0.1 (2024-05-30)
229

330
### 🩹 Fixes

docs/CONFIGURING_ESLINTRC.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ Let's take a look at full (but minimal), manual example of a config file (**alth
8484

8585
**.eslintrc.json**
8686

87+
<!-- prettier-ignore -->
8788
```jsonc
8889
{
8990
"root": true,
@@ -145,6 +146,7 @@ Our premade configs handle the `parser` and `plugins` options for you behind the
145146

146147
If for some reason you wanted to not include any of the premade recommended configs, or you wanted to significantly customize your setup, a fully manual example with the right parsers and plugins wired up (but no actual rules activated) would look like this:
147148

149+
<!-- prettier-ignore -->
148150
```jsonc
149151
{
150152
"root": true,
@@ -195,6 +197,7 @@ If you choose to use `eslint-plugin-prettier`, **please ensure that you are usin
195197

196198
**.eslintrc.json**
197199

200+
<!-- prettier-ignore -->
198201
```jsonc
199202
{
200203
"root": true,

docs/MIGRATING_FROM_TSLINT.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ If you would like to recreate the `ng-cli-compat` and `ng-cli-compat--formatting
237237

238238
**ng-cli-compat**
239239

240-
```jsonc
240+
```json
241241
{
242242
"parser": "@typescript-eslint/parser",
243243
"plugins": ["@typescript-eslint", "@angular-eslint"],
@@ -431,7 +431,7 @@ If you would like to recreate the `ng-cli-compat` and `ng-cli-compat--formatting
431431

432432
**ng-cli-compat--formatting-add-on**
433433

434-
```jsonc
434+
```json
435435
{
436436
"plugins": ["eslint-plugin-jsdoc"],
437437
"rules": {

docs/RULES_REQUIRING_TYPE_INFORMATION.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ By default, angular-eslint sets up your ESLint configs with performance in mind
1212

1313
Let's take an example of an ESLint config that angular-eslint might generate for you out of the box (in v15 onwards) for single app workspace/the root project in a multi-project workspace:
1414

15-
```jsonc {% fileName=".eslintrc.json" %}
15+
```json {% fileName=".eslintrc.json" %}
1616
{
1717
"root": true,
1818
"ignorePatterns": ["projects/**/*"],
@@ -57,6 +57,7 @@ Here we do _not_ have `parserOptions.project`, which is appropriate because we a
5757

5858
If we now come in and add a rule which does require type information, for example `@typescript-eslint/await-thenable`, our config will look as follows:
5959

60+
<!-- prettier-ignore -->
6061
```jsonc {% fileName=".eslintrc.json" %}
6162
{
6263
"root": true,
@@ -116,6 +117,7 @@ Linting...
116117

117118
The solution is to update our config once more, this time to set `parserOptions.project` to appropriately point at our various tsconfig.json files which belong to our project:
118119

120+
<!-- prettier-ignore -->
119121
```jsonc {% fileName=".eslintrc.json" %}
120122
{
121123
"root": true,
@@ -169,7 +171,7 @@ And that's it! Now any rules requiring type information will run correctly when
169171

170172
Let's take an example of an ESLint config that angular-eslint might generate for you out of the box (in v15 onwards) for a library project called `my-library`:
171173

172-
```jsonc {% fileName="projects/my-library/.eslintrc.json" %}
174+
```json {% fileName="projects/my-library/.eslintrc.json" %}
173175
{
174176
"extends": "../../.eslintrc.json",
175177
"ignorePatterns": ["!**/*"],
@@ -207,6 +209,7 @@ Here we do _not_ have `parserOptions.project`, which is appropriate because we a
207209

208210
If we now come in and add a rule which does require type information, for example `@typescript-eslint/await-thenable`, our config will look as follows:
209211

212+
<!-- prettier-ignore -->
210213
```jsonc {% fileName="projects/my-library/.eslintrc.json" %}
211214
{
212215
"extends": "../../.eslintrc.json",
@@ -259,6 +262,7 @@ Linting "my-library"...
259262

260263
The solution is to update our config once more, this time to set `parserOptions.project` to appropriately point at our various tsconfig.json files which belong to our project:
261264

265+
<!-- prettier-ignore -->
262266
```jsonc {% fileName="projects/my-library/.eslintrc.json" %}
263267
{
264268
"extends": "../../.eslintrc.json",
@@ -315,6 +319,7 @@ ng g @angular-eslint/schematics:library {PROJECT_NAME_HERE} --set-parser-options
315319

316320
If you don't want to have to remember to pass `--set-parser-options-project` each time, then you can set it to true by default in your schematic defaults in your `angular.json` file:
317321

322+
<!-- prettier-ignore -->
318323
```jsonc
319324
{
320325
// ... more angular.json config here ...
@@ -338,6 +343,7 @@ The first thing is to understand that if you are majorly deviating from the conf
338343

339344
If `parserOptions.project` has been configured, by default `typescript-eslint` will take this as a sign that you only want to lint files that are captured within the scope of the TypeScript `Program`s which are created. For example, let's say you have a `tsconfig.json` that contains the following:
340345

346+
<!-- prettier-ignore -->
341347
```jsonc
342348
{
343349
// ...more config
@@ -396,6 +402,7 @@ For example, it may look like:
396402

397403
**tsconfig.eslint.json**
398404

405+
<!-- prettier-ignore -->
399406
```jsonc
400407
{
401408
"extends": "./tsconfig.json",

e2e/src/__snapshots__/eslint-8--inline-template-fixer.test.ts.snap

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,25 @@ export class TestComponent {}
1616
`;
1717
1818
exports[`eslint-8--inline-template-fixer should generate the expected inline template fixer result 2`] = `
19-
"{
20-
\\"@angular-devkit/build-angular\\": \\"^18.0.0\\",
21-
\\"@angular-eslint/builder\\": \\"0.0.0-e2e\\",
22-
\\"@angular-eslint/eslint-plugin\\": \\"0.0.0-e2e\\",
23-
\\"@angular-eslint/eslint-plugin-template\\": \\"0.0.0-e2e\\",
24-
\\"@angular-eslint/schematics\\": \\"0.0.0-e2e\\",
25-
\\"@angular-eslint/template-parser\\": \\"0.0.0-e2e\\",
26-
\\"@angular/cli\\": \\"^18.0.0\\",
27-
\\"@angular/compiler-cli\\": \\"^18.0.0\\",
28-
\\"@types/jasmine\\": \\"~5.1.0\\",
29-
\\"@typescript-eslint/eslint-plugin\\": \\"7.11.0\\",
30-
\\"@typescript-eslint/parser\\": \\"7.11.0\\",
31-
\\"eslint\\": \\"8.57.0\\",
32-
\\"jasmine-core\\": \\"~5.1.0\\",
33-
\\"karma\\": \\"~6.4.0\\",
34-
\\"karma-chrome-launcher\\": \\"~3.2.0\\",
35-
\\"karma-coverage\\": \\"~2.2.0\\",
36-
\\"karma-jasmine\\": \\"~5.1.0\\",
37-
\\"karma-jasmine-html-reporter\\": \\"~2.1.0\\",
38-
\\"typescript\\": \\"~5.4.2\\"
39-
}"
19+
{
20+
"@angular-devkit/build-angular": "^18.X.X",
21+
"@angular-eslint/builder": "0.0.0-e2e",
22+
"@angular-eslint/eslint-plugin": "0.0.0-e2e",
23+
"@angular-eslint/eslint-plugin-template": "0.0.0-e2e",
24+
"@angular-eslint/schematics": "0.0.0-e2e",
25+
"@angular-eslint/template-parser": "0.0.0-e2e",
26+
"@angular/cli": "^18.X.X",
27+
"@angular/compiler-cli": "^18.X.X",
28+
"@types/jasmine": "~5.1.0",
29+
"@typescript-eslint/eslint-plugin": "7.11.0",
30+
"@typescript-eslint/parser": "7.11.0",
31+
"eslint": "8.57.0",
32+
"jasmine-core": "~5.1.0",
33+
"karma": "~6.4.0",
34+
"karma-chrome-launcher": "~3.2.0",
35+
"karma-coverage": "~2.2.0",
36+
"karma-jasmine": "~5.1.0",
37+
"karma-jasmine-html-reporter": "~2.1.0",
38+
"typescript": "~5.X.X"
39+
}
4040
`;

e2e/src/__snapshots__/inline-template-fixer.test.ts.snap

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,20 @@ export class TestComponent {}
1616
`;
1717
1818
exports[`inline-template-fixer should generate the expected inline template fixer result 2`] = `
19-
"{
20-
\\"@angular-devkit/build-angular\\": \\"^18.0.0\\",
21-
\\"@angular/cli\\": \\"^18.0.0\\",
22-
\\"@angular/compiler-cli\\": \\"^18.0.0\\",
23-
\\"@types/jasmine\\": \\"~5.1.0\\",
24-
\\"angular-eslint\\": \\"0.0.0-e2e\\",
25-
\\"eslint\\": \\"^9.5.0\\",
26-
\\"jasmine-core\\": \\"~5.1.0\\",
27-
\\"karma\\": \\"~6.4.0\\",
28-
\\"karma-chrome-launcher\\": \\"~3.2.0\\",
29-
\\"karma-coverage\\": \\"~2.2.0\\",
30-
\\"karma-jasmine\\": \\"~5.1.0\\",
31-
\\"karma-jasmine-html-reporter\\": \\"~2.1.0\\",
32-
\\"typescript\\": \\"~5.4.2\\",
33-
\\"typescript-eslint\\": \\"8.0.0-alpha.20\\"
34-
}"
19+
{
20+
"@angular-devkit/build-angular": "^18.X.X",
21+
"@angular/cli": "^18.X.X",
22+
"@angular/compiler-cli": "^18.X.X",
23+
"@types/jasmine": "~5.1.0",
24+
"angular-eslint": "0.0.0-e2e",
25+
"eslint": "^9.6.0",
26+
"jasmine-core": "~5.1.0",
27+
"karma": "~6.4.0",
28+
"karma-chrome-launcher": "~3.2.0",
29+
"karma-coverage": "~2.2.0",
30+
"karma-jasmine": "~5.1.0",
31+
"karma-jasmine-html-reporter": "~2.1.0",
32+
"typescript": "~5.X.X",
33+
"typescript-eslint": "8.0.0-alpha.38"
34+
}
3535
`;

e2e/src/__snapshots__/new-workspace-create-application-false-ng-add-then-project.test.ts.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ exports[`new-workspace-create-application-false-ng-add-then-project should pass
77
"@angular/compiler-cli": "^18.X.X",
88
"@types/jasmine": "~5.1.0",
99
"angular-eslint": "0.0.0-e2e",
10-
"eslint": "^9.5.0",
10+
"eslint": "^9.6.0",
1111
"jasmine-core": "~5.1.0",
1212
"karma": "~6.4.0",
1313
"karma-chrome-launcher": "~3.2.0",
1414
"karma-coverage": "~2.2.0",
1515
"karma-jasmine": "~5.1.0",
1616
"karma-jasmine-html-reporter": "~2.1.0",
1717
"typescript": "~5.X.X",
18-
"typescript-eslint": "8.0.0-alpha.20"
18+
"typescript-eslint": "8.0.0-alpha.38"
1919
}
2020
`;
2121

@@ -24,7 +24,7 @@ exports[`new-workspace-create-application-false-ng-add-then-project should pass
2424
const eslint = require(\\"@eslint/js\\");
2525
const tseslint = require(\\"typescript-eslint\\");
2626
const angular = require(\\"angular-eslint\\");
27-
27+
2828
module.exports = tseslint.config(
2929
{
3030
files: [\\"**/*.ts\\"],

e2e/src/__snapshots__/new-workspace-create-application-false-project-then-ng-add.test.ts.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ exports[`new-workspace-create-application-false-project-then-ng-add should pass
77
"@angular/compiler-cli": "^18.X.X",
88
"@types/jasmine": "~5.1.0",
99
"angular-eslint": "0.0.0-e2e",
10-
"eslint": "^9.5.0",
10+
"eslint": "^9.6.0",
1111
"jasmine-core": "~5.1.0",
1212
"karma": "~6.4.0",
1313
"karma-chrome-launcher": "~3.2.0",
1414
"karma-coverage": "~2.2.0",
1515
"karma-jasmine": "~5.1.0",
1616
"karma-jasmine-html-reporter": "~2.1.0",
1717
"typescript": "~5.X.X",
18-
"typescript-eslint": "8.0.0-alpha.20"
18+
"typescript-eslint": "8.0.0-alpha.38"
1919
}
2020
`;
2121

@@ -24,7 +24,7 @@ exports[`new-workspace-create-application-false-project-then-ng-add should pass
2424
const eslint = require(\\"@eslint/js\\");
2525
const tseslint = require(\\"typescript-eslint\\");
2626
const angular = require(\\"angular-eslint\\");
27-
27+
2828
module.exports = tseslint.config(
2929
{
3030
files: [\\"**/*.ts\\"],

e2e/src/__snapshots__/new-workspace.test.ts.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ exports[`new-workspace should pass linting after creating a new workspace from s
77
"@angular/compiler-cli": "^18.X.X",
88
"@types/jasmine": "~5.1.0",
99
"angular-eslint": "0.0.0-e2e",
10-
"eslint": "^9.5.0",
10+
"eslint": "^9.6.0",
1111
"jasmine-core": "~5.1.0",
1212
"karma": "~6.4.0",
1313
"karma-chrome-launcher": "~3.2.0",
@@ -16,7 +16,7 @@ exports[`new-workspace should pass linting after creating a new workspace from s
1616
"karma-jasmine-html-reporter": "~2.1.0",
1717
"ng-packagr": "^18.X.X",
1818
"typescript": "~5.X.X",
19-
"typescript-eslint": "8.0.0-alpha.20"
19+
"typescript-eslint": "8.0.0-alpha.38"
2020
}
2121
`;
2222

@@ -25,7 +25,7 @@ exports[`new-workspace should pass linting after creating a new workspace from s
2525
const eslint = require(\\"@eslint/js\\");
2626
const tseslint = require(\\"typescript-eslint\\");
2727
const angular = require(\\"angular-eslint\\");
28-
28+
2929
module.exports = tseslint.config(
3030
{
3131
files: [\\"**/*.ts\\"],

e2e/src/eslint-8--inline-template-fixer.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ import {
77
runNgNew,
88
} from '../utils/local-registry-process';
99
import { runLintFix } from '../utils/run-lint';
10+
import { normalizeVersionsOfPackagesWeDoNotControl } from '../utils/snapshot-serializers';
11+
12+
expect.addSnapshotSerializer(normalizeVersionsOfPackagesWeDoNotControl);
1013

1114
const fixtureDirectory = 'eslint-8--inline-template-fixer';
1215
let fixture: Fixture;

e2e/src/inline-template-fixer.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ import {
77
runNgNew,
88
} from '../utils/local-registry-process';
99
import { runLintFix } from '../utils/run-lint';
10+
import { normalizeVersionsOfPackagesWeDoNotControl } from '../utils/snapshot-serializers';
11+
12+
expect.addSnapshotSerializer(normalizeVersionsOfPackagesWeDoNotControl);
1013

1114
const fixtureDirectory = 'inline-template-fixer';
1215
let fixture: Fixture;

0 commit comments

Comments
 (0)