Skip to content

Commit b4cc222

Browse files
committed
1 parent 1688beb commit b4cc222

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

crates/oxc_linter/src/rules/typescript/no_namespace.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,18 @@ fn no_namespace_diagnostic(span: Span) -> OxcDiagnostic {
1818
.with_label(span)
1919
}
2020

21-
#[derive(Debug, Default, Clone)]
21+
#[derive(Debug, Clone)]
2222
pub struct NoNamespace {
2323
allow_declarations: bool,
2424
allow_definition_files: bool,
2525
}
2626

27+
impl Default for NoNamespace {
28+
fn default() -> Self {
29+
Self { allow_declarations: false, allow_definition_files: true }
30+
}
31+
}
32+
2733
declare_oxc_lint!(
2834
/// ### What it does
2935
///
@@ -130,7 +136,7 @@ impl Rule for NoNamespace {
130136
.get(0)
131137
.and_then(|x| x.get("allowDefinitionFiles"))
132138
.and_then(serde_json::Value::as_bool)
133-
.unwrap_or(false),
139+
.unwrap_or(true),
134140
}
135141
}
136142

0 commit comments

Comments
 (0)