in packages/fbjs-eslint-utils/change-error-level.js [14:35]
function changeErrorLevel(config, level) {
// Clone the config so we don't mutate.
config = JSON.parse(JSON.stringify(config))
Object.keys(config.rules).forEach((rule) => {
let val = config.rules[rule];
if (Array.isArray(val)) {
if (isOff(val[0])) {
return;
}
val[0] = level;
config.rules[rule] = level;
return;
}
if (isOff(val)) {
return;
}
config.rules[rule] = level;
});
return config;
}