@2030/eslint-config 0.0.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.
Files changed (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +58 -0
  3. package/index.js +6 -0
  4. package/package.json +39 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 [fullname]
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,58 @@
1
+ # :sparkles:@2030/eslint-config
2
+
3
+ ## :fire:风格说明
4
+
5
+ - 强制使用单引号,分号
6
+ - 自动修复eslint问题并格式化
7
+ - 支持TypeScript, Vue, React
8
+ - 类型检查同时支持json, yaml, markdown
9
+ - import导入排序
10
+ - 单行配置,迅速接入
11
+
12
+ ## :bulb:使用说明
13
+
14
+ ### 1. 安装
15
+
16
+ ```bash
17
+ pnpm add -D @2030/eslint-config
18
+ ```
19
+
20
+ ### 2. 配置 `.eslintrc`
21
+
22
+ ```json
23
+ {
24
+ "extends": "@2030"
25
+ }
26
+ ```
27
+
28
+ > 无需配置 `.eslintignore` ,除非内置的忽略文件配置不满足
29
+
30
+ ### 3. 添加脚本至 `package.json`
31
+
32
+ 代码示例:
33
+
34
+ ```json
35
+ {
36
+ "scripts": {
37
+ "lint": "eslint .",
38
+ "lint:fix": "eslint . --fix"
39
+ }
40
+ }
41
+ ```
42
+
43
+ ### 4. VS Code 编辑器自动修复配置
44
+
45
+ 创建 `.vscode/settings.json`
46
+
47
+ ```json
48
+ {
49
+ "prettier.enable": false,
50
+ "editor.codeActionsOnSave": {
51
+ "source.fixAll.eslint": true
52
+ }
53
+ }
54
+ ```
55
+
56
+ ## :key:License
57
+
58
+ [MIT](./LICENSE) License © 2022 ZiJun
package/index.js ADDED
@@ -0,0 +1,6 @@
1
+ module.exports = {
2
+ extends: [
3
+ '@2030/eslint-config-react',
4
+ '@2030/eslint-config-vue',
5
+ ],
6
+ };
package/package.json ADDED
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "@2030/eslint-config",
3
+ "version": "0.0.2",
4
+ "description": "ZiJun's ESlint config for work projects",
5
+ "keywords": [
6
+ "eslint-config"
7
+ ],
8
+ "homepage": "https://github.com/Jun2030/eslint-config",
9
+ "license": "MIT",
10
+ "author": "Zi Jun <zijun2030@163.com>",
11
+ "main": "index.js",
12
+ "files": [
13
+ "index.js"
14
+ ],
15
+ "dependencies": {
16
+ "@2030/eslint-config-react": "0.0.2",
17
+ "@2030/eslint-config-vue": "0.0.2",
18
+ "@typescript-eslint/eslint-plugin": "^5.36.1",
19
+ "@typescript-eslint/parser": "^5.36.1",
20
+ "eslint": "^8.23.0",
21
+ "eslint-plugin-eslint-comments": "^3.2.0",
22
+ "eslint-plugin-html": "^7.1.0",
23
+ "eslint-plugin-import": "^2.26.0",
24
+ "eslint-plugin-jsonc": "^2.4.0",
25
+ "eslint-plugin-n": "^15.2.5",
26
+ "eslint-plugin-promise": "^6.0.1",
27
+ "eslint-plugin-unicorn": "^43.0.2",
28
+ "eslint-plugin-vue": "^9.4.0",
29
+ "eslint-plugin-yml": "^1.1.0",
30
+ "jsonc-eslint-parser": "^2.1.0",
31
+ "yaml-eslint-parser": "^1.1.0"
32
+ },
33
+ "devDependencies": {
34
+ "typescript": "^4.8.2"
35
+ },
36
+ "peerDependencies": {
37
+ "eslint": ">=8.23.0"
38
+ }
39
+ }