Class Autodetect

java.lang.Object
org.openrewrite.style.NamedStyles
org.openrewrite.javascript.style.Autodetect
All Implemented Interfaces:
org.openrewrite.marker.Marker, org.openrewrite.rpc.RpcCodec<Autodetect>

public class Autodetect extends org.openrewrite.style.NamedStyles implements org.openrewrite.rpc.RpcCodec<Autodetect>
Auto-detected styles for JavaScript/TypeScript code.

This marker is added when Prettier configuration is not available in the project. It collects formatting statistics from existing source files to detect patterns like tabs vs spaces, indent size, and brace spacing preferences.

  • Constructor Summary

    Constructors
    Constructor
    Description
    Autodetect(UUID id, Collection<org.openrewrite.style.Style> styles)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    rpcReceive(Autodetect before, org.openrewrite.rpc.RpcReceiveQueue q)
     
    void
    rpcSend(Autodetect after, org.openrewrite.rpc.RpcSendQueue q)
     
     
    withStyles(Collection<org.openrewrite.style.Style> styles)
     

    Methods inherited from class org.openrewrite.style.NamedStyles

    canEqual, equals, getDescription, getDisplayName, getId, getName, getStyle, getStyles, getTags, hashCode, merge, merge, setDescription, setDisplayName, setId, setName, setStyles, setTags, toString, validate, withDescription, withDisplayName, withName, withTags

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.openrewrite.marker.Marker

    print
  • Constructor Details

    • Autodetect

      public Autodetect(UUID id, Collection<org.openrewrite.style.Style> styles)
  • Method Details

    • withId

      public Autodetect withId(UUID id)
      Specified by:
      withId in interface org.openrewrite.marker.Marker
      Overrides:
      withId in class org.openrewrite.style.NamedStyles
    • withStyles

      public Autodetect withStyles(Collection<org.openrewrite.style.Style> styles)
      Overrides:
      withStyles in class org.openrewrite.style.NamedStyles
    • rpcSend

      public void rpcSend(Autodetect after, org.openrewrite.rpc.RpcSendQueue q)
      Specified by:
      rpcSend in interface org.openrewrite.rpc.RpcCodec<Autodetect>
    • rpcReceive

      public Autodetect rpcReceive(Autodetect before, org.openrewrite.rpc.RpcReceiveQueue q)
      Specified by:
      rpcReceive in interface org.openrewrite.rpc.RpcCodec<Autodetect>