0.0.1 • Published 2 years ago

@dunder-mifflin/eslint-config-prettier v0.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

@dunder-mifflin/eslint-config-prettier

A shareable ESLint, Prettier, and various others config.

Installation

npm install --save-dev @dunder-mifflin/eslint-config-prettier
  • package.json scripts should be updated to include the following:
{
  "scripts": {
    ...
    "lint": "eslint .",
    "lint:fix": "eslint . --fix",
    "prettier:fix": "prettier --write ."
  }
}
  • .prettierignore and .eslintignore should also be replaced

Usage

Add the following to your .eslintrc:

{
  "extends": ["@dunder-mifflin/eslint-config-prettier/.eslintrc"]
}

Add the following to your .prettierrc.js:

module.exports = {
  ...require('@dunder-mifflin/eslint-config-prettier').prettier,
};

Step by step

graph LR
A[Install npm package] --> B[Update .eslintrc]
A --> C[Update .prettierrc.js]
B --> D[npm run lint]
C --> E[npm run prettier:fix]