File tree Expand file tree Collapse file tree 5 files changed +13
-4
lines changed
Expand file tree Collapse file tree 5 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ export default tseslint.config(
3636 } ,
3737 rules : {
3838 ...reactHooks . configs . recommended . rules ,
39+ curly : [ 'error' , 'all' ] ,
3940 "react-refresh/only-export-components" : "warn" ,
4041 "no-multiple-empty-lines" : "error" ,
4142 quotes : [ "error" , "double" ] ,
Original file line number Diff line number Diff line change @@ -119,7 +119,9 @@ export const CodeBlock = ({
119119 setTimeout ( ( ) => setCopied ( false ) , 2000 ) ;
120120 } catch ( error ) {
121121 let message = "Unable to copy code" ;
122- if ( error instanceof Error ) message = error . message ;
122+ if ( error instanceof Error ) {
123+ message = error . message ;
124+ }
123125 setErrorCopy ( true ) ;
124126 if ( typeof onCopyError === "function" ) {
125127 onCopyError ( message ) ;
Original file line number Diff line number Diff line change @@ -178,7 +178,9 @@ const formatFileSize = (sizeInBytes: number): string => {
178178} ;
179179
180180const isFiletypeSupported = ( filename : string , supportedTypes : string [ ] ) : boolean => {
181- if ( ! supportedTypes . length ) return true ;
181+ if ( ! supportedTypes . length ) {
182+ return true ;
183+ }
182184
183185 const extension = filename . toLowerCase ( ) . slice ( filename . lastIndexOf ( "." ) ) ;
184186 return supportedTypes . some ( type => type . toLowerCase ( ) === extension . toLowerCase ( ) ) ;
Original file line number Diff line number Diff line change @@ -194,7 +194,9 @@ const formatFileSize = (sizeInBytes: number): string => {
194194} ;
195195
196196const isFiletypeSupported = ( filename : string , supportedTypes : string [ ] ) : boolean => {
197- if ( ! supportedTypes . length ) return true ;
197+ if ( ! supportedTypes . length ) {
198+ return true ;
199+ }
198200
199201 const extension = filename . toLowerCase ( ) . slice ( filename . lastIndexOf ( "." ) ) ;
200202 return supportedTypes . some ( type => type . toLowerCase ( ) === extension . toLowerCase ( ) ) ;
Original file line number Diff line number Diff line change @@ -67,7 +67,9 @@ export const SplitButton = ({
6767
6868 useEffect ( ( ) => {
6969 const targetDiv = ref . current ;
70- if ( ! targetDiv ) return ;
70+ if ( ! targetDiv ) {
71+ return ;
72+ }
7173
7274 const resizeObserver = new ResizeObserver ( entries => {
7375 for ( const entry of entries ) {
You can’t perform that action at this time.
0 commit comments