We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
expiring-todo-comments
1 parent ba1a00e commit fcd8934Copy full SHA for fcd8934
rules/expiring-todo-comments.js
@@ -47,7 +47,10 @@ const messages = {
47
'Unexpected \'{{matchedTerm}}\' comment without any conditions: \'{{comment}}\'.',
48
};
49
50
-const packageResult = readPkgUp.sync();
+// We don't need to normalize the package.json data, because we are only using 2 properties and those 2 properties
51
+// aren't validated by the normalization. But when this plugin is used in a monorepo, the name field in the
52
+// package.json is invalid and would make this plugin throw an error. See also #1871
53
+const packageResult = readPkgUp.sync({normalize: false});
54
const hasPackage = Boolean(packageResult);
55
const packageJson = hasPackage ? packageResult.packageJson : {};
56
0 commit comments