eslint-config-polaris

6.13.0 • Public • Published

极星代码规范 eslint-config-polaris

This package provides Polaris's base JS .eslintrc as an extensible shared config.

Installation

Install the correct versions of each package, which are listed by the command:

Which produces and runs a command like:

npm install --save-dev
    @typescript-eslint/eslint-plugin@latest
    @typescript-eslint/parser@latest
    eslint@latest
    eslint-config-prettier@latest
    eslint-plugin-import@latest
    eslint-plugin-prettier@latest
    eslint-plugin-react@latest
    eslint-plugin-react-hooks@latest
    typescript@latest
    prettier@latest

or use npm-install-peers

Useage

In your .eslintrc

  1. With Parser
"parser": "@typescript-eslint/parser"
  1. With Extends
 "extends": ["polaris"]

Configuration

Defaults

"extends": [
  "plugin:import/recommended",
  "plugin:import/typescript",
  "eslint:recommended",
  "plugin:react/recommended",
  "plugin:react-hooks/recommended",
  "plugin:react/jsx-runtime",
  "plugin:prettier/recommended",
  "prettier"
]

Package Sidebar

Install

npm i eslint-config-polaris

Weekly Downloads

1

Version

6.13.0

License

MIT

Unpacked Size

20.8 kB

Total Files

12

Last publish

Collaborators

  • lupujiu
  • weishaodaren