File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -41,13 +41,23 @@ impl AllowType {
4141#[ derive( Debug , Default , Clone ) ]
4242pub struct JsxFilenameExtension ( Box < JsxFilenameExtensionConfig > ) ;
4343
44- #[ derive( Debug , Default , Clone ) ]
44+ #[ derive( Debug , Clone ) ]
4545pub struct JsxFilenameExtensionConfig {
4646 allow : AllowType ,
4747 extensions : Vec < CompactStr > ,
4848 ignore_files_without_code : bool ,
4949}
5050
51+ impl Default for JsxFilenameExtensionConfig {
52+ fn default ( ) -> Self {
53+ Self {
54+ allow : AllowType :: Always ,
55+ extensions : vec ! [ CompactStr :: from( "jsx" ) ] ,
56+ ignore_files_without_code : false ,
57+ }
58+ }
59+ }
60+
5161impl std:: ops:: Deref for JsxFilenameExtension {
5262 type Target = JsxFilenameExtensionConfig ;
5363
Original file line number Diff line number Diff line change @@ -25,7 +25,6 @@ fn test_rule_default_matches_from_configuration_null() {
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
2727 let exceptions = [
28- "react/jsx-filename-extension" ,
2928 "typescript/no-this-alias" ,
3029 "unicorn/prefer-object-from-entries" ,
3130 "unicorn/prefer-structured-clone" ,
You can’t perform that action at this time.
0 commit comments