@jiakun-zhao/eslint-config 1.3.1 → 2.0.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 +1 -67
- package/dist/index.cjs +23 -42
- package/package.json +7 -9
package/README.md
CHANGED
|
@@ -1,71 +1,5 @@
|
|
|
1
1
|
## @jiakun-zhao/eslint-config
|
|
2
|
-
|
|
3
|
-
> Extends [@antfu/eslint-config](https://github.com/antfu/eslint-config).
|
|
4
|
-
|
|
5
|
-
<br />
|
|
6
2
|
|
|
7
3
|

|
|
8
4
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
1. Install the package
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
ni -D @jiakun-zhao/eslint-config
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
2. Add the following to your `package.json` file
|
|
18
|
-
|
|
19
|
-
```json
|
|
20
|
-
{
|
|
21
|
-
"eslintConfig": {
|
|
22
|
-
"extends": "@jiakun-zhao"
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
3. Add the following to your `.vscode/settings.json` file
|
|
28
|
-
|
|
29
|
-
```json
|
|
30
|
-
{
|
|
31
|
-
"editor.codeActionsOnSave": {
|
|
32
|
-
"source.fixAll.eslint": true
|
|
33
|
-
},
|
|
34
|
-
"editor.formatOnSave": false,
|
|
35
|
-
// "prettier.enable": false,
|
|
36
|
-
"eslint.validate": [
|
|
37
|
-
"javascript",
|
|
38
|
-
"javascriptreact",
|
|
39
|
-
"typescript",
|
|
40
|
-
"typescriptreact",
|
|
41
|
-
"vue",
|
|
42
|
-
"html",
|
|
43
|
-
"markdown",
|
|
44
|
-
"json",
|
|
45
|
-
"jsonc",
|
|
46
|
-
"yaml"
|
|
47
|
-
]
|
|
48
|
-
}
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
#### Other
|
|
52
|
-
|
|
53
|
-
UnoCSS
|
|
54
|
-
|
|
55
|
-
```bash
|
|
56
|
-
pnpm i @unocss/eslint-config
|
|
57
|
-
pnpm i eslint-plugin-solid
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
```diff
|
|
61
|
-
"eslintConfig": {
|
|
62
|
-
+ "plugins": [
|
|
63
|
-
+ "solid"
|
|
64
|
-
+ ],
|
|
65
|
-
"extends": [
|
|
66
|
-
"@jiakun-zhao",
|
|
67
|
-
+ "@unocss",
|
|
68
|
-
+ "plugin:solid/recommended"
|
|
69
|
-
]
|
|
70
|
-
}
|
|
71
|
-
```
|
|
5
|
+
Extends [@antfu/eslint-config](https://github.com/antfu/eslint-config).
|
package/dist/index.cjs
CHANGED
|
@@ -1,47 +1,28 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"react/destructuring-assignment": "off",
|
|
26
|
-
"react/no-multi-comp": "off",
|
|
27
|
-
"react/function-component-definition": "off",
|
|
28
|
-
"react/display-name": "off",
|
|
29
|
-
"react/button-has-type": "off",
|
|
30
|
-
"react/no-children-prop": "off",
|
|
31
|
-
"react/jsx-key": "off",
|
|
32
|
-
"react/jsx-indent": ["error", 2],
|
|
33
|
-
"react/jsx-indent-props": ["error", 2],
|
|
34
|
-
"react/jsx-max-depth": "off",
|
|
35
|
-
"react/jsx-filename-extension": "off",
|
|
36
|
-
"react/jsx-no-literals": "off",
|
|
37
|
-
"react/jsx-max-props-per-line": "off",
|
|
38
|
-
"react/jsx-tag-spacing": ["error", { closingSlash: "never", beforeSelfClosing: "always", afterOpening: "never", beforeClosing: "never" }],
|
|
39
|
-
"react/jsx-newline": "off",
|
|
40
|
-
"react/jsx-one-expression-per-line": "off",
|
|
41
|
-
"react/jsx-no-bind": "off",
|
|
42
|
-
"react/jsx-curly-spacing": ["error", { when: "never", children: { when: "never" } }],
|
|
43
|
-
"react/jsx-closing-bracket-location": "warn"
|
|
3
|
+
const antfu = require('@antfu/eslint-config');
|
|
4
|
+
|
|
5
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
|
|
6
|
+
|
|
7
|
+
const antfu__default = /*#__PURE__*/_interopDefaultCompat(antfu);
|
|
8
|
+
|
|
9
|
+
const index = antfu__default({
|
|
10
|
+
stylistic: {
|
|
11
|
+
overrides: {
|
|
12
|
+
"style/jsx-one-expression-per-line": "off"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
typescript: {
|
|
16
|
+
overrides: {
|
|
17
|
+
"ts/ban-ts-comment": "off"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
vue: {
|
|
21
|
+
overrides: {
|
|
22
|
+
"vue/html-self-closing": "off",
|
|
23
|
+
"vue/singleline-html-element-content-newline": "off"
|
|
24
|
+
}
|
|
44
25
|
}
|
|
45
|
-
};
|
|
26
|
+
});
|
|
46
27
|
|
|
47
28
|
module.exports = index;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jiakun-zhao/eslint-config",
|
|
3
|
-
"version": "
|
|
4
|
-
"packageManager": "pnpm@8.
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"packageManager": "pnpm@8.15.4",
|
|
5
5
|
"description": "Jiakun's ESLint config.",
|
|
6
6
|
"author": "Jiakun Zhao <hi@zhaojiakun.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -18,15 +18,13 @@
|
|
|
18
18
|
"eslint": ">=7.4.0"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@antfu/eslint-config": "^
|
|
22
|
-
"eslint-plugin-react": "^7.33.2"
|
|
21
|
+
"@antfu/eslint-config": "^2.8.0"
|
|
23
22
|
},
|
|
24
23
|
"devDependencies": {
|
|
25
|
-
"@types/
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"typescript": "^5.2.2",
|
|
24
|
+
"@types/node": "^20.11.25",
|
|
25
|
+
"bumpp": "^9.4.0",
|
|
26
|
+
"eslint": "^8.57.0",
|
|
27
|
+
"typescript": "^5.4.2",
|
|
30
28
|
"unbuild": "^2.0.0"
|
|
31
29
|
},
|
|
32
30
|
"eslintConfig": {
|