Skip to content

Commit 8105756

Browse files
authored
Update @typescript-eslint/parse to v8 (#2358)
1 parent d2df181 commit 8105756

File tree

4 files changed

+16
-9
lines changed

4 files changed

+16
-9
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- uses: actions/setup-node@v4
3030
with:
3131
node-version: ${{ matrix.node-version }}
32-
- run: npm install --legacy-peer-deps
32+
- run: npm install
3333
- run: npx ava
3434
lint-test:
3535
runs-on: ${{ matrix.os }}
@@ -44,7 +44,7 @@ jobs:
4444
with:
4545
# Locked due to the difference of `zlib.gzipSync()` between Node.js versions
4646
node-version: 20
47-
- run: npm install --legacy-peer-deps
47+
- run: npm install
4848
- run: npm run lint
4949
- run: npx del-cli test/snapshots --verbose
5050
# Force update snapshots, https://github.com/avajs/ava/discussions/2754
@@ -62,7 +62,7 @@ jobs:
6262
steps:
6363
- uses: actions/checkout@v4
6464
- uses: actions/setup-node@v4
65-
- run: npm install --legacy-peer-deps
65+
- run: npm install
6666
- run: npm run run-rules-on-codebase
6767
integration:
6868
name: Integration test (${{ matrix.group }})
@@ -85,5 +85,5 @@ jobs:
8585
steps:
8686
- uses: actions/checkout@v4
8787
- uses: actions/setup-node@v4
88-
- run: npm install --legacy-peer-deps
88+
- run: npm install
8989
- run: npm run integration -- --group ${{ matrix.group }}

.github/workflows/smoke-test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ jobs:
99
lint:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v3
13-
- uses: actions/setup-node@v3
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-node@v4
1414
- run: |
15-
npm install --legacy-peer-deps
15+
npm install
1616
npm link
17-
npm link eslint-plugin-unicorn --legacy-peer-deps
17+
npm link eslint-plugin-unicorn
1818
- uses: AriPerkkio/eslint-remote-tester-run-action@v4
1919
with:
2020
issue-title: "Results of weekly scheduled smoke test"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
"@babel/core": "^7.24.5",
7272
"@babel/eslint-parser": "^7.24.5",
7373
"@lubien/fixture-beta-package": "^1.0.0-beta.1",
74-
"@typescript-eslint/parser": "^7.8.0",
74+
"@typescript-eslint/parser": "^8.0.0-alpha.12",
7575
"ava": "^6.1.3",
7676
"c8": "^9.1.0",
7777
"chalk": "^5.3.0",

rules/ast/is-reference-identifier.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,18 @@ function isNotReference(node) {
120120
return parent.parameters.includes(node);
121121
}
122122

123+
// `@typescript-eslint/parse` v7
123124
// `type Foo = { [Identifier in keyof string]: number; };`
124125
case 'TSTypeParameter': {
125126
return parent.name === node;
126127
}
127128

129+
// `@typescript-eslint/parse` v8
130+
// `type Foo = { [Identifier in keyof string]: number; };`
131+
case 'TSMappedType': {
132+
return parent.key === node;
133+
}
134+
128135
// `type Identifier = Foo`
129136
case 'TSTypeAliasDeclaration': {
130137
return parent.id === node;

0 commit comments

Comments
 (0)