Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

eslint-config-unicorn

Hilzu2.7kMIT0.5.0

An eslint configuration

eslint, eslintconfig

readme

eslint-config-unicorn

Install

yarn add --dev eslint eslint-config-unicorn eslint-plugin-node eslint-plugin-react eslint-plugin-prettier

Use

Add to package.json:

{
  "scripts": {
    "lint": "eslint ."
  },
  "eslintConfig": {
    "extends": "unicorn"
  }
}

With this configuration you can run eslint using yarn lint and autofix code style using yarn lint --fix.

The included Prettier ESLint plugin reads it's configuration for your project from a configuration file. You should use that if you don't agree with the defaults.

You should also add all your build artifacts to the .eslintignore file in the project root.