diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 0000000000..045c47d038 --- /dev/null +++ b/index.d.ts @@ -0,0 +1,12 @@ +import type {ESLint, Linter} from 'eslint'; + +declare const eslintPluginUnicorn: ESLint.Plugin & { + configs: { + recommended: Linter.Config; + all: Linter.Config; + 'flat/all': Linter.FlatConfig; + 'flat/recommended': Linter.FlatConfig; + }; +}; + +export = eslintPluginUnicorn; diff --git a/package.json b/package.json index 205dbb79bb..c96f415050 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "url": "https://sindresorhus.com" }, "main": "index.js", + "types": "index.d.ts", "sideEffects": false, "engines": { "node": ">=18.18" @@ -35,6 +36,7 @@ }, "files": [ "index.js", + "index.d.ts", "rules", "configs" ],