Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@amedia/prettier-config

amediautvikling5.8kISC2.0.1

Prettier config for Amedia

readme

@amedia/prettier-config

The Prettier configuration for JavaScript / YAML / JSON / Markdown.

This probes for features and loads plugins when necessary.

Usage

Note that from kragl v4 onwards, only esm config files and syntax are supported.

npm install --save-dev @amedia/prettier-config prettier

After installing the deps, update your Prettier config file, e.g. prettier.config.js:

export { default } from '@amedia/prettier-config';

Gotchas

VS Code prettier plugin

The prettier pluggin for vscode esbenp.prettier-vscode, uses its included version of prettier as default. If this version uses CommonJS (require syntax) instead of ESModule (export syntax), prettier will fail with an error like:

require() of ES Module [...] not supported

To fix this issue, set the path to the prettier instance for VS code, to point to the prettier package in the current VS code repo:

"prettier.prettierPath": "./node_modules/prettier",