1.3.2 • Published 2 years ago
@851-labs/prettier-config v1.3.2
@851-labs/prettier-config
Installation
!NOTE
Prettier is a peer-dependency of this package and should also be installed.
pnpm i -D prettier @851-labs/prettier-configUsage
To use the shared Prettier config, set the following in package.json.
{
"prettier": "@851-labs/prettier-config"
}If you need to extend/override the shared config, create a prettier.config.mjs file and destructure the shared config.
!NOTE
Prettier does not offer a native way to extend the configuration. See sharing configuration docs and #7763 issue for more info.
import defaultConfig from "@851-labs/prettier-config";
/** @type {import("prettier").Config} */
const config = {
...defaultConfig,
tailwindConfig: "./tailwind.config.ts",
};
export default config;Scripts
"scripts": {
"format": "prettier --check . --ignore-path .gitignore",
"format:fix": "pnpm format --write"
}License
MPL-2.0