mirror of
https://github.com/daniel-j/fimfic2epub.git
synced 2024-09-28 07:11:16 +12:00
more linting
This commit is contained in:
parent
01c60253fd
commit
99c4cca20c
3 changed files with 28 additions and 25 deletions
|
@ -1,7 +1,9 @@
|
|||
/* global chrome */
|
||||
'use strict'
|
||||
|
||||
function fetch(url, cb, type) {
|
||||
function fetch (url, cb, type) {
|
||||
if (url.indexOf('//') === 0) {
|
||||
url = 'http:'+url
|
||||
url = 'http:' + url
|
||||
}
|
||||
let x = new XMLHttpRequest()
|
||||
x.open('get', url, true)
|
||||
|
@ -19,7 +21,7 @@ function fetch(url, cb, type) {
|
|||
x.send()
|
||||
}
|
||||
|
||||
chrome.extension.onMessage.addListener(function(request, sender, sendResponse) {
|
||||
chrome.extension.onMessage.addListener(function (request, sender, sendResponse) {
|
||||
fetch(request, sendResponse, 'blob')
|
||||
return true
|
||||
})
|
||||
|
|
|
@ -7,6 +7,7 @@ import del from 'del'
|
|||
import Sequence from 'run-sequence'
|
||||
import watch from 'gulp-watch'
|
||||
import lazypipe from 'lazypipe'
|
||||
import filter from 'gulp-filter'
|
||||
|
||||
// script
|
||||
import standard from 'gulp-standard'
|
||||
|
@ -61,10 +62,9 @@ function webpackTask (callback) {
|
|||
}
|
||||
|
||||
let lintPipe = lazypipe()
|
||||
.pipe(filter, ['**/*', '!extension/fimfic2epub.js', '!extension/tidy.js'])
|
||||
.pipe(standard)
|
||||
.pipe(standard.reporter, 'default', {
|
||||
breakOnError: false
|
||||
})
|
||||
.pipe(standard.reporter, 'default', { breakOnError: false })
|
||||
|
||||
// Cleanup task
|
||||
gulp.task('clean', () => del('extension/fimfic2epub.js'))
|
||||
|
@ -79,7 +79,7 @@ gulp.task('watch:script', () => {
|
|||
})
|
||||
|
||||
gulp.task('lint', () => {
|
||||
return gulp.src(['gulpfile.babel.js', 'webpack.config.babel.js', 'src/**/*.js']).pipe(lintPipe())
|
||||
return gulp.src(['gulpfile.babel.js', 'webpack.config.babel.js', 'src/**/*.js', 'extension/**/*.js']).pipe(lintPipe())
|
||||
})
|
||||
gulp.task('watch:lint', () => {
|
||||
return watch(['src/**/*.js'], watchOpts, function (file) {
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
"babel-preset-node6": "^11.0.0",
|
||||
"del": "^2.2.0",
|
||||
"gulp": "^3.9.1",
|
||||
"gulp-filter": "^4.0.0",
|
||||
"gulp-standard": "^7.0.1",
|
||||
"gulp-util": "^3.0.7",
|
||||
"gulp-watch": "^4.3.8",
|
||||
|
|
Loading…
Reference in a new issue