@alloy-js/prettier-plugin-alloy
v0.1.0
Published
Prettier plugin for Alloy JSX/TSX files that disable formatting for JSX elements
Downloads
61
Readme
Prettier plugin for Alloy JSX/TSX files
Prettier plugin that disable the automatic formatting of JSX elements. This still allows the rest to be formatted but allows keeping whitespace that are important for Alloy.
Usage
npm install --save-dev @alloy-js/prettier-plugin-alloy
Then, add the following to your .prettierrc.yaml
file:
plugins:
- "@alloy-js/prettier-plugin-alloy"
Override .jsx
or .tsx
formatting
If you want to override the formatting for .jsx
or .tsx
files, you can use the overrides
option in your .prettierrc.yaml
file:
overrides:
- files: "*.tsx"
options:
parser: alloy-ts
- files: "*.jsx"
options:
parser: alloy-js
Override only .alloy.tsx
or .alloy.jsx
files:
overrides:
- files: "*.alloy.tsx"
options:
parser: alloy-ts
- files: "*.alloy.jsx"
options:
parser: alloy-js