diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1d33c82ba1..bd0cf3e0a5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 }} @@ -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 @@ -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 }}) @@ -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 }} diff --git a/.github/workflows/smoke-test.yml b/.github/workflows/smoke-test.yml index 04104b0abc..68e4352394 100644 --- a/.github/workflows/smoke-test.yml +++ b/.github/workflows/smoke-test.yml @@ -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" diff --git a/package.json b/package.json index c0205f9052..054f432b51 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/rules/ast/is-reference-identifier.js b/rules/ast/is-reference-identifier.js index 7ebf894119..0794a3acd7 100644 --- a/rules/ast/is-reference-identifier.js +++ b/rules/ast/is-reference-identifier.js @@ -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;