0.2.1 • Published 1 month ago

@cyrilolanolan/prettier-config v0.2.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

@cyrilolanolan/prettier-config

Prettier configuration for formatting code

This combines defaults with personal style choices to write clean, readable, and consistent codes across all projects.

Installation

  1. Install the package with its peer dependencies:

    npm i -D @cyrilolanolan/prettier-config prettier
  2. Extend this configuration by using any of these methods:

    In your Prettier Configuration (preferred):

    // .prettierrc.js
    const sharedConfig = require('@cyrilolanolan/prettier-config');
    
    module.exports = {
      ...sharedConfig,
      // extend or overwrite options here
    };

    or if you're using a JSON config:

    "@cyrilolanolan/prettier-config"

    or add prettier key inside your package.json:

    {
      "prettier": "@cyrilolanolan/prettier-config"
    }

Configurations

This package extends the handful default Prettier Options and the following API overrides:

rulevalue
singleQuotetrue
tabWidth (for *.py)4
trailingComma"es5"

⚠️ Gotcha!

Extending via package.json or any JSON config

These methods do not offer a way to extend the configuration to overwrite some properties from the shared configuration. To do that, you have to refer to the first installation method (using .prettierrc.js).

0.2.1

1 month ago

0.2.0

2 months ago

0.1.3

2 months ago

0.1.2

3 months ago

0.1.1

4 months ago

0.1.0

10 months ago