-
-
Notifications
You must be signed in to change notification settings - Fork 211
Open
Description
Background
When an Ember project consumes a shared eslint
configuration, then running lint:js
in that project results in many error messages:
Partial log from lint:js
[ember-eslint-parser] Failed to parse tsconfig: tsconfig.json Error: error TS5012: Cannot read file 'tsconfig.json': ENOENT: no such file or directory, open '/node_modules/@ijlee2-frontend-configs/eslint-config-ember/v1-app/tsconfig.json'.
at Object.onUnRecoverableConfigFileDiagnostic (/node_modules/.pnpm/@[email protected][email protected]/node_modules/@typescript-eslint/tsconfig-utils/dist/getParsedConfigFile.js:55:19)
at Object.getParsedCommandLineOfConfigFile (/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:42456:10)
at Object.getParsedConfigFile (/node_modules/.pnpm/@[email protected][email protected]/node_modules/@typescript-eslint/tsconfig-utils/dist/getParsedConfigFile.js:51:29)
at parseAllowJsFromTsconfig (/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_eslint@9_010b21943b1257599f6ee846cf94aa41/node_modules/ember-eslint-parser/src/parser/gjs-gts-parser.js:31:34)
at getAllowJs (/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_eslint@9_010b21943b1257599f6ee846cf94aa41/node_modules/ember-eslint-parser/src/parser/gjs-gts-parser.js:112:12)
at Object.parseForESLint (/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_eslint@9_010b21943b1257599f6ee846cf94aa41/node_modules/ember-eslint-parser/src/parser/gjs-gts-parser.js:142:58)
at Object.parse (/node_modules/.pnpm/[email protected][email protected]/node_modules/eslint/lib/languages/js/index.js:270:15)
at ParserService.parseSync (/node_modules/.pnpm/[email protected][email protected]/node_modules/eslint/lib/services/parser-service.js:34:27)
at #flatVerifyWithoutProcessors (/node_modules/.pnpm/[email protected][email protected]/node_modules/eslint/lib/linter/linter.js:1846:38)
at Linter._verifyWithFlatConfigArrayAndWithoutProcessors (/node_modules/.pnpm/[email protected][email protected]/node_modules/eslint/lib/linter/linter.js:2189:43)
at /node_modules/.pnpm/[email protected][email protected]/node_modules/eslint/lib/linter/linter.js:1773:17
at Array.map (<anonymous>)
at Linter._verifyWithFlatConfigArrayAndProcessor (/node_modules/.pnpm/[email protected][email protected]/node_modules/eslint/lib/linter/linter.js:1768:30)
at Linter._verifyWithFlatConfigArray (/node_modules/.pnpm/[email protected][email protected]/node_modules/eslint/lib/linter/linter.js:2275:16)
at Linter.verify (/node_modules/.pnpm/[email protected][email protected]/node_modules/eslint/lib/linter/linter.js:1677:10)
at Linter.verifyAndFix (/node_modules/.pnpm/[email protected][email protected]/node_modules/eslint/lib/linter/linter.js:2557:20)
at verifyText (/node_modules/.pnpm/[email protected][email protected]/node_modules/eslint/lib/eslint/eslint-helpers.js:1179:45)
at readAndVerifyFile (/node_modules/.pnpm/[email protected][email protected]/node_modules/eslint/lib/eslint/eslint-helpers.js:1320:10)
I traced the bug to #131, because the errors go away when I pin ember-eslint-parser
to 0.5.10
.
Reproduction
https://github.com/ijlee2/ember-workshop/tree/bug-ember-eslint-parser
# Switch to the bug-ember-eslint-parser branch
git clone [email protected]:ijlee2/ember-workshop.git
cd ember-workshop
git checkout bug-ember-eslint-parser
pnpm install
# Check 0.5.10 (no error messages should appear)
cd my-app
pnpm lint:js
# Check 0.5.11 (error messages should appear)
git revert da79b5e627e41003cb61fcbb1faac2c7abc27895
pnpm install
rm .eslintcache
pnpm lint:js
Related issue
Metadata
Metadata
Assignees
Labels
No labels