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

refactor(linter): decouple module resolution from import plugin #5815

Closed
Tracked by #5814
DonIsaac opened this issue Sep 16, 2024 · 0 comments · Fixed by #5829
Closed
Tracked by #5814

refactor(linter): decouple module resolution from import plugin #5815

DonIsaac opened this issue Sep 16, 2024 · 0 comments · Fixed by #5829
Labels
A-linter Area - Linter C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior good first issue Experience Level - Good for newcomers

Comments

@DonIsaac
Copy link
Contributor

DonIsaac commented Sep 16, 2024

The linter's Runtime currently checks if import plugin is enabled before resolving imported modules. We want this feature to be controlled via its own new setting. This will let us change if/when/why module resolution happens in the future.

Examples

Here are some, but not all, of the parts of Runtime that need refactoring:

let resolver = linter.options().plugins.has_import().then(|| {

if self.linter.options().plugins.has_import() {

Tasks

  • Add a new cross_module flag to LintServiceOptions and have Runtime consume it.
  • Remove all usages of plugins.has_import() from Runtime

Acceptance Criteria

  • cross_module should default to false unless import plugin is enabled.
  • Runtime and LintService's APIs should not change.
  • No references to plugin.has_import() remain in Runtime.
@DonIsaac DonIsaac added good first issue Experience Level - Good for newcomers A-linter Area - Linter C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-linter Area - Linter C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior good first issue Experience Level - Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant