Commit 5916ef94 by Dominik Prokop Committed by GitHub

grafana/toolkit: allow builds with lint warnings (#28810)

* grafana/toolkit: allow builds with lint warnings

* Remove redundant code
parent 4eeac69b
...@@ -103,13 +103,16 @@ export const lintPlugin = ({ fix }: Fixable = {}) => ...@@ -103,13 +103,16 @@ export const lintPlugin = ({ fix }: Fixable = {}) =>
} }
const { errorCount, results, warningCount } = report; const { errorCount, results, warningCount } = report;
const formatter = cli.getFormatter();
if (errorCount > 0 || warningCount > 0) { if (errorCount > 0 || warningCount > 0) {
const formatter = cli.getFormatter();
console.log('\n'); console.log('\n');
console.log(formatter(results)); console.log(formatter(results));
console.log('\n'); console.log('\n');
throw new Error(`${errorCount + warningCount} linting errors found in ${results.length} files`); }
if (errorCount > 0) {
throw new Error(`${errorCount} linting errors found in ${results.length} files`);
} }
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment