Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions apps/oxlint/test/fixtures/load_paths/.oxlintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"./plugins/plugin6.mts",
"./plugins/plugin7",
"plugin8",
"plugin9"
"plugin9",
"plugin10"
],
"rules": {
"plugin1/no-debugger": "error",
Expand All @@ -19,6 +20,7 @@
"plugin6/no-debugger": "error",
"plugin7/no-debugger": "error",
"plugin8/no-debugger": "error",
"plugin9/no-debugger": "error"
"plugin9/no-debugger": "error",
"plugin10/no-debugger": "error"
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion apps/oxlint/test/fixtures/load_paths/output.snap.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
: ^^^^^^^^^
`----

x plugin10(no-debugger): Unexpected Debugger Statement
,-[files/index.js:1:1]
1 | debugger;
: ^^^^^^^^^
`----

x plugin2(no-debugger): Unexpected Debugger Statement
,-[files/index.js:1:1]
1 | debugger;
Expand Down Expand Up @@ -64,7 +70,7 @@
: ^^^^^^^^^
`----

Found 1 warning and 9 errors.
Found 1 warning and 10 errors.
Finished in Xms on 1 file using X threads.
```

Expand Down
8 changes: 6 additions & 2 deletions crates/oxc_linter/src/config/config_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::{
};

use itertools::Itertools;
use oxc_resolver::Resolver;
use oxc_resolver::{ResolveOptions, Resolver};
use rustc_hash::{FxHashMap, FxHashSet};

use oxc_span::{CompactStr, format_compact_str};
Expand Down Expand Up @@ -169,7 +169,11 @@ impl ConfigStoreBuilder {
return Err(ConfigBuilderError::NoExternalLinterConfigured { plugin_specifier });
};

let resolver = Resolver::default();
let resolver = Resolver::new(ResolveOptions {
main_fields: vec!["module".into(), "main".into()],
condition_names: vec!["module".into(), "import".into()],
..Default::default()
});

#[expect(clippy::missing_panics_doc, reason = "oxlintrc.path is always a file path")]
let oxlintrc_dir = oxlintrc.path.parent().unwrap();
Expand Down
Loading