mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-14 12:09:04 +08:00
Merge pull request #19788 from bahlo/add-stylelint-webpack-plugin
Add stylelint-webpack-plugin
This commit is contained in:
36
types/stylelint-webpack-plugin/index.d.ts
vendored
Normal file
36
types/stylelint-webpack-plugin/index.d.ts
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
// Type definitions for https://github.com/JaKXz/stylelint-webpack-plugin 0.1
|
||||
// Project: https://github.com/JaKXz/stylelint-webpack-plugin
|
||||
// Definitions by: Arne Bahlo <https://github.com/bahlo>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import { Plugin } from "webpack";
|
||||
|
||||
export = StylelintWebpackPlugin;
|
||||
|
||||
declare class StylelintWebpackPlugin extends Plugin {
|
||||
constructor(options?: StylelintWebpackPlugin.Options);
|
||||
}
|
||||
|
||||
declare namespace StylelintWebpackPlugin {
|
||||
interface Message {
|
||||
line: number;
|
||||
column: number;
|
||||
severity: string;
|
||||
text: string;
|
||||
rule: string;
|
||||
}
|
||||
|
||||
type Formatter = (messages: Message[], source: string) => string;
|
||||
|
||||
interface Options {
|
||||
configFile?: string;
|
||||
context?: string;
|
||||
emitErrors?: boolean;
|
||||
failOnError?: boolean;
|
||||
files?: string[];
|
||||
formatter?: Formatter;
|
||||
lintDirtyModulesOnly?: boolean;
|
||||
syntax?: string;
|
||||
quiet?: boolean;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
import * as webpack from "webpack";
|
||||
import * as StylelintWebpackPlugin from "stylelint-webpack-plugin";
|
||||
|
||||
const compiler = webpack({
|
||||
plugins: [
|
||||
new StylelintWebpackPlugin(),
|
||||
],
|
||||
});
|
||||
22
types/stylelint-webpack-plugin/tsconfig.json
Normal file
22
types/stylelint-webpack-plugin/tsconfig.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"stylelint-webpack-plugin-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/stylelint-webpack-plugin/tslint.json
Normal file
1
types/stylelint-webpack-plugin/tslint.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user