-
-
Notifications
You must be signed in to change notification settings - Fork 943
Linter: ConfigStoreBuilder::from_oxlintrc called twice #16356
Description
I've labelled this as a bug, though I'm not sure if it actually is. But to my mind, it seems strange.
In a project with only 1 config file, ConfigStoreBuilder::from_oxlintrc gets called twice.
To reproduce
Add to top of from_oxlintrc method:
eprintln!("> from_oxlintrc");Run oxlint tests with snapshot updates enabled:
cd apps/oxlint; pnpm run build-test && pnpm test -u; cd ../..Each snapshot has 2 lines > from_oxlintrc.
The only exceptions are fixtures where there's an early error e.g. fixtures/import_error, where there's only 1 call.
When there's a nested config, e.g. fixtures/nested_config, there's 3 calls (not 4, so it's not calling twice for each config).
It's not related to JS plugins - 2 x calls in fixtures/built_in_no_errors, which doesn't use JS plugins.
Expected behavior?
If this is intentional, we'll need to change how options for JS plugins are stored. Currently they're stored twice each, which is wasteful.
Metadata
Metadata
Assignees
Labels
Type
Fields
Give feedbackPriority
Effort