From 6ad7b7a2a05bc04993233538e63262025fd61490 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Wed, 12 Nov 2025 02:15:59 -0500 Subject: [PATCH 01/10] Cleanup parserOptions for typescript-eslint canary --- test-projects/gjs-types/.eslintrc.cjs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test-projects/gjs-types/.eslintrc.cjs b/test-projects/gjs-types/.eslintrc.cjs index 679a698..ab910c4 100644 --- a/test-projects/gjs-types/.eslintrc.cjs +++ b/test-projects/gjs-types/.eslintrc.cjs @@ -13,6 +13,14 @@ if (process.env.PROJECT_SERVICE) { parserOptions.tsconfigRootDir = process.env.TSCONFIG_ROOT_DIR || __dirname; parserOptions.project = process.env.PROJECT === undefined ? true : process.env.PROJECT; +const manifestPath = require.resolve('@typescript-eslint/parser/package.json'); +const manifest = require(manifestPath); +const isV8 = parseInt(manifest.version[0]) >= 8; + +if (isV8) { + delete parserOptions.project; +} + module.exports = { root: true, parserOptions, From aa6a86795cce71374ef7fa0d77f28c73179d5818 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Wed, 12 Nov 2025 02:19:56 -0500 Subject: [PATCH 02/10] Pin more --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f47cc90..9b2a4a2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -78,6 +78,8 @@ jobs: jq '.pnpm.overrides."@typescript-eslint/parser" = "${{ matrix.eslintTsVersion }}"' package.json | sponge package.json jq '.pnpm.overrides."@typescript-eslint/scope-manager" = "${{ matrix.eslintTsVersion }}"' package.json | sponge package.json jq '.pnpm.overrides."@typescript-eslint/visitor-keys" = "${{ matrix.eslintTsVersion }}"' package.json | sponge package.json + jq '.pnpm.overrides."@typescript-eslint/eslint-plugin" = "${{ matrix.eslintTsVersion }}"' package.json | sponge package.json + jq '.pnpm.overrides."@typescript-eslint/tsconfig-utils" = "${{ matrix.eslintTsVersion }}"' package.json | sponge package.json jq '.pnpm.overrides.typescript = "${{ matrix.tsVersion }}"' package.json | sponge package.json - run: pnpm install --no-frozen-lockfile - run: pnpm test From 7f9354186307f9e4eecd9ccc19a215d6b91e3ed3 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Wed, 12 Nov 2025 08:11:26 -0500 Subject: [PATCH 03/10] ope --- test-projects/gjs-types/.eslintrc.cjs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test-projects/gjs-types/.eslintrc.cjs b/test-projects/gjs-types/.eslintrc.cjs index ab910c4..1e4a766 100644 --- a/test-projects/gjs-types/.eslintrc.cjs +++ b/test-projects/gjs-types/.eslintrc.cjs @@ -3,12 +3,12 @@ const path = require('path'); const parserOptions = {}; -if (process.env.PROJECT_SERVICE) { +// if (process.env.PROJECT_SERVICE) { parserOptions.projectService = { - defaultProject: process.env.DEFAULT_PROJECT || 'tsconfig.json', + defaultProject: process.env.DEFAULT_PROJECT || process.env.PROJECT || 'tsconfig.json', allowDefaultProject: process.env.ALLOW_DEFAULT_PROJECT === 'true' ? ['**/*.js'] : [] }; -} +// } parserOptions.tsconfigRootDir = process.env.TSCONFIG_ROOT_DIR || __dirname; parserOptions.project = process.env.PROJECT === undefined ? true : process.env.PROJECT; From 9893a9d49bff86786db6f98f523364c25586f0dd Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Wed, 12 Nov 2025 08:13:21 -0500 Subject: [PATCH 04/10] ope --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9b2a4a2..a620d52 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -79,7 +79,6 @@ jobs: jq '.pnpm.overrides."@typescript-eslint/scope-manager" = "${{ matrix.eslintTsVersion }}"' package.json | sponge package.json jq '.pnpm.overrides."@typescript-eslint/visitor-keys" = "${{ matrix.eslintTsVersion }}"' package.json | sponge package.json jq '.pnpm.overrides."@typescript-eslint/eslint-plugin" = "${{ matrix.eslintTsVersion }}"' package.json | sponge package.json - jq '.pnpm.overrides."@typescript-eslint/tsconfig-utils" = "${{ matrix.eslintTsVersion }}"' package.json | sponge package.json jq '.pnpm.overrides.typescript = "${{ matrix.tsVersion }}"' package.json | sponge package.json - run: pnpm install --no-frozen-lockfile - run: pnpm test From ef5b72d56a58bde1913d3b8497d7dcb99ea64d39 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Wed, 12 Nov 2025 08:15:15 -0500 Subject: [PATCH 05/10] ope --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a620d52..f47cc90 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -78,7 +78,6 @@ jobs: jq '.pnpm.overrides."@typescript-eslint/parser" = "${{ matrix.eslintTsVersion }}"' package.json | sponge package.json jq '.pnpm.overrides."@typescript-eslint/scope-manager" = "${{ matrix.eslintTsVersion }}"' package.json | sponge package.json jq '.pnpm.overrides."@typescript-eslint/visitor-keys" = "${{ matrix.eslintTsVersion }}"' package.json | sponge package.json - jq '.pnpm.overrides."@typescript-eslint/eslint-plugin" = "${{ matrix.eslintTsVersion }}"' package.json | sponge package.json jq '.pnpm.overrides.typescript = "${{ matrix.tsVersion }}"' package.json | sponge package.json - run: pnpm install --no-frozen-lockfile - run: pnpm test From 78c08dd920ff7b15382b7f7d8905f672d290c3d8 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Wed, 12 Nov 2025 08:21:14 -0500 Subject: [PATCH 06/10] ope --- test-projects/configs/flat-ts/eslint.config.mjs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test-projects/configs/flat-ts/eslint.config.mjs b/test-projects/configs/flat-ts/eslint.config.mjs index a7c9d80..e4bffd9 100644 --- a/test-projects/configs/flat-ts/eslint.config.mjs +++ b/test-projects/configs/flat-ts/eslint.config.mjs @@ -21,6 +21,13 @@ import n from 'eslint-plugin-n'; import globals from 'globals'; import ts from 'typescript-eslint'; + +import { createRequire } from 'node:module'; +const require = createRequire(import.meta.url); +const manifestPath = require.resolve('@typescript-eslint/parser/package.json'); +const manifest = require(manifestPath); +const isV8 = parseInt(manifest.version[0]) >= 8; + const parserOptions = { esm: { js: { @@ -29,7 +36,7 @@ const parserOptions = { }, ts: { projectService: true, - project: true, + ...(isV8 ? {} : { project: true }), tsconfigRootDir: import.meta.dirname, }, }, From 76ae7808c93faf95a66c0141c05629d1dd891d0d Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Wed, 12 Nov 2025 08:25:46 -0500 Subject: [PATCH 07/10] ope --- test-projects/gts/.eslintrc.cjs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test-projects/gts/.eslintrc.cjs b/test-projects/gts/.eslintrc.cjs index 7b71c38..28f1d84 100644 --- a/test-projects/gts/.eslintrc.cjs +++ b/test-projects/gts/.eslintrc.cjs @@ -1,9 +1,17 @@ 'use strict'; + +parserOptions.tsconfigRootDir = process.env.TSCONFIG_ROOT_DIR || __dirname; +parserOptions.project = process.env.PROJECT === undefined ? true : process.env.PROJECT; + +const manifestPath = require.resolve('@typescript-eslint/parser/package.json'); +const manifest = require(manifestPath); +const isV8 = parseInt(manifest.version[0]) >= 8; + module.exports = { root: true, parserOptions: { - project: true, + ...(isV8 ? {} : { project: true }), projectService: true, tsconfigRootDir: __dirname }, From 832a4a2ac5a38b4430ce1ddf16edb51a743e329c Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Wed, 12 Nov 2025 08:31:41 -0500 Subject: [PATCH 08/10] ope --- test-projects/gts/.eslintrc.cjs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/test-projects/gts/.eslintrc.cjs b/test-projects/gts/.eslintrc.cjs index 28f1d84..1226ced 100644 --- a/test-projects/gts/.eslintrc.cjs +++ b/test-projects/gts/.eslintrc.cjs @@ -1,9 +1,5 @@ 'use strict'; - -parserOptions.tsconfigRootDir = process.env.TSCONFIG_ROOT_DIR || __dirname; -parserOptions.project = process.env.PROJECT === undefined ? true : process.env.PROJECT; - const manifestPath = require.resolve('@typescript-eslint/parser/package.json'); const manifest = require(manifestPath); const isV8 = parseInt(manifest.version[0]) >= 8; From d57a8611242b03718480a590ab0b6c0868454c5e Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Wed, 12 Nov 2025 08:40:43 -0500 Subject: [PATCH 09/10] ope --- test-projects/configs/flat-ts/tsconfig.json | 1 - 1 file changed, 1 deletion(-) diff --git a/test-projects/configs/flat-ts/tsconfig.json b/test-projects/configs/flat-ts/tsconfig.json index 48ae5f1..f940e9c 100644 --- a/test-projects/configs/flat-ts/tsconfig.json +++ b/test-projects/configs/flat-ts/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "@tsconfig/ember/tsconfig.json", - "include": ["src/**/*", "unpublished-development-types/**/*"], "compilerOptions": { "allowJs": true, "declarationDir": "declarations", From 9c4071b9a2ea8834455a78c66925c5dd16a7e460 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Wed, 12 Nov 2025 09:00:10 -0500 Subject: [PATCH 10/10] Bring in work from https://github.com/ember-tooling/ember-eslint-parser/pull/142/files --- src/parser/gjs-gts-parser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parser/gjs-gts-parser.js b/src/parser/gjs-gts-parser.js index ce9702f..b9b662a 100644 --- a/src/parser/gjs-gts-parser.js +++ b/src/parser/gjs-gts-parser.js @@ -159,7 +159,7 @@ module.exports = { let result = null; const filePath = options.filePath; - if (options.project) { + if (options.project || options.projectService) { jsCode = replaceExtensions(jsCode); }