Socket
Socket
Sign inDemoInstall

prettier-plugin-astro

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prettier-plugin-astro - npm Package Compare versions

Comparing version 0.13.0 to 0.14.0

9

dist/index.js

@@ -16,2 +16,8 @@ import { parse } from '@astrojs/compiler/sync';

},
astroSkipFrontmatter: {
category: 'Astro',
type: 'boolean',
default: false,
description: 'Skips the formatting of the frontmatter.',
},
};

@@ -614,2 +620,5 @@

if (node.type === 'frontmatter') {
if (options.astroSkipFrontmatter) {
return [group(['---', node.value, '---', hardline]), hardline];
}
const frontmatterContent = await wrapParserTryCatch(textToDoc, node.value, {

@@ -616,0 +625,0 @@ ...options,

2

package.json
{
"name": "prettier-plugin-astro",
"version": "0.13.0",
"version": "0.14.0",
"type": "module",

@@ -5,0 +5,0 @@ "description": "A Prettier Plugin for formatting Astro files",

@@ -82,2 +82,10 @@ # [Prettier](https://prettier.io/) Plugin for [Astro](https://astro.build/)

### Astro Skip Frontmatter
If you are using another tool to format your JavaScript code, like Biome for example, it is possible to skip formatting the frontmatter.
| Default | CLI Override | API Override |
| ------- | -------------------------------- | ----------------------------- |
| `false` | `--astro-skip-frontmatter <bool>` | `astroSkipFrontmatter: <bool>` |
### Example `.prettierrc.cjs`

@@ -88,2 +96,3 @@

astroAllowShorthand: false;
astroSkipFrontmatter: false;
}

@@ -90,0 +99,0 @@ ```

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc