Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix handling of tsconfig's #632

Merged
merged 3 commits into from Nov 3, 2021
Merged

Fix handling of tsconfig's #632

merged 3 commits into from Nov 3, 2021

Conversation

Spence-S
Copy link
Contributor

@Spence-S Spence-S commented Nov 1, 2021

  • fixes #629

  • will only use default tsconfig if no other can be found.

  • Now detects if tsconfig properly applies to file. If not - creates a temp tsconfig that will cover the file in question which extends any found tsconfig (this is the same as it was) and will prevent any parserOptions.project errors. (this is very similar to what happened prior to #629 regression)

  • Will not create a new file if not needed.

  • tsconfig hashes are more predictable now and won't create different hashes for different node versions, which could previously cause confusion.

@sindresorhus
Copy link
Member

@sindresorhus sindresorhus commented Nov 3, 2021

Seems to fail on Node.js 16 in this TS project: https://github.com/sindresorhus/ow/runs/4091470790?check_suite_focus=true

sindresorhus/ow@db0eef8

@Spence-S
Copy link
Contributor Author

@Spence-S Spence-S commented Nov 3, 2021

@sindresorhus - I don't think that failure is related to this PR - its a module resolution error. Nothing in this PR changed any module resolution stuff. That failure was from

config.baseConfig.extends.push(require.resolve('eslint-config-xo-typescript'));
- I think this is more likely related to #624

@sindresorhus sindresorhus changed the title fix: properly handle tsconfigs Fix handling of tsconfig's Nov 3, 2021
@sindresorhus sindresorhus merged commit 261696e into xojs:main Nov 3, 2021
3 checks passed
@sindresorhus
Copy link
Member

@sindresorhus sindresorhus commented Nov 3, 2021

Thanks for fixing this 🙌

@Spence-S Spence-S deleted the master branch Nov 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants