File tree Expand file tree Collapse file tree 5 files changed +18
-13
lines changed
Expand file tree Collapse file tree 5 files changed +18
-13
lines changed Original file line number Diff line number Diff line change @@ -184,7 +184,8 @@ export const nextjsMissingMetadata: Rule = {
184184const describeClientSideNavigation = ( node : EsTreeNode ) : string | null => {
185185 if ( node . type === "CallExpression" && node . callee ?. type === "MemberExpression" ) {
186186 const objectName = node . callee . object ?. type === "Identifier" ? node . callee . object . name : null ;
187- const methodName = node . callee . property ?. type === "Identifier" ? node . callee . property . name : null ;
187+ const methodName =
188+ node . callee . property ?. type === "Identifier" ? node . callee . property . name : null ;
188189 if ( objectName === "router" && ( methodName === "push" || methodName === "replace" ) ) {
189190 return `router.${ methodName } () in useEffect — use redirect() from next/navigation or handle navigation in an event handler` ;
190191 }
Original file line number Diff line number Diff line change @@ -56,9 +56,7 @@ const getRawTextDescription = (child: EsTreeNode): string => {
5656
5757const isTextHandlingComponent = ( elementName : string ) : boolean => {
5858 if ( REACT_NATIVE_TEXT_COMPONENTS . has ( elementName ) ) return true ;
59- return [ ...REACT_NATIVE_TEXT_COMPONENT_SUFFIXES ] . some ( ( suffix ) =>
60- elementName . endsWith ( suffix ) ,
61- ) ;
59+ return [ ...REACT_NATIVE_TEXT_COMPONENT_SUFFIXES ] . some ( ( suffix ) => elementName . endsWith ( suffix ) ) ;
6260} ;
6361
6462export const rnNoRawText : Rule = {
Original file line number Diff line number Diff line change @@ -189,7 +189,10 @@ const parsePnpmWorkspaceCatalogs = (rootDirectory: string): CatalogCollection =>
189189 const colonIndex = trimmed . indexOf ( ":" ) ;
190190 if ( colonIndex > 0 ) {
191191 const key = trimmed . slice ( 0 , colonIndex ) . trim ( ) . replace ( / [ " ' ] / g, "" ) ;
192- const value = trimmed . slice ( colonIndex + 1 ) . trim ( ) . replace ( / [ " ' ] / g, "" ) ;
192+ const value = trimmed
193+ . slice ( colonIndex + 1 )
194+ . trim ( )
195+ . replace ( / [ " ' ] / g, "" ) ;
193196 if ( key && value ) defaultCatalog [ key ] = value ;
194197 }
195198 continue ;
@@ -213,7 +216,10 @@ const parsePnpmWorkspaceCatalogs = (rootDirectory: string): CatalogCollection =>
213216 const colonIndex = trimmed . indexOf ( ":" ) ;
214217 if ( colonIndex > 0 && currentCatalogName ) {
215218 const key = trimmed . slice ( 0 , colonIndex ) . trim ( ) . replace ( / [ " ' ] / g, "" ) ;
216- const value = trimmed . slice ( colonIndex + 1 ) . trim ( ) . replace ( / [ " ' ] / g, "" ) ;
219+ const value = trimmed
220+ . slice ( colonIndex + 1 )
221+ . trim ( )
222+ . replace ( / [ " ' ] / g, "" ) ;
217223 if ( key && value ) namedCatalogs [ currentCatalogName ] [ key ] = value ;
218224 }
219225 }
@@ -284,11 +290,7 @@ const resolveCatalogVersion = (
284290
285291 if ( rootDirectory ) {
286292 const pnpmCatalogs = parsePnpmWorkspaceCatalogs ( rootDirectory ) ;
287- const pnpmVersion = resolveCatalogVersionFromCollection (
288- pnpmCatalogs ,
289- packageName ,
290- catalogName ,
291- ) ;
293+ const pnpmVersion = resolveCatalogVersionFromCollection ( pnpmCatalogs , packageName , catalogName ) ;
292294 if ( pnpmVersion ) return pnpmVersion ;
293295 }
294296
Original file line number Diff line number Diff line change 22 "name" : " bun-catalog-workspace" ,
33 "private" : true ,
44 "workspaces" : {
5- "packages" : [" apps/*" ],
5+ "packages" : [
6+ " apps/*"
7+ ],
68 "catalog" : {
79 "react" : " ^19.1.4" ,
810 "react-dom" : " ^19.1.4"
Original file line number Diff line number Diff line change 11{
22 "name" : " monorepo-root" ,
33 "private" : true ,
4- "workspaces" : [" packages/*" ],
4+ "workspaces" : [
5+ " packages/*"
6+ ],
57 "dependencies" : {
68 "react" : " ^19.0.0" ,
79 "react-dom" : " ^19.0.0"
You can’t perform that action at this time.
0 commit comments