Skip to content

Commit

Permalink
feat: add types to package
Browse files Browse the repository at this point in the history
  • Loading branch information
mskelton committed Nov 4, 2024
1 parent 2a12174 commit a28e9d8
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
29 changes: 29 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// eslint-disable-next-line strict
import type { Linter, Rule } from 'eslint';

declare const plugin: {
meta: {
name: string;
version: string;
};
environments: {
globals: {
globals: {
[key: string]: boolean;
};
};
};
configs: {
all: Linter.LegacyConfig;
recommended: Linter.LegacyConfig;
style: Linter.LegacyConfig;
'flat/all': Linter.FlatConfig;
'flat/recommended': Linter.FlatConfig;
'flat/style': 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 @@ -15,9 +15,11 @@
"url": "jkimbo.com"
},
"main": "lib/index.js",
"types": "index.d.ts",
"files": [
"docs/",
"lib/"
"lib/",
"index.d.ts"
],
"scripts": {
"build": "babel --extensions .js,.ts src --out-dir lib --copy-files && rimraf --glob lib/__tests__ 'lib/**/__tests__'",
Expand Down

0 comments on commit a28e9d8

Please sign in to comment.