@ririd/eslint-config 1.0.4 → 1.2.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 CHANGED
@@ -153,7 +153,7 @@ async function markdown() {
153
153
  }
154
154
 
155
155
  // src/factory.ts
156
- async function ririd(options = {}, ...userConfigs) {
156
+ function ririd(options = {}, ...userConfigs) {
157
157
  const configs = [];
158
158
  options = {
159
159
  ...options,
package/dist/index.d.cts CHANGED
@@ -1,13 +1,15 @@
1
- import { OptionsConfig, FlatConfigItem, UserConfigItem } from '@antfu/eslint-config';
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 & FlatConfigItem, ...userConfigs: (UserConfigItem | UserConfigItem[])[]): Promise<UserConfigItem[]>;
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, FlatConfigItem, UserConfigItem } from '@antfu/eslint-config';
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 & FlatConfigItem, ...userConfigs: (UserConfigItem | UserConfigItem[])[]): Promise<UserConfigItem[]>;
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
@@ -115,7 +115,7 @@ async function markdown() {
115
115
  }
116
116
 
117
117
  // src/factory.ts
118
- async function ririd(options = {}, ...userConfigs) {
118
+ function ririd(options = {}, ...userConfigs) {
119
119
  const configs = [];
120
120
  options = {
121
121
  ...options,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ririd/eslint-config",
3
3
  "type": "module",
4
- "version": "1.0.4",
4
+ "version": "1.2.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.6.2",
29
- "@next/eslint-plugin-next": "^14.0.4",
28
+ "@antfu/eslint-config": "^2.12.2",
29
+ "@next/eslint-plugin-next": "^14.1.4",
30
30
  "eslint-plugin-format": "^0.1.0",
31
- "eslint-plugin-react": "^7.33.2",
31
+ "eslint-plugin-react": "^7.34.1",
32
32
  "eslint-plugin-react-hooks": "^4.6.0",
33
- "eslint-plugin-react-refresh": "^0.4.5"
33
+ "eslint-plugin-react-refresh": "^0.4.6"
34
34
  },
35
35
  "devDependencies": {
36
- "@types/eslint": "^8.44.9",
36
+ "@types/eslint": "^8.56.6",
37
37
  "@types/node": "20.10.4",
38
- "bumpp": "^9.2.1",
39
- "eslint": "^8.56.0",
38
+ "bumpp": "^9.4.0",
39
+ "eslint": "^8.57.0",
40
40
  "rimraf": "^5.0.5",
41
- "tsup": "^8.0.1",
41
+ "tsup": "^8.0.2",
42
42
  "typescript": "^5.3.3",
43
- "@ririd/eslint-config": "1.0.4"
43
+ "@ririd/eslint-config": "1.2.0"
44
44
  },
45
45
  "scripts": {
46
46
  "build": "tsup src/index.ts --format esm,cjs --clean --dts",