forked from GoogleChrome/workbox
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlint.js
More file actions
21 lines (18 loc) · 650 Bytes
/
lint.js
File metadata and controls
21 lines (18 loc) · 650 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
Copyright 2018 Google LLC
Use of this source code is governed by an MIT-style
license that can be found in the LICENSE file or at
https://opensource.org/licenses/MIT.
*/
const gulp = require('gulp');
const spawn = require('./utils/spawn-promise-wrapper');
const getNpmCmd = require('./utils/get-npm-cmd');
const logHelper = require('../infra/utils/log-helper');
// Use npm run lint to ensure we are using local eslint
gulp.task('lint', () => {
return spawn(getNpmCmd(), ['run', 'lint'])
.catch((err) => {
logHelper.error(err);
throw new Error(`[Workbox Error Msg] 'gulp lint' discovered errors.`);
});
});