Skip to content

Commit 5d6b6b5

Browse files
committed
make eslint-rules commonjs
1 parent f3a8438 commit 5d6b6b5

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

build/ci/postInstall.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,8 @@ exports.javascript = {
138138
* See comments here build/webpack/moment.js
139139
*/
140140
function verifyMomentIsOnlyUsedByJupyterLabCoreUtils() {
141-
const packageLock = require(path.join(__dirname, '..', '..', 'package-lock.json'));
141+
const packageLockPath = path.join(__dirname, '..', '..', 'package-lock.json');
142+
const packageLock = JSON.parse(fs.readFileSync(packageLockPath, 'utf8'));
142143
const packagesAllowedToUseMoment = ['node_modules/@jupyterlab/coreutils', '@jupyterlab/coreutils'];
143144
const otherPackagesUsingMoment = [];
144145
['packages', 'dependencies'].forEach((key) => {

build/eslint-rules/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"name": "eslint-plugin-local-rules",
33
"version": "1.0.0",
4+
"type": "commonjs",
45
"main": "index.js"
56
}

0 commit comments

Comments
 (0)