Package org.openrewrite.javascript.style
Class PrettierStyle
java.lang.Object
org.openrewrite.style.NamedStyles
org.openrewrite.javascript.style.PrettierStyle
- All Implemented Interfaces:
org.openrewrite.marker.Marker,org.openrewrite.rpc.RpcCodec<PrettierStyle>
public class PrettierStyle
extends org.openrewrite.style.NamedStyles
implements org.openrewrite.rpc.RpcCodec<PrettierStyle>
Marker containing the resolved Prettier configuration for a source file.
This marker is added by the parser when a Prettier config is detected in the project. The config is resolved per-file (with overrides applied), so files with different override rules will have different marker instances.
When this marker is present, AutoformatVisitor will use Prettier for formatting instead of the built-in formatting visitors.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionrpcReceive(PrettierStyle before, org.openrewrite.rpc.RpcReceiveQueue q) voidrpcSend(PrettierStyle after, org.openrewrite.rpc.RpcSendQueue q) withConfig(Map<String, Object> config) withIgnored(boolean ignored) withPrettierVersion(String prettierVersion) 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, withTagsMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.openrewrite.marker.Marker
print
-
Constructor Details
-
PrettierStyle
-
-
Method Details
-
withId
- Specified by:
withIdin interfaceorg.openrewrite.marker.Marker- Overrides:
withIdin classorg.openrewrite.style.NamedStyles
-
withConfig
-
withPrettierVersion
-
withIgnored
-
withStyles
- Overrides:
withStylesin classorg.openrewrite.style.NamedStyles
-
rpcSend
- Specified by:
rpcSendin interfaceorg.openrewrite.rpc.RpcCodec<PrettierStyle>
-
rpcReceive
- Specified by:
rpcReceivein interfaceorg.openrewrite.rpc.RpcCodec<PrettierStyle>
-