check-case-webpack-plugin
Version:
We should standard file case type to avoid sensitive case problem.
23 lines (22 loc) • 815 B
TypeScript
import { Compiler } from 'webpack';
export declare type ValidCaseType = 'kebab' | 'snake';
export declare type CheckInfoType = 'warn' | 'error' | 'none';
export interface ICaseCheckOptions {
caseType: ValidCaseType;
checkInfoType?: CheckInfoType;
exclude?: Array<RegExp>;
}
export declare class CheckCaseWebpackPlugin {
private PLUGIN_NAME;
private caseType;
private checkInfoType;
private compiler?;
private contextPath;
private exclude;
constructor(options?: ICaseCheckOptions);
apply(compiler: Compiler): void;
checkModuleCaseType(modulePath: string, caseType: ValidCaseType): string | void;
static hasFirstUpperCaseFile(path: any): any;
static hasUpperCaseFile(path: any): any;
static infoTpl(pluginName: any, filePath: any, caseType: any): string;
}