Skip to content

Commit 3b766d1

Browse files
committed
fix: don't "import" package.json
1 parent 273cea2 commit 3b766d1

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

lib/index.ts

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
import {
2-
name as packageName,
3-
version as packageVersion,
4-
} from '../package.json';
5-
61
import configs from './configs';
72
import rules from './rules';
83

4+
// we can't natively import package.json as tsc will copy it into dist/
5+
const {
6+
name: packageName,
7+
version: packageVersion,
8+
// eslint-disable-next-line @typescript-eslint/no-var-requires
9+
} = require('../package.json') as { name: string; version: string };
10+
911
export = {
1012
meta: {
1113
name: packageName,

0 commit comments

Comments
 (0)