eslint-config-polaris
v6.13.0
Published
代码规范 ⭐️
Downloads
20
Readme
极星代码规范 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
- With Parser
"parser": "@typescript-eslint/parser"
- 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"
]