@ririd/eslint-config 1.1.0 → 1.3.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/dist/index.cjs +4 -7
- package/dist/index.d.cts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +4 -7
- package/package.json +6 -6
package/dist/index.cjs
CHANGED
|
@@ -77,12 +77,9 @@ async function react() {
|
|
|
77
77
|
files: [import_eslint_config.GLOB_JSX, import_eslint_config.GLOB_TSX],
|
|
78
78
|
name: "ririd:react",
|
|
79
79
|
rules: {
|
|
80
|
-
"react/
|
|
81
|
-
"react/
|
|
82
|
-
"react/
|
|
83
|
-
"react/no-unknown-property": "off",
|
|
84
|
-
"react/display-name": "off",
|
|
85
|
-
"react-refresh/only-export-components": "off"
|
|
80
|
+
"react-refresh/only-export-components": "off",
|
|
81
|
+
"react/no-clone-element": "off",
|
|
82
|
+
"react/no-missing-component-display-name": "off"
|
|
86
83
|
}
|
|
87
84
|
}
|
|
88
85
|
];
|
|
@@ -153,7 +150,7 @@ async function markdown() {
|
|
|
153
150
|
}
|
|
154
151
|
|
|
155
152
|
// src/factory.ts
|
|
156
|
-
|
|
153
|
+
function ririd(options = {}, ...userConfigs) {
|
|
157
154
|
const configs = [];
|
|
158
155
|
options = {
|
|
159
156
|
...options,
|
package/dist/index.d.cts
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import { OptionsConfig,
|
|
1
|
+
import { OptionsConfig, TypedFlatConfigItem, antfu } from '@antfu/eslint-config';
|
|
2
2
|
export * from '@antfu/eslint-config';
|
|
3
3
|
|
|
4
4
|
interface CustomConfig {
|
|
5
5
|
all?: boolean;
|
|
6
6
|
next?: boolean;
|
|
7
7
|
}
|
|
8
|
+
type UserConfigItem = Parameters<typeof antfu>[1];
|
|
9
|
+
type Configs = ReturnType<typeof antfu>;
|
|
8
10
|
/**
|
|
9
11
|
* 构建一个 ESLint 平面配置项数组。
|
|
10
12
|
*/
|
|
11
|
-
declare function ririd(options?: OptionsConfig & CustomConfig &
|
|
13
|
+
declare function ririd(options?: OptionsConfig & CustomConfig & TypedFlatConfigItem, ...userConfigs: UserConfigItem[]): Configs;
|
|
12
14
|
|
|
13
15
|
export { ririd as default, ririd };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import { OptionsConfig,
|
|
1
|
+
import { OptionsConfig, TypedFlatConfigItem, antfu } from '@antfu/eslint-config';
|
|
2
2
|
export * from '@antfu/eslint-config';
|
|
3
3
|
|
|
4
4
|
interface CustomConfig {
|
|
5
5
|
all?: boolean;
|
|
6
6
|
next?: boolean;
|
|
7
7
|
}
|
|
8
|
+
type UserConfigItem = Parameters<typeof antfu>[1];
|
|
9
|
+
type Configs = ReturnType<typeof antfu>;
|
|
8
10
|
/**
|
|
9
11
|
* 构建一个 ESLint 平面配置项数组。
|
|
10
12
|
*/
|
|
11
|
-
declare function ririd(options?: OptionsConfig & CustomConfig &
|
|
13
|
+
declare function ririd(options?: OptionsConfig & CustomConfig & TypedFlatConfigItem, ...userConfigs: UserConfigItem[]): Configs;
|
|
12
14
|
|
|
13
15
|
export { ririd as default, ririd };
|
package/dist/index.js
CHANGED
|
@@ -39,12 +39,9 @@ async function react() {
|
|
|
39
39
|
files: [GLOB_JSX, GLOB_TSX],
|
|
40
40
|
name: "ririd:react",
|
|
41
41
|
rules: {
|
|
42
|
-
"react/
|
|
43
|
-
"react/
|
|
44
|
-
"react/
|
|
45
|
-
"react/no-unknown-property": "off",
|
|
46
|
-
"react/display-name": "off",
|
|
47
|
-
"react-refresh/only-export-components": "off"
|
|
42
|
+
"react-refresh/only-export-components": "off",
|
|
43
|
+
"react/no-clone-element": "off",
|
|
44
|
+
"react/no-missing-component-display-name": "off"
|
|
48
45
|
}
|
|
49
46
|
}
|
|
50
47
|
];
|
|
@@ -115,7 +112,7 @@ async function markdown() {
|
|
|
115
112
|
}
|
|
116
113
|
|
|
117
114
|
// src/factory.ts
|
|
118
|
-
|
|
115
|
+
function ririd(options = {}, ...userConfigs) {
|
|
119
116
|
const configs = [];
|
|
120
117
|
options = {
|
|
121
118
|
...options,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ririd/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.3.0",
|
|
5
5
|
"packageManager": "pnpm@8.12.1",
|
|
6
6
|
"author": "Daydreamer Riri <Daydreamerriri@outloot.com> (https://github.com/Daydreamer-riri/)",
|
|
7
7
|
"license": "MIT",
|
|
@@ -25,22 +25,22 @@
|
|
|
25
25
|
"eslint": ">=8.0.0"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@antfu/eslint-config": "^2.
|
|
28
|
+
"@antfu/eslint-config": "^2.15.0",
|
|
29
|
+
"@eslint-react/eslint-plugin": "^1.5.9",
|
|
29
30
|
"@next/eslint-plugin-next": "^14.1.4",
|
|
30
31
|
"eslint-plugin-format": "^0.1.0",
|
|
31
|
-
"eslint-plugin-react": "^7.34.1",
|
|
32
32
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
33
33
|
"eslint-plugin-react-refresh": "^0.4.6"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@types/eslint": "^8.56.
|
|
36
|
+
"@types/eslint": "^8.56.9",
|
|
37
37
|
"@types/node": "20.10.4",
|
|
38
38
|
"bumpp": "^9.4.0",
|
|
39
|
-
"eslint": "^
|
|
39
|
+
"eslint": "^9.1.0",
|
|
40
40
|
"rimraf": "^5.0.5",
|
|
41
41
|
"tsup": "^8.0.2",
|
|
42
42
|
"typescript": "^5.3.3",
|
|
43
|
-
"@ririd/eslint-config": "1.
|
|
43
|
+
"@ririd/eslint-config": "1.3.0"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
46
|
"build": "tsup src/index.ts --format esm,cjs --clean --dts",
|