Skip to content

Commit 041dc1b

Browse files
authored
feat: add TypeScript types (#963)
1 parent a734435 commit 041dc1b

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

index.d.ts

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import type { Linter, Rule } from 'eslint';
2+
3+
declare const plugin: {
4+
meta: {
5+
name: string;
6+
version: string;
7+
};
8+
configs: {
9+
angular: Linter.LegacyConfig;
10+
dom: Linter.LegacyConfig;
11+
marko: Linter.LegacyConfig;
12+
react: Linter.LegacyConfig;
13+
vue: Linter.LegacyConfig;
14+
'flat/angular': Linter.FlatConfig;
15+
'flat/dom': Linter.FlatConfig;
16+
'flat/marko': Linter.FlatConfig;
17+
'flat/react': Linter.FlatConfig;
18+
'flat/vue': Linter.FlatConfig;
19+
};
20+
rules: {
21+
[key: string]: Rule.RuleModule;
22+
};
23+
};
24+
25+
export = plugin;

package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@
2727
"files": [
2828
"dist",
2929
"README.md",
30-
"LICENSE"
30+
"LICENSE",
31+
"index.d.ts"
3132
],
3233
"main": "./dist/index.js",
34+
"types": "index.d.ts",
3335
"scripts": {
3436
"prebuild": "del-cli dist",
3537
"build": "tsc",

0 commit comments

Comments
 (0)