mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
New types for gulp-stylint (#47871)
* clear to tests * Ready for tests * Fixed issues
This commit is contained in:
parent
2f95f2c465
commit
d2b15f82fd
28
types/gulp-stylint/gulp-stylint-tests.ts
Normal file
28
types/gulp-stylint/gulp-stylint-tests.ts
Normal file
@ -0,0 +1,28 @@
|
||||
import gulp = require('gulp');
|
||||
import * as gulpStylint from "gulp-stylint";
|
||||
|
||||
gulp.task('default', () => {
|
||||
return gulp.src('src/*.styl')
|
||||
.pipe(gulpStylint())
|
||||
.pipe(gulpStylint.reporter());
|
||||
});
|
||||
|
||||
gulp.task('default', () => {
|
||||
return gulp.src('src/*.styl')
|
||||
.pipe(gulpStylint({ config: '.stylintrc' }))
|
||||
.pipe(gulpStylint.reporter());
|
||||
});
|
||||
|
||||
gulp.task('default', () => {
|
||||
return gulp.src('src/*.styl')
|
||||
.pipe(gulpStylint())
|
||||
.pipe(gulpStylint.reporter())
|
||||
.pipe(gulpStylint.reporter('fail'));
|
||||
});
|
||||
|
||||
gulp.task('default', () => {
|
||||
return gulp.src('src/*.styl')
|
||||
.pipe(gulpStylint())
|
||||
.pipe(gulpStylint.reporter())
|
||||
.pipe(gulpStylint.reporter('fail', { failOnWarning: true }));
|
||||
});
|
||||
31
types/gulp-stylint/index.d.ts
vendored
Normal file
31
types/gulp-stylint/index.d.ts
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
// Type definitions for gulp-stylint 4.0
|
||||
// Project: https://github.com/danielhusar/gulp-stylint
|
||||
// Definitions by: Takesi Tokugawa <https://github.com/TokugawaTakesi>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
interface GulpStylint {
|
||||
(options?: GulpStylint.Options): NodeJS.ReadWriteStream;
|
||||
reporter(options?: GulpStylint): NodeJS.ReadWriteStream;
|
||||
reporter(identifier: "fail", options?: { failOnWarning: true }): NodeJS.ReadWriteStream;
|
||||
}
|
||||
|
||||
declare namespace GulpStylint {
|
||||
interface Options {
|
||||
config?: string;
|
||||
rules?: { [ruleName: string]: any; };
|
||||
reporter?: any;
|
||||
}
|
||||
|
||||
interface ReporterOptions {
|
||||
logger?(): void;
|
||||
}
|
||||
|
||||
interface FailReporterOptions {
|
||||
failOnWarning: true;
|
||||
}
|
||||
}
|
||||
|
||||
declare var gulpStylint: GulpStylint;
|
||||
export = gulpStylint;
|
||||
23
types/gulp-stylint/tsconfig.json
Normal file
23
types/gulp-stylint/tsconfig.json
Normal 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-stylint-tests.ts"
|
||||
]
|
||||
}
|
||||
3
types/gulp-stylint/tslint.json
Normal file
3
types/gulp-stylint/tslint.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json"
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user