Skip to content

Commit

Permalink
feat: add TypeScript types (#382)
Browse files Browse the repository at this point in the history
  • Loading branch information
G-Rath authored Nov 17, 2024
1 parent 15809b6 commit 786e56e
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 2 deletions.
19 changes: 19 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { type Linter, type Rule } from "eslint";

declare const plugin: {
meta: {
name: string;
version: string;
};
configs: {
all: Linter.LegacyConfig;
recommended: Linter.LegacyConfig;
"flat/all": Linter.FlatConfig;
"flat/recommended": Linter.FlatConfig;
};
rules: {
[key: string]: Rule.RuleModule;
};
};

export = plugin;
39 changes: 37 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@
"license": "MIT",
"author": "Ben Monro",
"main": "dist/index.js",
"types": "index.d.ts",
"files": [
"dist"
"dist",
"index.d.ts"
],
"scripts": {
"build": "kcd-scripts build",
Expand All @@ -46,7 +48,40 @@
"consistent-return": "off",
"max-lines-per-function": "off",
"testing-library/no-dom-import": "off"
}
},
"overrides": [
{
"files": [
"**/*.ts"
],
"rules": {
"@typescript-eslint/await-thenable": "off",
"@typescript-eslint/dot-notation": "off",
"@typescript-eslint/no-base-to-string": "off",
"@typescript-eslint/no-floating-promises": "off",
"@typescript-eslint/no-implied-eval": "off",
"@typescript-eslint/no-misused-promises": "off",
"@typescript-eslint/no-throw-literal": "off",
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "off",
"@typescript-eslint/no-unnecessary-condition": "off",
"@typescript-eslint/no-unnecessary-qualifier": "off",
"@typescript-eslint/no-unnecessary-type-assertion": "off",
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/prefer-includes": "off",
"@typescript-eslint/prefer-nullish-coalescing": "off",
"@typescript-eslint/prefer-reduce-type-parameter": "off",
"@typescript-eslint/prefer-string-starts-ends-with": "off",
"@typescript-eslint/restrict-plus-operands": "off",
"@typescript-eslint/return-await": "off",
"@typescript-eslint/switch-exhaustiveness-check": "off",
"@typescript-eslint/unbound-method": "off"
}
}
]
},
"eslintIgnore": [
"node_modules",
Expand Down

0 comments on commit 786e56e

Please sign in to comment.