Skip to content
Snippets Groups Projects
Commit f80283a9 authored by otofune's avatar otofune
Browse files

add 'format' script to use autofix w/ tslint

parent 3ec29fec
No related branches found
No related tags found
No related merge requests found
......@@ -81,6 +81,15 @@ gulp.task('lint', () =>
.pipe(tslint.report())
);
gulp.task('format', () =>
gulp.src('./src/**/*.ts')
.pipe(tslint({
formatter: 'verbose',
fix: true
}))
.pipe(tslint.report())
);
gulp.task('mocha', () =>
gulp.src([])
.pipe(mocha({
......
......@@ -18,7 +18,8 @@
"clean": "gulp clean",
"cleanall": "gulp cleanall",
"lint": "gulp lint",
"test": "gulp test"
"test": "gulp test",
"format": "gulp format"
},
"devDependencies": {
"@types/bcryptjs": "2.4.1",
......
......@@ -110,7 +110,7 @@ app.get('/:id', async (req, res) => {
const buffer = await ((id): Promise<Buffer> => new Promise((resolve, reject) => {
const chunks = [];
const readableStream = bucket.openDownloadStream(id);
readableStream.on('data', chunk => {
readableStream.on('data', chunk => {
chunks.push(chunk);
});
readableStream.on('end', () => {
......@@ -141,7 +141,7 @@ app.get('/:id/:name', async (req, res) => {
const buffer = await ((id): Promise<Buffer> => new Promise((resolve, reject) => {
const chunks = [];
const readableStream = bucket.openDownloadStream(id);
readableStream.on('data', chunk => {
readableStream.on('data', chunk => {
chunks.push(chunk);
});
readableStream.on('end', () => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment