mirror of
https://github.com/zebrajr/react.git
synced 2025-12-07 12:20:38 +01:00
* (build infrastructure): unify lint and linc buid task; * Fail on warnings * Fail on warnings
18 lines
424 B
JavaScript
18 lines
424 B
JavaScript
/**
|
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
const lintOnFiles = require('../eslint');
|
|
const report = lintOnFiles(['.']);
|
|
if (report.errorCount > 0 || report.warningCount > 0) {
|
|
console.log('Lint failed.');
|
|
process.exit(1);
|
|
} else {
|
|
console.log('Lint passed.');
|
|
}
|