Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
.option('-c, --config <configfile>', 'uses <configfile> for eslint config instead.')
.option('-e, --extend <configfile>', 'uses <configfile> ontop of default eslint config.')
.option('-f, --fix', 'if set, fixes will be applied.')
.option('-c, --config <configfile>', 'uses <configfile> for eslint config instead.')
.option('-e, --extend <configfile>', 'uses <configfile> ontop of default eslint config.')
.option('-f, --fix', 'if set, fixes will be applied.')
+ .option('-s, --strict', 'if set, also exit uncleanly on warnings')
.option('--output-config', 'if set, only output the config as JSON and exit.')
;
.option('--output-config', 'if set, only output the config as JSON and exit.')
;
let msg = `: line ${color.bold(e.line)} col ${color.bold(e.column)}: ${e.ruleId}`;
if (e.severity === 1) {
msg = color.yellow("WARN" + msg);
let msg = `: line ${color.bold(e.line)} col ${color.bold(e.column)}: ${e.ruleId}`;
if (e.severity === 1) {
msg = color.yellow("WARN" + msg);
+ if (exitcode < 1 && !!program.strict) {
+ exitcode = 1;
+ }
} else if (e.severity === 2) {
msg = color.red("ERR " + msg);
if (exitcode < 1) {
} else if (e.severity === 2) {
msg = color.red("ERR " + msg);
if (exitcode < 1) {