Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update md #12

Merged
merged 1 commit into from
Jan 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 45 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# eslint-config-polaris
## eslint-config-polaris

> 极星代码规范 ❄️

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

## Usage
### Installation

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

Which produces and runs a command like:

Expand All @@ -22,4 +24,43 @@ npm install --save-dev
prettier@latest
```

2. Add `"extends": "polaris"` to your .eslintrc
or use `npm-install-peers`

### Useage

In your .eslintrc

1. With Parser

```json
"parser": "@typescript-eslint/parser"
```

2. With Plugins

```json
"plugins": ["import", "@typescript-eslint", "react", "react-hooks"]
```

3. 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"
]
```
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-config-polaris",
"version": "1.1.3",
"version": "1.2.0",
"description": "This package provides Polaris's base JS .eslintrc as an extensible shared config.",
"main": "index.js",
"publishConfig": {
Expand Down