1.0.0 • Published 3 years ago

@xeho91/prettier-config v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

@xeho91/prettier-config

npm version shield npm package shield

Dependencies shield

Extendable Prettier configuration, part of the xeho91/configurations project.


⚙️ Plugins loading conditions

This configuration load plugins and their options conditionally. If the project has:

  • svelte as a dependency, then it will load svelte plugin

🏁 Usage

  1. Install it with the Node.JS package manager of your choice.\ Example:

    pnpm install --save-dev eslint @xeho91/prettier-config
  2. Create an Prettier configuration file - e.g. .prettierrc.js, and extend this package configuration.\ Example:

    const config = {
    			...require("@xeho91/eslint-config"),
    
    			// tweak some options here...
    };
    
    module.exports = config;
  3. Add this example script to your package.json file and in scripts the options (key):

    {
      "scripts": {
        "format": "prettier --write \"./source/**/*\"",
      }
    }
  4. Run this script for manual formatting:

    pnpm format

⚖️ License

License shield

The code is licensed under the MIT license.