Skip to content

Commit a28e9d8

Browse files
committed
feat: add types to package
1 parent 2a12174 commit a28e9d8

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

index.d.ts

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// eslint-disable-next-line strict
2+
import type { Linter, Rule } from 'eslint';
3+
4+
declare const plugin: {
5+
meta: {
6+
name: string;
7+
version: string;
8+
};
9+
environments: {
10+
globals: {
11+
globals: {
12+
[key: string]: boolean;
13+
};
14+
};
15+
};
16+
configs: {
17+
all: Linter.LegacyConfig;
18+
recommended: Linter.LegacyConfig;
19+
style: Linter.LegacyConfig;
20+
'flat/all': Linter.FlatConfig;
21+
'flat/recommended': Linter.FlatConfig;
22+
'flat/style': Linter.FlatConfig;
23+
};
24+
rules: {
25+
[key: string]: Rule.RuleModule;
26+
};
27+
};
28+
29+
export = plugin;

package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@
1515
"url": "jkimbo.com"
1616
},
1717
"main": "lib/index.js",
18+
"types": "index.d.ts",
1819
"files": [
1920
"docs/",
20-
"lib/"
21+
"lib/",
22+
"index.d.ts"
2123
],
2224
"scripts": {
2325
"build": "babel --extensions .js,.ts src --out-dir lib --copy-files && rimraf --glob lib/__tests__ 'lib/**/__tests__'",

0 commit comments

Comments
 (0)