@cuiqg/eslint-config 2.3.0 → 2.5.0
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 +45 -3
- package/dist/index.js +2 -1
- package/package.json +2 -8
package/README.md
CHANGED
|
@@ -1,3 +1,45 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
# @cuiqg/eslint-config [](https://npmmirror.com/package/@cuiqg/eslint-config)
|
|
2
|
+
|
|
3
|
+
## 使用
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm i -D eslint @cuiqg/eslint-config
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
修改 `package.json` 文件
|
|
10
|
+
|
|
11
|
+
```diff
|
|
12
|
+
{
|
|
13
|
+
+ "type": "module",
|
|
14
|
+
"scripts": {
|
|
15
|
+
+ "lint": "eslint .",
|
|
16
|
+
+ "lint:fix": "eslint . --fix"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
创建 `eslint.config.js` 文件
|
|
22
|
+
|
|
23
|
+
```js
|
|
24
|
+
import cuiqg from '@cuiqg/eslint-config'
|
|
25
|
+
|
|
26
|
+
export default cuiqg()
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## 插件配置
|
|
30
|
+
|
|
31
|
+
安装 [VS Code ESLint extension](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)
|
|
32
|
+
|
|
33
|
+
创建配置文件 `.vscode/settings.json`
|
|
34
|
+
|
|
35
|
+
```json
|
|
36
|
+
{
|
|
37
|
+
"prettier.enable": false,
|
|
38
|
+
"editor.formatOnSave": false,
|
|
39
|
+
"eslint.useFlatConfig": true,
|
|
40
|
+
"editor.codeActionsOnSave": {
|
|
41
|
+
"source.fixAll.eslint": "explicit",
|
|
42
|
+
"source.organizeImports": "never"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
```
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cuiqg/eslint-config",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0",
|
|
4
4
|
"description": "Eslint config for @cuiqg",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint-config"
|
|
7
7
|
],
|
|
8
8
|
"homepage": "https://eslint.tsuiqg.me",
|
|
9
|
-
"repository":
|
|
10
|
-
"type": "git",
|
|
11
|
-
"url": "git+https://github.com/cuiqg/eslint-config.git"
|
|
12
|
-
},
|
|
9
|
+
"repository": "github:cuiqg/eslint-config",
|
|
13
10
|
"publishConfig": {
|
|
14
11
|
"access": "public",
|
|
15
12
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -34,9 +31,6 @@
|
|
|
34
31
|
"peerDependencies": {
|
|
35
32
|
"eslint": ">=9.28.0"
|
|
36
33
|
},
|
|
37
|
-
"engines": {
|
|
38
|
-
"node": ">=22.11.0"
|
|
39
|
-
},
|
|
40
34
|
"dependencies": {
|
|
41
35
|
"@eslint/js": "^9.32.0",
|
|
42
36
|
"@next/eslint-plugin-next": "^15.4.6",
|