@meow-double/prettier
v1.0.1
Published
Prettier config for code
Readme
Prettier config🚩
This npm package include prettier config for your code.
📃Prettier config needed for formating your code
Install
Use this command to set the stylelint configure
npm i -D @meow-double/prettierℹ️INFO
Add the npm package as a dev dependency
How use
Create a file named .prettierrc in the root of the directory
Specify the extension of your file (js, cjs)
Import the prettier configuration and export it externally properly
Example of use
For .js files
import { prettier } from "@meow-double/prettier";
/** @type {import('prettier').Config} */
export default prettier;For .cjs files
const {prettier} = require("@meow-double/prettier");
/** @type {import('prettier').Config} */
module.exports = prettier;Script
You need to add script on your package.json
For JS
"format": "prettier --write \"*.{js,jsx}\"",
"format:fix": "prettier --write \"*.{js,jsx}\" --fix",For TS
"format": "prettier --write \"*.{ts,tsx}\"",
"format:fix": "prettier --write \"*.{ts,tsx}\" --fix",