@invisionag/prettier-config-ivx

This is our general config for prettier. This should be used whenever we use prettier.

Stats

StarsIssuesVersionUpdatedCreatedSize
@invisionag/prettier-config-ivx
3.0.0a month ago3 years agoMinified + gzip package size for @invisionag/prettier-config-ivx in KB

Readme

@invisionag/prettier-config-ivx

This is our general config for prettier. This should be used whenever we use prettier.

Installation

JavaScript/TypeScript

Instead of using prettier to format JavaScript and TypeScript files directly, you should use eslint instead.

For more information on how to install and configure eslint see the eslint-config-ivx

Ruby

Install prettier, the prettier plugin for Ruby and this configuration.

npm i -D prettier @prettier/plugin-ruby @invisionag/prettier-config-ivx

Then extend the prettier configuration by adding the following to your package.json.

{
  "prettier": "@invisionag/prettier-config-ivx"
}

Your package.json should look something like this:

{
  "private": true,
  "scripts": {
    "prettify": "prettier \"**/*.{ru,rb,yaml,json}\"",
    "lint": "yarn prettify --check",
    "format": "yarn prettify --write"
  },
  "devDependencies": {
    "@invisionag/prettier-config-ivx": "*",
    "@prettier/plugin-ruby": "*",
    "prettier": "*"
  },
  "prettier": "@invisionag/prettier-config-ivx"
}

Parallel prettier

In larger ruby repositories prettier can be slow and it is recommended to use the parallel prettier package to speed things up.

npm i -D @mixer/parallel-prettier

All you need to do is replace the call to prettier with pprettier.

 {
   "private": true,
   "scripts": {
-    "prettify": "prettier \"**/*.{ru,rb,yaml,json}\"",
+    "prettify": "pprettier \"**/*.{ru,rb,yaml,json}\"",
     "lint": "yarn prettify --check",
     "format": "yarn prettify --write"
   },

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.