Skip to content

Commit

Permalink
chore: use ts-ignore-import to lighten the dependencies (#219)
Browse files Browse the repository at this point in the history
* chore: use `ts-ignore-import` to lighten the dependencies

Fixes #213

* Fix

* chore: remove `@types/eslint` from `dependencies`
  • Loading branch information
voxpelli committed Apr 8, 2024
1 parent 438d6fa commit fb0aaae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions lib/eslint-utils.d.ts
@@ -1,9 +1,12 @@
declare module "eslint-plugin-es-x" {
// @ts-ignore
export const rules: NonNullable<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
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -17,7 +17,6 @@
},
"dependencies": {
"@eslint-community/eslint-utils": "^4.4.0",
"@types/eslint": "^8.56.2",
"enhanced-resolve": "^5.15.0",
"eslint-plugin-es-x": "^7.5.0",
"get-tsconfig": "^4.7.0",
Expand Down Expand Up @@ -51,6 +50,7 @@
"punycode": "^2.3.0",
"release-it": "^17.0.0",
"rimraf": "^5.0.1",
"ts-ignore-import": "^4.0.1",
"type-fest": "^4.9.0",
"typescript": "^5.1.3"
},
Expand All @@ -65,7 +65,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 fb0aaae

Please sign in to comment.