Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 214c8e7

Browse files
committed
fix(linter): fix default values for import/no-absolute-path (#11959)
1 parent b4cc222 commit 214c8e7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

crates/oxc_linter/src/rules/import/no_absolute_path.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,19 @@ fn no_absolute_path_diagnostic(span: Span) -> OxcDiagnostic {
1515
}
1616

1717
/// <https://github.com/import-js/eslint-plugin-import/blob/v2.31.0/docs/rules/no-absolute-path.md>
18-
#[derive(Debug, Default, Clone)]
18+
#[derive(Debug, Clone)]
1919
pub struct NoAbsolutePath {
2020
esmodule: bool,
2121
commonjs: bool,
2222
amd: bool,
2323
}
2424

25+
impl Default for NoAbsolutePath {
26+
fn default() -> Self {
27+
Self { esmodule: true, commonjs: true, amd: false }
28+
}
29+
}
30+
2531
declare_oxc_lint!(
2632
/// ### What it does
2733
///

0 commit comments

Comments
 (0)