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 789d4ec
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ coverage/
lib/
!.eslintrc.js
src/rules/__tests__/fixtures/
index.d.ts
28 changes: 28 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { Linter, Rule } from 'eslint';

declare const plugin: {
meta: {
name: string;
version: string;
};
environments: {
globals: {
globals: {
[key: string]: boolean;
};
};
};
configs: {
all: Linter.Config;
recommended: Linter.Config;
style: Linter.Config;
'flat/all': Linter.FlatConfig;
'flat/recommended': Linter.FlatConfig;
'flat/style': Linter.FlatConfig;
};
rules: {
[key: string]: Rule.RuleModule;
};
};

export default 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 789d4ec

Please sign in to comment.