@mouse_484/eslint-config 3.2.4 → 3.2.5

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mouse_484/eslint-config",
3
3
  "type": "module",
4
- "version": "3.2.4",
4
+ "version": "3.2.5",
5
5
  "author": "mouse_484",
6
6
  "license": "MIT",
7
7
  "homepage": "https://github.com/mouse484/config/tree/main/packages/eslint",
@@ -16,6 +16,7 @@
16
16
  "eslint-config"
17
17
  ],
18
18
  "main": "src/index.js",
19
+ "types": "src/index.d.ts",
19
20
  "dependencies": {
20
21
  "@antfu/eslint-config": "^2.23.0"
21
22
  },
package/src/index.d.ts ADDED
@@ -0,0 +1,8 @@
1
+ import type { Awaitable, OptionsConfig, TypedFlatConfigItem } from '@antfu/eslint-config'
2
+
3
+ declare function mouse(
4
+ options: OptionsConfig & TypedFlatConfigItem,
5
+ ...userConfigs: Awaitable<TypedFlatConfigItem | TypedFlatConfigItem[]>[]
6
+ ): Promise<TypedFlatConfigItem>
7
+
8
+ export { mouse }
package/src/index.js CHANGED
@@ -8,29 +8,13 @@ import antfu, {
8
8
  resolveSubOptions,
9
9
  } from '@antfu/eslint-config'
10
10
 
11
- /**
12
- * @typedef {import('@antfu/eslint-config').OptionsConfig} OptionsConfig
13
- * @typedef {import('@antfu/eslint-config').TypedFlatConfigItem} TypedFlatConfigItem
14
- */
15
-
16
- /**
17
- * Construct an array of ESLint flat config items.
18
- * ref: https://github.com/antfu/eslint-config/blob/main/src/factory.ts
19
- *
20
- * @param {OptionsConfig & TypedFlatConfigItem} options
21
- * The options for generating the ESLint configurations.
22
- * @param {import('@antfu/eslint-config').Awaitable<TypedFlatConfigItem | TypedFlatConfigItem[]>[]} userConfigs
23
- * The user configurations to be merged with the generated configurations.
24
- * @returns {Promise<TypedFlatConfigItem[]>}
25
- * The merged ESLint configurations.
26
- */
27
11
  export async function mouse(options, ...userConfigs) {
28
12
  options = {
29
13
  lessOpinionated: true,
30
14
  ...options,
31
15
  }
32
16
 
33
- /** @type {TypedFlatConfigItem[]} */
17
+ /** @type {import('@antfu/eslint-config').TypedFlatConfigItem[]} */
34
18
  const configs = []
35
19
 
36
20
  configs.push({
@@ -40,7 +24,7 @@ export async function mouse(options, ...userConfigs) {
40
24
  'style/max-len': [
41
25
  'error',
42
26
  {
43
- code: 80,
27
+ code: 100,
44
28
  tabWidth: 2,
45
29
  comments: 120,
46
30
  },