Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (name in coreActualRules === false) {
console.error("✗ \"" + name + "\" rule had removed.");
missingRuleExists = true;
}
}
for (name in coreActualRules) {
if (name in coreRules === false) {
console.error("✗ \"" + name + "\" rule had added.");
missingRuleExists = true;
}
}
for (name in coreRules) {
try {
validator.validateRuleOptions(name, coreRules[name], "base.js");
}
catch (err) {
console.error("✗", err.message);
missingRuleExists = true;
}
}
//-----------------------------------------------------------------------------
// Node rules.
//-----------------------------------------------------------------------------
for (name in nodeRules) {
if (name in nodeActualRules === false) {
console.error("✗ \"" + name + "\" rule had removed.");
missingRuleExists = true;
}
module.exports.validateRuleOptions = (id, options, source) =>
Validator.validateRuleOptions(allRules.get(id), id, options, source)
if (name in nodeActualRules === false) {
console.error("✗ \"" + name + "\" rule had removed.");
missingRuleExists = true;
}
}
for (name in nodeActualRules) {
if (name in nodeRules === false) {
console.error("✗ \"" + name + "\" rule had added.");
missingRuleExists = true;
}
}
for (name in nodeRules) {
try {
validator.validateRuleOptions(name, nodeRules[name], "node.js");
}
catch (err) {
console.error("✗", err.message);
missingRuleExists = true;
}
}
//-----------------------------------------------------------------------------
if (missingRuleExists) {
process.exit(1);
}