@lego/eslint-config-prettier
LEGO shareable eslint config for js projects
Last updated 19 days ago by vincentbriglia .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @lego/eslint-config-prettier 
SYNC missed versions from official npm registry.

@lego/eslint-config-prettier

Installation

Install this config package:

$ npm i -D @lego/eslint-config-prettier

Usage

Extend your eslint.json, and make sure @lego/eslint-config-prettier has been added, but make sure it's always at the end.

{
  "extends": ["@lego/eslint-config", "@lego/eslint-config-prettier"]
}

with TypeScript:

{
  "extends": ["@lego/eslint-config-typescript", "@lego/eslint-config-prettier"]
}

with TypeScript & React:

{
  "extends": [
    "@lego/eslint-config-typescript",
    "@lego/eslint-config-react",
    "@lego/eslint-config-prettier"
  ]
}

Overriding Rules

With the above eslint.json configuration example, you can still use or override already defined rules as such:

{
  "extends": [
    "@lego/eslint-config-typescript",
    "@lego/eslint-config-react",
    "@lego/eslint-config-prettier"
  ],
  "rules": {
    // eslint-config rules
    "camelcase": "warn",

    // @typescript-eslint/eslint-plugin rules
    "@typescript-eslint/no-useless-constructor": "error",

    // eslint-plugin-react rules
    "react/jsx-child-element-spacing": "error",

    // eslint-plugin-react-hooks rules
    "react-hooks/exhaustive-deps": "warn",

    // eslint-plugin-prettier rules
    "prettier/prettier": [
      "error",
      {
        "singleQuote": false
      }
    ]
  }
}

It's recommended to inspect the defined rule's configurations where the reasoning for the configuration lives. If a configuration could benefit more than just the project you're working on, feel free to create a pull request.

Current Tags

  • 2.0.0                                ...           latest (19 days ago)

19 Versions

  • 2.0.0                                ...           19 days ago
  • 1.8.1                                ...           19 days ago
  • 1.8.1-alpha.0                                ...           23 days ago
  • 1.8.0                                ...           3 months ago
  • 1.7.1                                ...           4 months ago
  • 1.7.0                                ...           4 months ago
  • 1.6.1                                ...           5 months ago
  • 1.6.0                                ...           5 months ago
  • 1.5.1                                ...           6 months ago
  • 1.5.0                                ...           6 months ago
  • 1.4.0                                ...           7 months ago
  • 1.2.7                                ...           7 months ago
  • 1.2.6                                ...           7 months ago
  • 1.2.5                                ...           7 months ago
  • 1.2.4                                ...           7 months ago
  • 1.2.3                                ...           7 months ago
  • 1.2.2                                ...           7 months ago
  • 1.2.1                                ...           7 months ago
  • 1.2.0                                ...           7 months ago
Downloads
Today 0
This Week 19
This Month 56
Last Day 0
Last Week 0
Last Month 0
Dependencies (5)
Dev Dependencies (5)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |