@smart-gate/prettier-config
v1.0.4
Published
Configure Prettier for Smart-Gate Co. projects to ensure consistent formatting across all styles.
Downloads
44
Maintainers
Readme
prettier-config
prettier-config
is some Prettier rules designed to enforce consistent formatting across all Smart-Gate Co. projects. It provides a standard set of formatting rules to ensure uniform code style and improve code readability.
[!WARNING] In order to avoid installation conflicts just make sure you've deleted/ don't have the following packages in your
package.json
.
- prettier
- @vue/eslint-config-prettier
Installation
To use prettier-config
in your project, follow these steps:
Install Prettier and the Config Package:
You can install Prettier along with
prettier-config
using npm:npm install --save-dev prettier @smart-gate/prettier-config
Add Prettier Configuration File:
Add This line in your
package.json
file.{ "prettier": "@smart-gate/prettier-config" }
(Optional) Prettier With Eslint:
Prettier rules conlficts with eslints, to keep your mental health well you may want update your
.eslintrc.cjs
file: (I assume you've just chosen our smartgate eslint configs)extends: ["@smart-gate/eslint-config-smartgate", '@vue/eslint-config-prettier/skip-formatting']
Add Prettier Script to
package.json
:To make it easy to format your code, you can add a script to your
package.json
:{ "scripts": { "format": "prettier --write ." } }
You can then run
npm run format
to format your codebase.
Usage
Once you have followed those steps, you can start formating your code using our prettier rules by running
npm run format
License
This project is licensed under the MIT License. See the LICENSE file for details.