diff --git a/types/gulp-pug-linter/gulp-pug-linter-tests.ts b/types/gulp-pug-linter/gulp-pug-linter-tests.ts new file mode 100644 index 0000000000..b6bc079273 --- /dev/null +++ b/types/gulp-pug-linter/gulp-pug-linter-tests.ts @@ -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' })) +)); diff --git a/types/gulp-pug-linter/index.d.ts b/types/gulp-pug-linter/index.d.ts new file mode 100644 index 0000000000..abe783e707 --- /dev/null +++ b/types/gulp-pug-linter/index.d.ts @@ -0,0 +1,20 @@ +// Type definitions for gulp-pug-linter 1.4 +// Project: https://github.com/ilyakam/gulp-pug-linter +// Definitions by: Takesi Tokugawa +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +interface GulpPugLinter { + (options?: GulpPugLinter.Options): NodeJS.ReadWriteStream; +} + +declare namespace GulpPugLinter { + interface Options { + reporter?: any; + failAfterError?: boolean; + } +} + +declare var gulpPugLinter: GulpPugLinter; +export = gulpPugLinter; diff --git a/types/gulp-pug-linter/tsconfig.json b/types/gulp-pug-linter/tsconfig.json new file mode 100644 index 0000000000..ada556920d --- /dev/null +++ b/types/gulp-pug-linter/tsconfig.json @@ -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" + ] +} diff --git a/types/gulp-pug-linter/tslint.json b/types/gulp-pug-linter/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/gulp-pug-linter/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +}