Skip to content

Commit

Permalink
fix: npe
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode committed Aug 26, 2024
1 parent 780b1d1 commit 18d382d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion projects/eslint-plugin-experience/configs/entry-points.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const {readFileSync} = require('node:fs');
const allPackageJSONs = globSync('**/package.json', {
ignore: ['node_modules/**', 'dist/**'],
}).filter((path) => !readJSON(path).private);
const packageNames = allPackageJSONs.map((path) => readJSON(path).name);
const packageNames = allPackageJSONs.map((path) => readJSON(path).name).filter(Boolean);

module.exports = {
overrides: [
Expand All @@ -25,6 +25,9 @@ module.exports = {
],
};

/**
* @param {import("fs").PathOrFileDescriptor} path
*/
function readJSON(path) {
try {
return JSON.parse(readFileSync(path, 'utf8'));
Expand Down

0 comments on commit 18d382d

Please sign in to comment.