@mouse_484/eslint-config 5.3.7 → 5.3.8
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 +2 -2
- package/src/{lib/type.d.ts → index.d.ts} +0 -2
- package/src/index.js +1 -1
- package/src/lib/factory.d.ts +9 -3
- package/src/lib/factory.js +2 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mouse_484/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.3.
|
|
4
|
+
"version": "5.3.8",
|
|
5
5
|
"author": "mouse_484",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://github.com/mouse484/config/tree/main/packages/eslint",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"eslint-config"
|
|
17
17
|
],
|
|
18
18
|
"main": "src/index.js",
|
|
19
|
-
"types": "src/
|
|
19
|
+
"types": "src/index.d.ts",
|
|
20
20
|
"bin": "bin/cli.js",
|
|
21
21
|
"scripts": {
|
|
22
22
|
"typegen": "node scripts/typegen.js"
|
package/src/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import svelte from './configs/svelte.js'
|
|
|
7
7
|
import tailwind from './configs/tailwind.js'
|
|
8
8
|
import unicorn from './configs/unicorn.js'
|
|
9
9
|
|
|
10
|
-
/** @type {import('
|
|
10
|
+
/** @type {import('.').mouse} */
|
|
11
11
|
async function mouse(options, ...userConfigs) {
|
|
12
12
|
options = {
|
|
13
13
|
unicorn: {
|
package/src/lib/factory.d.ts
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import type { TypedFlatConfigItem } from '@antfu/eslint-config'
|
|
2
|
-
import type { Options } from '
|
|
1
|
+
import type { Rules, TypedFlatConfigItem } from '@antfu/eslint-config'
|
|
2
|
+
import type { Options } from '..'
|
|
3
|
+
import type { RuleOptions } from './rules.gen'
|
|
4
|
+
|
|
5
|
+
interface ConfigItem extends TypedFlatConfigItem {
|
|
6
|
+
withOptions?: (keyof Options)[]
|
|
7
|
+
name: string
|
|
8
|
+
rules?: Rules & RuleOptions
|
|
9
|
+
}
|
|
3
10
|
|
|
4
|
-
type ConfigItem = TypedFlatConfigItem & { withOptions?: (keyof Options)[], name: string }
|
|
5
11
|
type OnlyObject<T> = T extends object ? T : never
|
|
6
12
|
export declare function createConfigs<T extends keyof Options = undefined>(parameters: {
|
|
7
13
|
name: string
|
package/src/lib/factory.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
*
|
|
3
3
|
* @param {string} name
|
|
4
|
-
* @param {(keyof import('
|
|
4
|
+
* @param {(keyof import('..').Options)[]} withOptions
|
|
5
5
|
* @param {Omit<import('@antfu/eslint-config').TypedFlatConfigItem,'name'>} config
|
|
6
|
-
* @returns {(options: import('
|
|
6
|
+
* @returns {(options: import('..').Options) => import('@antfu/eslint-config').TypedFlatConfigItem|[]} _
|
|
7
7
|
*/
|
|
8
8
|
function createConfig(name, withOptions, config) {
|
|
9
9
|
return (options) => {
|