Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
feat(typescript-estree): default projectService.defaultProject to 'tsconfig.json'#9893
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Thanks for the PR,@JoshuaKGoldberg! typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community. The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately. Thanks again! 🙏Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently onhttps://opencollective.com/typescript-eslint. |
netlifybot commentedAug 27, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
✅ Deploy Preview fortypescript-eslint ready!
To edit notification comments on pull requests, go to yourNetlify site configuration. |
nx-cloudbot commentedAug 27, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
fs.readFileSync( | ||
path.isAbsolute(file) ? file : path.join(getCurrentDirectory(), file), | ||
'utf-8', | ||
), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Without this absolute checking:
A fatal parsing error occurred: Parsing error: Could not read project service default project 'tsconfig.json': error TS5012: Cannot read file '/home/runner/work/typescript-eslint/typescript-eslint/packages/eslint-plugin-internal/tests/fixtures/tsconfig.build.json': ENOENT: no such file or directory, open '/home/runner/work/typescript-eslint/typescript-eslint/packages/eslint-plugin-internal/tests/fixtures/tsconfig.build.json'.
Thattsconfig.build.json
comes frompackages/typescript-estree/tsconfig.json
. The test was reading with cwdpackages/typescript-estree
.
codecovbot commentedAug 28, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@## main #9893 +/- ##======================================= Coverage 88.05% 88.05% ======================================= Files 407 407 Lines 13947 13948 +1 Branches 4071 4071 =======================================+ Hits 12281 12282 +1 Misses 1354 1354 Partials 312 312
Flags with carried forward coverage won't be shown.Click here to find out more.
|
/** @type {import('@jest/types').Config.InitialOptions} */ | ||
module.exports = { | ||
...require('../../jest.config.base.js'), | ||
testRegex: ['./tests/lib/.*\\.test\\.ts$'], | ||
testPathIgnorePatterns: process.env.TYPESCRIPT_ESLINT_PROJECT_SERVICE | ||
? ['/node_modules/', 'project-true'] | ||
: [], |
JoshuaKGoldbergAug 30, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
parse.project-true.test.ts
never really needed to be tested with the project service on anyway. Otherwise:
Could not read project service default project 'tsconfig.json': error TS5012: Cannot read file 'tsconfig.json': ENOENT: no such file or directory, open '/Users/josh/repos/typescript-eslint/packages/typescript-estree/tests/fixtures/projectTrue/tsconfig.json'.
e9428cb
intotypescript-eslint:mainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
PR Checklist
Overview
Now,
getParsedConfigFile
will always be called, even if the user hasn't explicitly providedprojectService.defaultProject
manually. This is actually good, I think: it'll make sure the project'stsconfig.json
is valid.💖