2.0.1 • Published 5 months ago

@amedia/prettier-config v2.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
5 months ago

@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",
2.0.1

5 months ago

2.0.0

11 months ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.2-next.3

2 years ago

1.0.2-next.1

2 years ago

1.0.2-next.2

2 years ago

1.0.2-next.0

2 years ago

1.0.1

3 years ago

1.0.0

3 years ago