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

Restore import/no-unresolved for ESM-only test packages #16387

Merged

Conversation

Abe27342
Copy link
Contributor

Description

#15939 and related PRs disabled this linter rule for imports to .js files, since the base eslint module resolver doesn't understand that relative imports to .js should sometimes conceptually refer to .ts files instead. This re-enables linting for that rule in affected packages by using eslint-import-resolver-typescript.

@Abe27342 Abe27342 requested review from msfluid-bot and a team as code owners July 17, 2023 17:14
@github-actions github-actions bot added area: examples Changes that focus on our examples area: tests Tests to add, test infrastructure improvements, etc dependencies Pull requests that update a dependency file base: main PRs targeted against main branch labels Jul 17, 2023
@Abe27342
Copy link
Contributor Author

Abe27342 commented Jul 17, 2023

AB#4614 is related. @tylerbutler do you have thoughts on if this change is appropriate for the base config? I think this import resolver is likely slightly slower than the one we're currently using (node), though I'm not sure if the difference is noticeable.

@tylerbutler
Copy link
Member

AB#4614 is related. @tylerbutler do you have thoughts on if this change is appropriate for the base config? I think this import resolver is likely slightly slower than the one we're currently using (node), though I'm not sure if the difference is noticeable.

I'm not sure. I wouldn't put it in the base config, but it might make sense to export a new config with this enabled (similar to a react config). That said, in the absence of clear benefit, I wouldn't do it.

@Abe27342 Abe27342 merged commit d9290c4 into microsoft:main Aug 1, 2023
pradeepvairamani pushed a commit that referenced this pull request Aug 9, 2023
## Description

#15939 and related PRs disabled this linter rule for imports to `.js`
files, since the base eslint module resolver doesn't understand that
relative imports to .js should sometimes conceptually refer to .ts files
instead. This re-enables linting for that rule in affected packages by
using
[eslint-import-resolver-typescript](https://www.npmjs.com/package/eslint-import-resolver-typescript).
@Abe27342 Abe27342 deleted the use-eslint-import-resolver-typescript branch November 3, 2023 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: examples Changes that focus on our examples area: tests Tests to add, test infrastructure improvements, etc base: main PRs targeted against main branch dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants