diff options
author | Daijiro Wachi <daijiro.wachi@gmail.com> | 2017-10-22 03:04:24 +0800 |
---|---|---|
committer | Daijiro Wachi <daijiro.wachi@gmail.com> | 2017-10-22 03:04:24 +0800 |
commit | c1eb8f16dc4539b72b8f661c723f6c75532e102a (patch) | |
tree | a4b06a1f7cfbdca20ec78f15ec7d99ff46559b6f | |
parent | 20cb6a76ddcad83645b8e67b31d0bce3c8cee116 (diff) | |
download | tangerine-wallet-browser-c1eb8f16dc4539b72b8f661c723f6c75532e102a.tar tangerine-wallet-browser-c1eb8f16dc4539b72b8f661c723f6c75532e102a.tar.gz tangerine-wallet-browser-c1eb8f16dc4539b72b8f661c723f6c75532e102a.tar.bz2 tangerine-wallet-browser-c1eb8f16dc4539b72b8f661c723f6c75532e102a.tar.lz tangerine-wallet-browser-c1eb8f16dc4539b72b8f661c723f6c75532e102a.tar.xz tangerine-wallet-browser-c1eb8f16dc4539b72b8f661c723f6c75532e102a.tar.zst tangerine-wallet-browser-c1eb8f16dc4539b72b8f661c723f6c75532e102a.zip |
Add lint:fix command to gulp and npm-scripts
-rw-r--r-- | gulpfile.js | 7 | ||||
-rw-r--r-- | package.json | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/gulpfile.js b/gulpfile.js index 9253949c7..f01762c2a 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -161,6 +161,13 @@ gulp.task('lint', function () { .pipe(eslint.failAfterError()) }); +gulp.task('lint:fix', function () { + return gulp.src(['app/**/*.js', 'ui/**/*.js', 'mascara/src/*.js', 'mascara/server/*.js', '!node_modules/**', '!dist/firefox/**', '!docs/**', '!app/scripts/chromereload.js', '!mascara/test/jquery-3.1.0.min.js']) + .pipe(eslint(Object.assign(fs.readFileSync(path.join(__dirname, '.eslintrc')), {fix: true}))) + .pipe(eslint.format()) + .pipe(eslint.failAfterError()) +}); + /* gulp.task('default', ['lint'], function () { // This will only run if the lint task is successful... diff --git a/package.json b/package.json index 106851013..c4a10bdff 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,7 @@ "test:mascara:build:background": "browserify mascara/src/background.js -o dist/mascara/background.js", "test:mascara:build:tests": "browserify test/integration/lib/first-time.js -o dist/mascara/tests.js", "lint": "gulp lint", + "lint:fix": "gulp lint:fix", "disc": "gulp disc --debug", "announce": "node development/announcer.js", "generateNotice": "node notices/notice-generator.js", |