eslint-config-fe 2.1.0 → 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -23
- package/package.json +1 -1
- package/.github/workflows/npm-publish.yml +0 -24
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
## Installation
|
|
11
11
|
|
|
12
12
|
```bash
|
|
13
|
-
npm install --save-dev eslint
|
|
13
|
+
npm install --save-dev eslint eslint-config-fe
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
## Usage
|
|
@@ -27,30 +27,12 @@ npm install --save-dev eslint @babel/core @babel/eslint-parser @babel/eslint-plu
|
|
|
27
27
|
|
|
28
28
|
[learn more](https://github.com/fengxinming/eslint-config-fe/blob/main/index.js)
|
|
29
29
|
|
|
30
|
-
#### Base rules .eslintrc
|
|
31
|
-
|
|
32
|
-
```js
|
|
33
|
-
{
|
|
34
|
-
extends: ["fe/base"]
|
|
35
|
-
}
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
[learn more](https://github.com/fengxinming/eslint-config-fe/blob/main/base.js)
|
|
39
|
-
|
|
40
30
|
### React eslint config
|
|
41
31
|
|
|
42
32
|
```bash
|
|
43
33
|
npm install --save-dev @babel/preset-react eslint-plugin-react eslint-plugin-react-hooks
|
|
44
34
|
```
|
|
45
35
|
|
|
46
|
-
#### babel.config.js
|
|
47
|
-
|
|
48
|
-
```js
|
|
49
|
-
module.exports = {
|
|
50
|
-
presets: ['@babel/preset-react']
|
|
51
|
-
};
|
|
52
|
-
```
|
|
53
|
-
|
|
54
36
|
#### .eslintrc
|
|
55
37
|
|
|
56
38
|
```js
|
|
@@ -66,10 +48,6 @@ module.exports = {
|
|
|
66
48
|
|
|
67
49
|
### TS eslint config
|
|
68
50
|
|
|
69
|
-
```bash
|
|
70
|
-
npm install --save-dev @typescript-eslint/parser @typescript-eslint/eslint-plugin
|
|
71
|
-
```
|
|
72
|
-
|
|
73
51
|
#### .eslintrc
|
|
74
52
|
|
|
75
53
|
```js
|
package/package.json
CHANGED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
|
|
2
|
-
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
|
|
3
|
-
|
|
4
|
-
name: Node.js Package
|
|
5
|
-
|
|
6
|
-
on:
|
|
7
|
-
push:
|
|
8
|
-
branches: [main]
|
|
9
|
-
pull_request:
|
|
10
|
-
branches: [main]
|
|
11
|
-
|
|
12
|
-
jobs:
|
|
13
|
-
publish-npm:
|
|
14
|
-
runs-on: ubuntu-latest
|
|
15
|
-
steps:
|
|
16
|
-
- uses: actions/checkout@v3
|
|
17
|
-
- uses: actions/setup-node@v3
|
|
18
|
-
with:
|
|
19
|
-
node-version: 14
|
|
20
|
-
registry-url: https://registry.npmjs.org/
|
|
21
|
-
- run: npm i
|
|
22
|
-
- run: npm publish
|
|
23
|
-
env:
|
|
24
|
-
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
|