1.0.4 • Published 9 months ago

@smart-gate/prettier-config v1.0.4

Weekly downloads
-
License
MIT
Repository
-
Last release
9 months ago

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.

  1. prettier
  2. @vue/eslint-config-prettier

Installation

To use prettier-config in your project, follow these steps:

  1. 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
  2. Add Prettier Configuration File:

    Add This line in your package.json file.

    {
      "prettier": "@smart-gate/prettier-config"
    }
  3. (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']
  4. 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.

1.0.4

9 months ago

1.0.3

11 months ago

1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago