Skip to content

Commit

Permalink
Update @typescript-eslint/parse to v8 (#2358)
Browse files Browse the repository at this point in the history
  • Loading branch information
fisker committed May 15, 2024
1 parent d2df181 commit 8105756
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm install --legacy-peer-deps
- run: npm install
- run: npx ava
lint-test:
runs-on: ${{ matrix.os }}
Expand All @@ -44,7 +44,7 @@ jobs:
with:
# Locked due to the difference of `zlib.gzipSync()` between Node.js versions
node-version: 20
- run: npm install --legacy-peer-deps
- run: npm install
- run: npm run lint
- run: npx del-cli test/snapshots --verbose
# Force update snapshots, https://github.com/avajs/ava/discussions/2754
Expand All @@ -62,7 +62,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- run: npm install --legacy-peer-deps
- run: npm install
- run: npm run run-rules-on-codebase
integration:
name: Integration test (${{ matrix.group }})
Expand All @@ -85,5 +85,5 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- run: npm install --legacy-peer-deps
- run: npm install
- run: npm run integration -- --group ${{ matrix.group }}
8 changes: 4 additions & 4 deletions .github/workflows/smoke-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- run: |
npm install --legacy-peer-deps
npm install
npm link
npm link eslint-plugin-unicorn --legacy-peer-deps
npm link eslint-plugin-unicorn
- uses: AriPerkkio/eslint-remote-tester-run-action@v4
with:
issue-title: "Results of weekly scheduled smoke test"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"@babel/core": "^7.24.5",
"@babel/eslint-parser": "^7.24.5",
"@lubien/fixture-beta-package": "^1.0.0-beta.1",
"@typescript-eslint/parser": "^7.8.0",
"@typescript-eslint/parser": "^8.0.0-alpha.12",
"ava": "^6.1.3",
"c8": "^9.1.0",
"chalk": "^5.3.0",
Expand Down
7 changes: 7 additions & 0 deletions rules/ast/is-reference-identifier.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,18 @@ function isNotReference(node) {
return parent.parameters.includes(node);
}

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

// `@typescript-eslint/parse` v8
// `type Foo = { [Identifier in keyof string]: number; };`
case 'TSMappedType': {
return parent.key === node;
}

// `type Identifier = Foo`
case 'TSTypeAliasDeclaration': {
return parent.id === node;
Expand Down

0 comments on commit 8105756

Please sign in to comment.