From 536a36868598f51390c3857c7927024e8f9214f4 Mon Sep 17 00:00:00 2001 From: JounQin Date: Fri, 12 Mar 2021 09:13:46 +0000 Subject: [PATCH] feat: add types for eslint-plugin close #3129 --- packages/eslint-plugin/index.d.ts | 4 ++++ packages/eslint-plugin/package.json | 2 ++ packages/eslint-plugin/tsconfig.json | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 packages/eslint-plugin/index.d.ts diff --git a/packages/eslint-plugin/index.d.ts b/packages/eslint-plugin/index.d.ts new file mode 100644 index 000000000000..8092cabcc4b2 --- /dev/null +++ b/packages/eslint-plugin/index.d.ts @@ -0,0 +1,4 @@ +import { TSESLint } from '@typescript-eslint/experimental-utils'; + +export const rules: Record>; +export const configs: Record; diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 87cfd4ab8001..911d8e7772b4 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -14,6 +14,7 @@ "files": [ "dist", "docs", + "index.d.ts", "package.json", "README.md", "LICENSE" @@ -28,6 +29,7 @@ }, "license": "MIT", "main": "dist/index.js", + "types": "index.d.ts", "scripts": { "build": "tsc -b tsconfig.build.json", "check:docs": "jest tests/docs.test.ts --runTestsByPath --silent --runInBand", diff --git a/packages/eslint-plugin/tsconfig.json b/packages/eslint-plugin/tsconfig.json index a0cdad048692..c7e9c4ecb2b7 100644 --- a/packages/eslint-plugin/tsconfig.json +++ b/packages/eslint-plugin/tsconfig.json @@ -4,7 +4,7 @@ "composite": false, "rootDir": "." }, - "include": ["src", "typings", "tests", "tools"], + "include": ["src", "typings", "tests", "tools", "index.d.ts"], "references": [ { "path": "../experimental-utils/tsconfig.build.json" }, { "path": "../parser/tsconfig.build.json" },