@favorodera/eslint-config 2.0.1 → 3.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 +75 -137
- package/dist/globs.d.mts +40 -0
- package/dist/globs.mjs +1 -0
- package/dist/index.d.mts +256 -21808
- package/dist/index.mjs +1 -1
- package/dist/types-DTkNPiEi.d.mts +21911 -0
- package/dist/types.d.mts +2 -0
- package/dist/types.mjs +1 -0
- package/dist/utils.d.mts +36 -0
- package/dist/utils.mjs +1 -0
- package/package.json +39 -35
package/dist/types.d.mts
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as SharedOptions, i as Rules, n as IgnoresPatterns, o as TypedFlatConfigItem, r as PromisedTypedConfigFlatItemArray, t as BooleanSharedOptions } from "./types-DTkNPiEi.mjs";
|
|
2
|
+
export { BooleanSharedOptions, IgnoresPatterns, PromisedTypedConfigFlatItemArray, Rules, SharedOptions, TypedFlatConfigItem };
|
package/dist/types.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
package/dist/utils.d.mts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { i as Rules } from "./types-DTkNPiEi.mjs";
|
|
2
|
+
import { Awaitable } from "eslint-flat-config-utils";
|
|
3
|
+
/**
|
|
4
|
+
* Extracts and merges rules from multiple arrays of flat config items.
|
|
5
|
+
*
|
|
6
|
+
* Later configurations take precedence when the same rule appears more than once.
|
|
7
|
+
* @param configArrays Flat config arrays whose `rules` objects should be merged.
|
|
8
|
+
* @returns A new rule map containing the merged rules.
|
|
9
|
+
*/
|
|
10
|
+
export declare function extractRules(...configArrays: {
|
|
11
|
+
rules?: Record<string, unknown>;
|
|
12
|
+
}[][]): Rules;
|
|
13
|
+
/**
|
|
14
|
+
* Resolves a module (or a promise of one) and returns its default export
|
|
15
|
+
* if present, otherwise returns the module itself.
|
|
16
|
+
*
|
|
17
|
+
* Handles both ESM modules (which wrap exports under `.default`) and
|
|
18
|
+
* CJS / plain-object modules uniformly.
|
|
19
|
+
* @template TModule - The type of the resolved module.
|
|
20
|
+
* @param module A module value or promise-like value to normalize.
|
|
21
|
+
* @returns The module's default export when present; otherwise, the resolved module.
|
|
22
|
+
*/
|
|
23
|
+
export declare function importModule<TModule>(module: Awaitable<TModule>): Promise<TModule extends {
|
|
24
|
+
default: infer TModuleDefault;
|
|
25
|
+
} ? TModuleDefault : TModule>;
|
|
26
|
+
/**
|
|
27
|
+
* Resolves a boolean-or-options value against a set of defaults.
|
|
28
|
+
*
|
|
29
|
+
* A falsy value disables the configuration. `true` enables it with defaults,
|
|
30
|
+
* while an options object is merged over the defaults (provided values win).
|
|
31
|
+
* @template TOptions - The shape of the configuration group's options.
|
|
32
|
+
* @param value Whether the group is enabled, its custom options, or `undefined`.
|
|
33
|
+
* @param defaults Default options applied when the group is enabled.
|
|
34
|
+
* @returns `false` when disabled, or the merged options when enabled.
|
|
35
|
+
*/
|
|
36
|
+
export declare function resolveOptions<TOptions extends object>(value: boolean | TOptions | undefined, defaults: TOptions): false | TOptions;
|
package/dist/utils.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defu as e}from"defu";function t(...e){return Object.assign({},...e.flat().map(e=>e?.rules??{}))}async function n(e){let t=await e;return typeof t==`object`&&t&&`default`in t?t.default:t}function r(t,n){return t?e(t===!0?{}:t,n):!1}export{t as extractRules,n as importModule,r as resolveOptions};
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@favorodera/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "3.0.0",
|
|
5
5
|
"private": false,
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "An opinionated,type-safe ESLint flat configuration for JavaScript and TypeScript projects.",
|
|
7
7
|
"author": "Favour Emeka <favorodera@gmail.com>",
|
|
8
8
|
"license": "MIT",
|
|
9
9
|
"funding": "https://github.com/sponsors/favorodera",
|
|
@@ -19,16 +19,16 @@
|
|
|
19
19
|
"access": "public"
|
|
20
20
|
},
|
|
21
21
|
"keywords": [
|
|
22
|
-
"nuxt",
|
|
23
|
-
"vue",
|
|
24
22
|
"eslint",
|
|
25
|
-
"typescript",
|
|
26
|
-
"stylistic",
|
|
27
23
|
"tooling",
|
|
28
|
-
"linter"
|
|
24
|
+
"linter",
|
|
25
|
+
"favorodera"
|
|
29
26
|
],
|
|
30
27
|
"exports": {
|
|
31
28
|
".": "./dist/index.mjs",
|
|
29
|
+
"./globs": "./dist/globs.mjs",
|
|
30
|
+
"./types": "./dist/types.mjs",
|
|
31
|
+
"./utils": "./dist/utils.mjs",
|
|
32
32
|
"./package.json": "./package.json"
|
|
33
33
|
},
|
|
34
34
|
"types": "./dist/index.d.cts",
|
|
@@ -36,63 +36,67 @@
|
|
|
36
36
|
"dist"
|
|
37
37
|
],
|
|
38
38
|
"engines": {
|
|
39
|
-
"node": ">=
|
|
40
|
-
"pnpm": ">=
|
|
39
|
+
"node": ">=24.0.0",
|
|
40
|
+
"pnpm": ">=12.0.0"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
43
|
"eslint": "^10.0.0"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@eslint/css": "^2.0.
|
|
46
|
+
"@eslint/css": "^2.0.1",
|
|
47
47
|
"@eslint/js": "^10.0.1",
|
|
48
48
|
"@eslint/markdown": "^8.0.3",
|
|
49
49
|
"@stylistic/eslint-plugin": "^5.10.0",
|
|
50
|
-
"@vitest/eslint-plugin": "^1.6.
|
|
50
|
+
"@vitest/eslint-plugin": "^1.6.28",
|
|
51
51
|
"defu": "^6.1.7",
|
|
52
52
|
"eslint-cssicorn": "^0.1.0",
|
|
53
53
|
"eslint-flat-config-utils": "^3.2.0",
|
|
54
54
|
"eslint-merge-processors": "^2.0.0",
|
|
55
|
-
"eslint-plugin-better-tailwindcss": "^4.
|
|
55
|
+
"eslint-plugin-better-tailwindcss": "^4.10.0",
|
|
56
56
|
"eslint-plugin-import-lite": "^0.6.0",
|
|
57
|
-
"eslint-plugin-jsdoc": "^64.
|
|
57
|
+
"eslint-plugin-jsdoc": "^64.5.4",
|
|
58
58
|
"eslint-plugin-jsonc": "^3.4.2",
|
|
59
|
-
"eslint-plugin-n": "^18.
|
|
60
|
-
"eslint-plugin-perfectionist": "^5.
|
|
59
|
+
"eslint-plugin-n": "^18.5.0",
|
|
60
|
+
"eslint-plugin-perfectionist": "^5.13.0",
|
|
61
61
|
"eslint-plugin-pnpm": "^1.9.1",
|
|
62
62
|
"eslint-plugin-unicorn": "^77.0.0",
|
|
63
63
|
"eslint-plugin-unused-imports": "^4.4.1",
|
|
64
|
-
"eslint-plugin-vue": "^10.
|
|
65
|
-
"eslint-plugin-vuejs-accessibility": "^2.6.
|
|
66
|
-
"eslint-plugin-yml": "^3.
|
|
64
|
+
"eslint-plugin-vue": "^10.11.1",
|
|
65
|
+
"eslint-plugin-vuejs-accessibility": "^2.6.3",
|
|
66
|
+
"eslint-plugin-yml": "^3.9.0",
|
|
67
67
|
"eslint-processor-vue-blocks": "^2.0.0",
|
|
68
|
-
"globals": "^17.
|
|
68
|
+
"globals": "^17.13.0",
|
|
69
69
|
"tailwind-csstree": "^0.4.1",
|
|
70
|
-
"typescript-eslint": "^8.
|
|
70
|
+
"typescript-eslint": "^8.72.0",
|
|
71
71
|
"vue-eslint-parser": "^10.4.1",
|
|
72
72
|
"yaml-eslint-parser": "^2.1.0"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
|
-
"@
|
|
76
|
-
"@
|
|
77
|
-
"
|
|
78
|
-
"
|
|
75
|
+
"@ai-sdk/google": "^4.0.104",
|
|
76
|
+
"@eslint/config-inspector": "^3.5.0",
|
|
77
|
+
"@types/node": "^26.6.5",
|
|
78
|
+
"@vitest/ui": "5.0.3",
|
|
79
|
+
"ai": "^7.0.151",
|
|
80
|
+
"concurrently": "^10.0.6",
|
|
81
|
+
"eslint": "^10.13.0",
|
|
79
82
|
"eslint-typegen": "^2.3.1",
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
+
"pkg-pr-new": "^0.0.90",
|
|
84
|
+
"relizy": "^1.11.0",
|
|
85
|
+
"tsdown": "^0.23.2",
|
|
86
|
+
"tsx": "^4.23.15",
|
|
83
87
|
"typescript": "^6.0.3",
|
|
84
|
-
"vitest": "^5.0.
|
|
88
|
+
"vitest": "^5.0.5"
|
|
85
89
|
},
|
|
86
90
|
"scripts": {
|
|
87
|
-
"
|
|
88
|
-
"dev:inspector": "
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
"dev": "pnpm prebuild && concurrently \"tsdown --watch\" \"pnpm dev:inspector\"",
|
|
91
|
+
"typegen": "tsx scripts/typegen.ts",
|
|
92
|
+
"dev:inspector": "eslint --inspect-config",
|
|
93
|
+
"build": "pnpm typegen && tsdown",
|
|
94
|
+
"dev": "pnpm typegen && concurrently \"tsdown --watch\" \"pnpm dev:inspector\"",
|
|
92
95
|
"test": "vitest run",
|
|
93
96
|
"test:watch": "vitest --watch --ui",
|
|
94
|
-
"typecheck": "pnpm
|
|
95
|
-
"lint": "eslint .
|
|
97
|
+
"typecheck": "pnpm typegen && tsc --noEmit",
|
|
98
|
+
"lint": "eslint .",
|
|
99
|
+
"lint:fix": "eslint . --fix",
|
|
96
100
|
"ready": "pnpm install && pnpm lint && pnpm typecheck && pnpm test && pnpm build"
|
|
97
101
|
}
|
|
98
102
|
}
|