Types for gulp-pug-linter (#47522)

* clear to tests

* Clear to tests

* fixed issues

* Update types/gulp-pug-linter/index.d.ts

Co-authored-by: Ilya Kaminsky <ilyakam@users.noreply.github.com>

* fixed issues

Co-authored-by: Ilya Kaminsky <ilyakam@users.noreply.github.com>
This commit is contained in:
TokugawaT_YD 2020-09-18 01:23:47 +09:00 committed by GitHub
parent a13d8cb4de
commit 4f489b1a1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 60 additions and 0 deletions

View File

@ -0,0 +1,14 @@
import gulp = require('gulp');
import * as gulpPugLinter from "gulp-pug-linter";
gulp.task('lint:template__default', () => (
gulp
.src('./**/*.pug')
.pipe(gulpPugLinter({ failAfterError: true }))
));
gulp.task('lint:template__reporter', () => (
gulp
.src('./**/*.pug')
.pipe(gulpPugLinter({ reporter: 'default' }))
));

20
types/gulp-pug-linter/index.d.ts vendored Normal file
View File

@ -0,0 +1,20 @@
// Type definitions for gulp-pug-linter 1.4
// Project: https://github.com/ilyakam/gulp-pug-linter
// Definitions by: Takesi Tokugawa <https://github.com/TokugawaTakesi>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
interface GulpPugLinter {
(options?: GulpPugLinter.Options): NodeJS.ReadWriteStream;
}
declare namespace GulpPugLinter {
interface Options {
reporter?: any;
failAfterError?: boolean;
}
}
declare var gulpPugLinter: GulpPugLinter;
export = gulpPugLinter;

View File

@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"gulp-pug-linter-tests.ts"
]
}

View File

@ -0,0 +1,3 @@
{
"extends": "dtslint/dt.json"
}