Skip to content

Commit eb1c596

Browse files
committed
fix(linter/consistent-index-object-style): fix default impl for rule config (#12031)
default for rust bool is false, however this value's default should be true fixes #12020
1 parent c7b38f9 commit eb1c596

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,17 @@ fn consistent_indexed_object_style_diagnostic(a: &str, b: &str, span: Span) -> O
1818
.with_label(span)
1919
}
2020

21-
#[derive(Debug, Default, Clone)]
21+
#[derive(Debug, Clone)]
2222
pub struct ConsistentIndexedObjectStyle {
2323
is_record_mode: bool,
2424
}
2525

26+
impl Default for ConsistentIndexedObjectStyle {
27+
fn default() -> Self {
28+
Self { is_record_mode: true }
29+
}
30+
}
31+
2632
#[derive(Debug, Default, Clone, Copy, Eq, PartialEq)]
2733
enum ConsistentIndexedObjectStyleConfig {
2834
#[default]

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy