mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
grafana/toolkit: allow builds with lint warnings (#28810)
* grafana/toolkit: allow builds with lint warnings * Remove redundant code
This commit is contained in:
parent
4eeac69b29
commit
5916ef94d0
@ -103,13 +103,16 @@ export const lintPlugin = ({ fix }: Fixable = {}) =>
|
||||
}
|
||||
|
||||
const { errorCount, results, warningCount } = report;
|
||||
const formatter = cli.getFormatter();
|
||||
|
||||
if (errorCount > 0 || warningCount > 0) {
|
||||
const formatter = cli.getFormatter();
|
||||
console.log('\n');
|
||||
console.log(formatter(results));
|
||||
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`);
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user