Skip to content

Commit

Permalink
Merge pull request #12 from weishaodaren/document/md
Browse files Browse the repository at this point in the history
update md
  • Loading branch information
weishaodaren authored Jan 15, 2023
2 parents 1528b5f + bd6a5ef commit fa3a66d
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 5 deletions.
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

0 comments on commit fa3a66d

Please sign in to comment.