Skip to content

Commit

Permalink
chore: release 0.4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Codennnn committed Sep 4, 2021
1 parent e5e4b20 commit a2d06d5
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## [0.4.3] - 2021-09-04

- 添加对 `plugin:import/typescript` 的判断
- 更新 `README.md`
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,31 @@
```bash
yarn add -D prefer-code-style
```

## 用法

添加 `.eslintrc.js`,配置如下:

```js
module.exports = {
extends: [require.resolve('prefer-code-style/lib/eslint')],
}
```

添加 `.stylelint.js`,配置如下:

```js
module.exports = {
extends: [require.resolve('prefer-code-style/lib/stylelint')],
}
```

添加 `.prettierrc.js`,配置如下:

```js
const { prettier } = require('prefer-code-style')

module.exports = {
...prettier,
}
```
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "prefer-code-style",
"version": "0.4.2",
"version": "0.4.3",
"description": "A collection of configuration files containing prettier, eslint, stylelint",
"keywords": [
"code style",
Expand Down
5 changes: 2 additions & 3 deletions src/eslint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ module.exports = {
[
'eslint:recommended',
IS_TS_PROJECT ? 'plugin:@typescript-eslint/recommended' : null,
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript',
'plugin:import/recommended',
IS_TS_PROJECT ? 'plugin:import/typescript' : null,
'plugin:jsx-a11y/recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
Expand Down

0 comments on commit a2d06d5

Please sign in to comment.