1.4.2 • Published 3 years ago

@posop/prettier-config v1.4.2

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

@posop/prettier-config

My personal Prettier configurations.

Install

npm install @posop/prettier-config -D
yarn add @posop/prettier-config -D
pnpm add @posop/prettier-config -D

Usage

Overwrite some properties from the shared configuration

// .prettierrc.js
module.exports = {
  ...require('@posop/prettier-config'),
}

Copy the ignore file to your project folder

If you want to extend the ignore file, run the following command in the root of your project folder:

# unix
cp node_modules/@posop/prettier-config/.prettierignore .prettierignore
# windows
copy node_modules/@posop/prettier-config/.prettierignore .prettierignore

It will copy the .prettierignore from @posop/prettier-config to your project root folder.

Scripts

Some commonly used scripts in package.json.

{
  "scripts": {
    "format": "prettier --write --ignore-unknown **",
  }
}

Rules

Rules used

  "tabWidth": 2,
  "printWidth": 100,
  "semi": false,
  "useTabs": false,
  "singleQuote": true,
  "bracketSpacing": true,
  "bracketSameLine": false,
  "singleAttributePerLine": true,
  "arrowParens": "always",
  "trailingComma": "none",
  "quoteProps": "as-needed",
  "endOfLine": "lf",

Related

1.4.2

3 years ago

1.3.2

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.2.0

3 years ago

1.0.0

3 years ago