Skip to content

Commit fb0aaae

Browse files
authoredApr 8, 2024··
chore: use ts-ignore-import to lighten the dependencies (#219)
* chore: use `ts-ignore-import` to lighten the dependencies Fixes #213 * Fix * chore: remove `@types/eslint` from `dependencies`
1 parent 438d6fa commit fb0aaae

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed
 

‎lib/eslint-utils.d.ts

+3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
declare module "eslint-plugin-es-x" {
2+
// @ts-ignore
23
export const rules: NonNullable<import('eslint').ESLint.Plugin["rules"]>;
34
}
45

56
declare module "@eslint-community/eslint-utils" {
7+
// @ts-ignore
68
import * as estree from 'estree';
9+
// @ts-ignore
710
import * as eslint from 'eslint';
811

912
type Node = estree.Node | estree.Expression;

‎package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
},
1818
"dependencies": {
1919
"@eslint-community/eslint-utils": "^4.4.0",
20-
"@types/eslint": "^8.56.2",
2120
"enhanced-resolve": "^5.15.0",
2221
"eslint-plugin-es-x": "^7.5.0",
2322
"get-tsconfig": "^4.7.0",
@@ -51,6 +50,7 @@
5150
"punycode": "^2.3.0",
5251
"release-it": "^17.0.0",
5352
"rimraf": "^5.0.1",
53+
"ts-ignore-import": "^4.0.1",
5454
"type-fest": "^4.9.0",
5555
"typescript": "^5.1.3"
5656
},
@@ -65,7 +65,7 @@
6565
"lint:js": "eslint .",
6666
"new": "node scripts/new-rule",
6767
"postversion": "git push && git push --tags",
68-
"prepack": "tsc --emitDeclarationOnly",
68+
"prepack": "tsc --emitDeclarationOnly && ts-ignore-import 'types/**/*.d.ts' --allow=@eslint-community/eslint-utils --allow=semver --allow=get-tsconfig",
6969
"prepare": "husky",
7070
"preversion": "npm test",
7171
"test": "run-p lint:* test:types test:tests",

0 commit comments

Comments
 (0)
Please sign in to comment.