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 @@ -187,7 +187,10 @@ const parsePnpmWorkspaceCatalogs = (rootDirectory: string): CatalogCollection =>
187187 const colonIndex = trimmed . indexOf ( ":" ) ;
188188 if ( colonIndex > 0 ) {
189189 const key = trimmed . slice ( 0 , colonIndex ) . trim ( ) . replace ( / [ " ' ] / g, "" ) ;
190- const value = trimmed . slice ( colonIndex + 1 ) . trim ( ) . replace ( / [ " ' ] / g, "" ) ;
190+ const value = trimmed
191+ . slice ( colonIndex + 1 )
192+ . trim ( )
193+ . replace ( / [ " ' ] / g, "" ) ;
191194 if ( key && value ) defaultCatalog [ key ] = value ;
192195 }
193196 continue ;
@@ -211,7 +214,10 @@ const parsePnpmWorkspaceCatalogs = (rootDirectory: string): CatalogCollection =>
211214 const colonIndex = trimmed . indexOf ( ":" ) ;
212215 if ( colonIndex > 0 && currentCatalogName ) {
213216 const key = trimmed . slice ( 0 , colonIndex ) . trim ( ) . replace ( / [ " ' ] / g, "" ) ;
214- const value = trimmed . slice ( colonIndex + 1 ) . trim ( ) . replace ( / [ " ' ] / g, "" ) ;
217+ const value = trimmed
218+ . slice ( colonIndex + 1 )
219+ . trim ( )
220+ . replace ( / [ " ' ] / g, "" ) ;
215221 if ( key && value ) namedCatalogs [ currentCatalogName ] [ key ] = value ;
216222 }
217223 }
@@ -282,11 +288,7 @@ const resolveCatalogVersion = (
282288
283289 if ( rootDirectory ) {
284290 const pnpmCatalogs = parsePnpmWorkspaceCatalogs ( rootDirectory ) ;
285- const pnpmVersion = resolveCatalogVersionFromCollection (
286- pnpmCatalogs ,
287- packageName ,
288- catalogName ,
289- ) ;
291+ const pnpmVersion = resolveCatalogVersionFromCollection ( pnpmCatalogs , packageName , catalogName ) ;
290292 if ( pnpmVersion ) return pnpmVersion ;
291293 }
292294
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