fix(linter): do not report obsolete devDependencies since they are not used in production files (#18353)

This commit is contained in:
Jack Hsu 2023-07-28 03:05:39 -04:00 committed by GitHub
parent 661efa913d
commit eb392109f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -331,7 +331,7 @@ export default createESLintRule<Options, MessageIds>({
) {
validateMissingDependencies(node);
},
['JSONExpressionStatement > JSONObjectExpression > JSONProperty[key.value=/^(dev|peer|optional)?dependencies$/i] > JSONObjectExpression > JSONProperty'](
['JSONExpressionStatement > JSONObjectExpression > JSONProperty[key.value=/^(peer|optional)?dependencies$/i] > JSONObjectExpression > JSONProperty'](
node: AST.JSONProperty
) {
const packageName = (node.key as any).value;