https://github.com/weishaodaren/eslint-config-polaris
代码规范 ⭐️
https://github.com/weishaodaren/eslint-config-polaris
eslint-config eslint-react-config typescript
Last synced: about 2 months ago
JSON representation
代码规范 ⭐️
- Host: GitHub
- URL: https://github.com/weishaodaren/eslint-config-polaris
- Owner: weishaodaren
- License: mit
- Created: 2023-01-12T06:48:46.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-25T06:43:39.000Z (about 1 year ago)
- Last Synced: 2024-12-19T03:34:07.179Z (5 months ago)
- Topics: eslint-config, eslint-react-config, typescript
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/eslint-config-polaris
- Size: 239 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
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:
```sh
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
```json
"parser": "@typescript-eslint/parser"
```2. With Extends
```json
"extends": ["polaris"]
```### Configuration
Defaults
```json
"extends": [
"plugin:import/recommended",
"plugin:import/typescript",
"eslint:recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:react/jsx-runtime",
"plugin:prettier/recommended",
"prettier"
]
```