Skip to content

Commit

Permalink
feat: add TypeScript types (#963)
Browse files Browse the repository at this point in the history
  • Loading branch information
G-Rath authored Nov 20, 2024
1 parent a734435 commit 041dc1b
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
25 changes: 25 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import type { Linter, Rule } from 'eslint';

declare const plugin: {
meta: {
name: string;
version: string;
};
configs: {
angular: Linter.LegacyConfig;
dom: Linter.LegacyConfig;
marko: Linter.LegacyConfig;
react: Linter.LegacyConfig;
vue: Linter.LegacyConfig;
'flat/angular': Linter.FlatConfig;
'flat/dom': Linter.FlatConfig;
'flat/marko': Linter.FlatConfig;
'flat/react': Linter.FlatConfig;
'flat/vue': Linter.FlatConfig;
};
rules: {
[key: string]: Rule.RuleModule;
};
};

export = plugin;
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@
"files": [
"dist",
"README.md",
"LICENSE"
"LICENSE",
"index.d.ts"
],
"main": "./dist/index.js",
"types": "index.d.ts",
"scripts": {
"prebuild": "del-cli dist",
"build": "tsc",
Expand Down

0 comments on commit 041dc1b

Please sign in to comment.