Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TypeScript declarations for configs #2528

Merged
merged 1 commit into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions lib/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
type ConfigName =
| "base"
| "essential"
| "no-layout-rules"
| "recommended"
| "strongly-recommended"
| "vue3-essential"
| "vue3-recommended"
| "vue3-strongly-recommended"
| "flat/base"
| "flat/vue2-essential"
| "flat/vue2-recommended"
| "flat/vue2-strongly-recommended"
| "flat/essential"
| "flat/recommended"
| "flat/strongly-recommended"

declare const vue: {
meta: any
configs: {
[name in keyof ConfigName]: any
}
rules: Record<string, any>
processors: {
".vue": any
vue: any
}
environments: {
/**
* @deprecated
*/
"setup-compiler-macros": {
globals: {
defineProps: "readonly"
defineEmits: "readonly"
defineExpose: "readonly"
withDefaults: "readonly"
}
}
}
}

export = vue
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "9.27.0",
"description": "Official ESLint plugin for Vue.js",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"scripts": {
"new": "node tools/new-rule.js",
"start": "npm run test:base -- --watch --growl",
Expand Down
Loading