@jiakun-zhao/eslint-config 1.1.12 → 1.2.1
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 +8 -1
- package/dist/index.cjs +31 -137
- package/package.json +13 -20
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
## @jiakun-zhao/eslint-config
|
|
2
2
|
|
|
3
|
+
> Extends [@antfu/eslint-config](https://github.com/antfu/eslint-config).
|
|
4
|
+
|
|
3
5
|
<br />
|
|
4
6
|
|
|
5
7
|

|
|
@@ -36,7 +38,12 @@ ni -D @jiakun-zhao/eslint-config
|
|
|
36
38
|
"javascriptreact",
|
|
37
39
|
"typescript",
|
|
38
40
|
"typescriptreact",
|
|
39
|
-
"vue"
|
|
41
|
+
"vue",
|
|
42
|
+
"html",
|
|
43
|
+
"markdown",
|
|
44
|
+
"json",
|
|
45
|
+
"jsonc",
|
|
46
|
+
"yaml"
|
|
40
47
|
]
|
|
41
48
|
}
|
|
42
49
|
```
|
package/dist/index.cjs
CHANGED
|
@@ -1,146 +1,40 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const ignorePatterns = [
|
|
4
|
-
"dist",
|
|
5
|
-
"output",
|
|
6
|
-
"out",
|
|
7
|
-
"public",
|
|
8
|
-
"temp",
|
|
9
|
-
"coverage",
|
|
10
|
-
"LICENSE*",
|
|
11
|
-
"Dockerfile",
|
|
12
|
-
"CHANGELOG.md",
|
|
13
|
-
"package-lock.json",
|
|
14
|
-
"pnpm-lock.yaml",
|
|
15
|
-
"yarn.lock",
|
|
16
|
-
"*.min.*",
|
|
17
|
-
"*.d.ts",
|
|
18
|
-
"*.css",
|
|
19
|
-
"*.png",
|
|
20
|
-
"*.ico",
|
|
21
|
-
"*.toml",
|
|
22
|
-
"*.patch",
|
|
23
|
-
"*.txt",
|
|
24
|
-
"*.crt",
|
|
25
|
-
"*.key",
|
|
26
|
-
"!.github",
|
|
27
|
-
"!.vitepress",
|
|
28
|
-
"!.vscode"
|
|
29
|
-
];
|
|
30
|
-
|
|
31
3
|
const index = {
|
|
32
|
-
plugins: [
|
|
33
|
-
"unicorn",
|
|
34
|
-
"unused-imports"
|
|
35
|
-
],
|
|
36
4
|
extends: [
|
|
37
|
-
"
|
|
38
|
-
"plugin:
|
|
39
|
-
"plugin:import/typescript",
|
|
40
|
-
"plugin:@typescript-eslint/recommended"
|
|
41
|
-
],
|
|
42
|
-
settings: {
|
|
43
|
-
"import/resolver": {
|
|
44
|
-
node: {
|
|
45
|
-
extensions: [".js", ".jsx", ".mjs", ".ts", ".tsx", ".d.ts"]
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
ignorePatterns,
|
|
50
|
-
overrides: [
|
|
51
|
-
{
|
|
52
|
-
files: ["*.vue"],
|
|
53
|
-
extends: ["plugin:vue/vue3-recommended"],
|
|
54
|
-
parser: "vue-eslint-parser",
|
|
55
|
-
parserOptions: {
|
|
56
|
-
parser: "@typescript-eslint/parser"
|
|
57
|
-
},
|
|
58
|
-
rules: {
|
|
59
|
-
"vue/component-tags-order": ["error", { order: ["script", "template", "style"] }],
|
|
60
|
-
"vue/padding-line-between-blocks": ["error", "always"],
|
|
61
|
-
"vue/singleline-html-element-content-newline": "off",
|
|
62
|
-
"vue/max-attributes-per-line": "off",
|
|
63
|
-
"vue/html-self-closing": "off",
|
|
64
|
-
"vue/multi-word-component-names": "off",
|
|
65
|
-
"vue/key-spacing": ["error", { beforeColon: false, afterColon: true }],
|
|
66
|
-
"vue/object-curly-spacing": ["error", "always"]
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
files: ["*.jsx", "*.tsx"],
|
|
71
|
-
extends: [
|
|
72
|
-
"plugin:react/all"
|
|
73
|
-
],
|
|
74
|
-
parserOptions: {
|
|
75
|
-
ecmaFeatures: {
|
|
76
|
-
jsx: true
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
rules: {
|
|
80
|
-
"react/react-in-jsx-scope": "off",
|
|
81
|
-
"react/no-unknown-property": "off",
|
|
82
|
-
"react/self-closing-comp": "off",
|
|
83
|
-
"react/destructuring-assignment": "off",
|
|
84
|
-
"react/no-multi-comp": "off",
|
|
85
|
-
"react/function-component-definition": "off",
|
|
86
|
-
"react/display-name": "off",
|
|
87
|
-
"react/button-has-type": "off",
|
|
88
|
-
"react/no-children-prop": "off",
|
|
89
|
-
"react/jsx-indent": ["error", 2],
|
|
90
|
-
"react/jsx-indent-props": ["error", 2],
|
|
91
|
-
"react/jsx-max-depth": "off",
|
|
92
|
-
"react/jsx-filename-extension": "off",
|
|
93
|
-
"react/jsx-no-literals": "off",
|
|
94
|
-
"react/jsx-max-props-per-line": "off",
|
|
95
|
-
// 'react/jsx-space-before-closing': ['error', 'always'],
|
|
96
|
-
"react/jsx-tag-spacing": ["error", {
|
|
97
|
-
closingSlash: "never",
|
|
98
|
-
beforeSelfClosing: "always",
|
|
99
|
-
afterOpening: "never",
|
|
100
|
-
beforeClosing: "never"
|
|
101
|
-
}],
|
|
102
|
-
"react/jsx-newline": "off",
|
|
103
|
-
"react/jsx-one-expression-per-line": "off",
|
|
104
|
-
"react/jsx-no-bind": "off",
|
|
105
|
-
"react/jsx-curly-spacing": ["error", { when: "never", children: { when: "never" } }]
|
|
106
|
-
}
|
|
107
|
-
}
|
|
5
|
+
"@antfu",
|
|
6
|
+
"plugin:react/recommended"
|
|
108
7
|
],
|
|
109
8
|
rules: {
|
|
110
|
-
"
|
|
111
|
-
"
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
"
|
|
115
|
-
|
|
116
|
-
"
|
|
117
|
-
|
|
118
|
-
"
|
|
119
|
-
"
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
"key
|
|
128
|
-
"
|
|
129
|
-
"
|
|
130
|
-
"
|
|
131
|
-
"
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
"
|
|
137
|
-
|
|
138
|
-
"
|
|
139
|
-
// comma
|
|
140
|
-
"comma-dangle": ["error", "always-multiline"],
|
|
141
|
-
"@typescript-eslint/comma-dangle": ["error", "always-multiline"],
|
|
142
|
-
// unicorn
|
|
143
|
-
"unicorn/prefer-node-protocol": "error"
|
|
9
|
+
"no-console": "warn",
|
|
10
|
+
"brace-style": ["warn", "1tbs"],
|
|
11
|
+
"@typescript-eslint/brace-style": ["warn", "1tbs"],
|
|
12
|
+
// vue
|
|
13
|
+
"vue/singleline-html-element-content-newline": "off",
|
|
14
|
+
"vue/html-self-closing": "off",
|
|
15
|
+
"vue/static-class-names-order": "warn",
|
|
16
|
+
// react & jsx
|
|
17
|
+
"react/react-in-jsx-scope": "off",
|
|
18
|
+
"react/no-unknown-property": "off",
|
|
19
|
+
"react/self-closing-comp": "off",
|
|
20
|
+
"react/destructuring-assignment": "off",
|
|
21
|
+
"react/no-multi-comp": "off",
|
|
22
|
+
"react/function-component-definition": "off",
|
|
23
|
+
"react/display-name": "off",
|
|
24
|
+
"react/button-has-type": "off",
|
|
25
|
+
"react/no-children-prop": "off",
|
|
26
|
+
"react/jsx-key": "off",
|
|
27
|
+
"react/jsx-indent": ["error", 2],
|
|
28
|
+
"react/jsx-indent-props": ["error", 2],
|
|
29
|
+
"react/jsx-max-depth": "off",
|
|
30
|
+
"react/jsx-filename-extension": "off",
|
|
31
|
+
"react/jsx-no-literals": "off",
|
|
32
|
+
"react/jsx-max-props-per-line": "off",
|
|
33
|
+
"react/jsx-tag-spacing": ["error", { closingSlash: "never", beforeSelfClosing: "always", afterOpening: "never", beforeClosing: "never" }],
|
|
34
|
+
"react/jsx-newline": "off",
|
|
35
|
+
"react/jsx-one-expression-per-line": "off",
|
|
36
|
+
"react/jsx-no-bind": "off",
|
|
37
|
+
"react/jsx-curly-spacing": ["error", { when: "never", children: { when: "never" } }]
|
|
144
38
|
}
|
|
145
39
|
};
|
|
146
40
|
|
package/package.json
CHANGED
|
@@ -1,44 +1,37 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jiakun-zhao/eslint-config",
|
|
3
|
-
"version": "1.1
|
|
3
|
+
"version": "1.2.1",
|
|
4
|
+
"packageManager": "pnpm@8.6.10",
|
|
4
5
|
"description": "Jiakun's ESLint config.",
|
|
6
|
+
"author": "Jiakun Zhao <hi@zhaojiakun.com>",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"homepage": "https://github.com/jiakun-zhao/eslint-config",
|
|
5
9
|
"keywords": [
|
|
6
10
|
"eslint-config"
|
|
7
11
|
],
|
|
8
|
-
"homepage": "https://github.com/jiakun-zhao/eslint-config",
|
|
9
|
-
"license": "MIT",
|
|
10
|
-
"author": "Jiakun Zhao <hi@zhaojiakun.com>",
|
|
11
12
|
"main": "dist/index.cjs",
|
|
12
13
|
"files": [
|
|
13
14
|
"dist/index.cjs",
|
|
14
15
|
"package.json"
|
|
15
16
|
],
|
|
16
|
-
"
|
|
17
|
-
"
|
|
17
|
+
"peerDependencies": {
|
|
18
|
+
"eslint": ">=7.4.0"
|
|
18
19
|
},
|
|
19
20
|
"dependencies": {
|
|
20
|
-
"@
|
|
21
|
-
"eslint-
|
|
22
|
-
"eslint-plugin-import": "^2.27.5",
|
|
23
|
-
"eslint-plugin-n": "^16.0.1",
|
|
24
|
-
"eslint-plugin-promise": "^6.1.1",
|
|
25
|
-
"eslint-plugin-react": "^7.32.2",
|
|
26
|
-
"eslint-plugin-unicorn": "^48.0.0",
|
|
27
|
-
"eslint-plugin-unused-imports": "^3.0.0",
|
|
28
|
-
"eslint-plugin-vue": "^9.15.1"
|
|
21
|
+
"@antfu/eslint-config": "^0.39.8",
|
|
22
|
+
"eslint-plugin-react": "^7.33.0"
|
|
29
23
|
},
|
|
30
24
|
"devDependencies": {
|
|
31
|
-
"@types/eslint": "^8.44.
|
|
32
|
-
"@types/node": "^20.4.
|
|
25
|
+
"@types/eslint": "^8.44.1",
|
|
26
|
+
"@types/node": "^20.4.5",
|
|
33
27
|
"bumpp": "^9.1.1",
|
|
34
28
|
"eslint": "^8.45.0",
|
|
35
29
|
"typescript": "^5.1.6",
|
|
36
30
|
"unbuild": "^1.2.1"
|
|
37
31
|
},
|
|
38
|
-
"
|
|
39
|
-
"
|
|
32
|
+
"eslintConfig": {
|
|
33
|
+
"extends": "./dist/index.cjs"
|
|
40
34
|
},
|
|
41
|
-
"packageManager": "pnpm@8.6.9",
|
|
42
35
|
"scripts": {
|
|
43
36
|
"build": "unbuild",
|
|
44
37
|
"release": "bumpp && pnpm publish && npx cnpm sync @jiakun-zhao/eslint-config",
|