Skip to content

Commit 3157fad

Browse files
authored
Add TypeScript declarations for configs (#2528)
1 parent c27837d commit 3157fad

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed

lib/index.d.ts

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
type ConfigName =
2+
| "base"
3+
| "essential"
4+
| "no-layout-rules"
5+
| "recommended"
6+
| "strongly-recommended"
7+
| "vue3-essential"
8+
| "vue3-recommended"
9+
| "vue3-strongly-recommended"
10+
| "flat/base"
11+
| "flat/vue2-essential"
12+
| "flat/vue2-recommended"
13+
| "flat/vue2-strongly-recommended"
14+
| "flat/essential"
15+
| "flat/recommended"
16+
| "flat/strongly-recommended"
17+
18+
declare const vue: {
19+
meta: any
20+
configs: {
21+
[name in keyof ConfigName]: any
22+
}
23+
rules: Record<string, any>
24+
processors: {
25+
".vue": any
26+
vue: any
27+
}
28+
environments: {
29+
/**
30+
* @deprecated
31+
*/
32+
"setup-compiler-macros": {
33+
globals: {
34+
defineProps: "readonly"
35+
defineEmits: "readonly"
36+
defineExpose: "readonly"
37+
withDefaults: "readonly"
38+
}
39+
}
40+
}
41+
}
42+
43+
export = vue

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "9.28.0",
44
"description": "Official ESLint plugin for Vue.js",
55
"main": "lib/index.js",
6+
"types": "lib/index.d.ts",
67
"scripts": {
78
"new": "node tools/new-rule.js",
89
"start": "npm run test:base -- --watch --growl",

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy