@kachkaev/prettier-config

2.0.0 • Public • Published

@kachkaev → prettier config

Works with Prettier v2, Compatible with Yarn PnP ans well as Classic Yarn / NPM. Uses default options, except for setting { trailingComma: "all" }. Includes:

Adding to project

  1. Install the package:

    npm install -D @kachkaev/prettier-config
    ## or
    yarn add -D @kachkaev/prettier-config
  2. Create .prettierrc.js with the following contents:

    module.exports = require("@kachkaev/prettier-config");
  3. Create .prettierignore. For example,

    #######################
    ## Specific to Prettier
    #######################
    
    ## Ignore all files (but still allow sub-folder scanning)
    *
    !*/
    
    ## Allow certain file types
    !*.cjs
    !*.css
    !*.graphql
    !*.js
    !*.json
    !*.jsx
    !*.md
    !*.mjs
    !*.ts
    !*.tsx
    !*.yml
    
    ########################
    ## Same as in .gitignore
    ########################
    
    # (paste lines from .gitignore here)
  4. Optionally, configure package scripts and a pre-commit hook to make sure that all project files are always formatted. See example in njtpackage.json.

Readme

Keywords

none

Package Sidebar

Install

npm i @kachkaev/prettier-config

Weekly Downloads

50

Version

2.0.0

License

MIT

Unpacked Size

2.44 kB

Total Files

3

Last publish

Collaborators

  • kachkaev