Skip to content

Commit

Permalink
chore: use ts-ignore-import to lighten the dependencies
Browse files Browse the repository at this point in the history
Fixes #213
  • Loading branch information
voxpelli committed Apr 7, 2024
1 parent 438d6fa commit f227e30
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion lib/eslint-utils.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
declare module "eslint-plugin-es-x" {
export const rules: NonNullable<import('eslint').ESLint.Plugin["rules"]>;
export const rules: NonNullable<
// @ts-ignore
import('eslint').ESLint.Plugin["rules"]>;
}

declare module "@eslint-community/eslint-utils" {
// @ts-ignore
import * as estree from 'estree';
// @ts-ignore
import * as eslint from 'eslint';

type Node = estree.Node | estree.Expression;
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"punycode": "^2.3.0",
"release-it": "^17.0.0",
"rimraf": "^5.0.1",
"ts-ignore-import": "^4.0.0",
"type-fest": "^4.9.0",
"typescript": "^5.1.3"
},
Expand All @@ -65,7 +66,7 @@
"lint:js": "eslint .",
"new": "node scripts/new-rule",
"postversion": "git push && git push --tags",
"prepack": "tsc --emitDeclarationOnly",
"prepack": "tsc --emitDeclarationOnly && ts-ignore-import 'types/**/*.d.ts' --allow=@eslint-community/eslint-utils --allow=semver --allow=get-tsconfig",
"prepare": "husky",
"preversion": "npm test",
"test": "run-p lint:* test:types test:tests",
Expand Down

0 comments on commit f227e30

Please sign in to comment.