mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-26 03:47:40 -07:00
add 'format' script to use autofix w/ tslint
This commit is contained in:
parent
20a00cda98
commit
c31f778746
3 changed files with 13 additions and 3 deletions
|
@ -81,6 +81,15 @@ gulp.task('lint', () =>
|
||||||
.pipe(tslint.report())
|
.pipe(tslint.report())
|
||||||
);
|
);
|
||||||
|
|
||||||
|
gulp.task('format', () =>
|
||||||
|
gulp.src('./src/**/*.ts')
|
||||||
|
.pipe(tslint({
|
||||||
|
formatter: 'verbose',
|
||||||
|
fix: true
|
||||||
|
}))
|
||||||
|
.pipe(tslint.report())
|
||||||
|
);
|
||||||
|
|
||||||
gulp.task('mocha', () =>
|
gulp.task('mocha', () =>
|
||||||
gulp.src([])
|
gulp.src([])
|
||||||
.pipe(mocha({
|
.pipe(mocha({
|
||||||
|
|
|
@ -18,7 +18,8 @@
|
||||||
"clean": "gulp clean",
|
"clean": "gulp clean",
|
||||||
"cleanall": "gulp cleanall",
|
"cleanall": "gulp cleanall",
|
||||||
"lint": "gulp lint",
|
"lint": "gulp lint",
|
||||||
"test": "gulp test"
|
"test": "gulp test",
|
||||||
|
"format": "gulp format"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/bcryptjs": "2.4.1",
|
"@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 buffer = await ((id): Promise<Buffer> => new Promise((resolve, reject) => {
|
||||||
const chunks = [];
|
const chunks = [];
|
||||||
const readableStream = bucket.openDownloadStream(id);
|
const readableStream = bucket.openDownloadStream(id);
|
||||||
readableStream.on('data', chunk => {
|
readableStream.on('data', chunk => {
|
||||||
chunks.push(chunk);
|
chunks.push(chunk);
|
||||||
});
|
});
|
||||||
readableStream.on('end', () => {
|
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 buffer = await ((id): Promise<Buffer> => new Promise((resolve, reject) => {
|
||||||
const chunks = [];
|
const chunks = [];
|
||||||
const readableStream = bucket.openDownloadStream(id);
|
const readableStream = bucket.openDownloadStream(id);
|
||||||
readableStream.on('data', chunk => {
|
readableStream.on('data', chunk => {
|
||||||
chunks.push(chunk);
|
chunks.push(chunk);
|
||||||
});
|
});
|
||||||
readableStream.on('end', () => {
|
readableStream.on('end', () => {
|
||||||
|
|
Loading…
Reference in a new issue