File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -25,11 +25,17 @@ fn prefer_structured_clone_diagnostic(span: Span) -> OxcDiagnostic {
2525#[ derive( Debug , Default , Clone ) ]
2626pub struct PreferStructuredClone ( Box < PreferStructuredCloneConfig > ) ;
2727
28- #[ derive( Debug , Default , Clone ) ]
28+ #[ derive( Debug , Clone ) ]
2929pub struct PreferStructuredCloneConfig {
3030 allowed_functions : Vec < String > ,
3131}
3232
33+ impl Default for PreferStructuredCloneConfig {
34+ fn default ( ) -> Self {
35+ Self { allowed_functions : vec ! [ "cloneDeep" . to_string( ) , "utils.clone" . to_string( ) ] }
36+ }
37+ }
38+
3339impl Deref for PreferStructuredClone {
3440 type Target = PreferStructuredCloneConfig ;
3541
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ fn test_rule_default_matches_from_configuration_null() {
2424 // When fixing a rule, ensure that either:
2525 // 1. The Default implementation returns the same values as from_configuration(null), or
2626 // 2. The from_configuration method is updated to return Default::default() when given null
27- let exceptions = [ "unicorn/prefer-structured-clone" ] ;
27+ let exceptions = [ ] ;
2828
2929 // Iterate through all available linter rules
3030 for rule in RULES . iter ( ) {
You can’t perform that action at this time.
0 commit comments