Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions declarations/ESLintError.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export default class ESLintError extends Error {
constructor(messages: any);
stack: boolean;
}
10 changes: 10 additions & 0 deletions declarations/LintDirtyModulesPlugin.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export default class LintDirtyModulesPlugin {
constructor(compiler: any, options: any);
compiler: any;
options: any;
startTime: number;
prevTimestamps: {};
isFirstRun: boolean;
apply(compilation: any, callback: any): void;
getChangedFiles(fileTimestamps: any, glob: any): any[];
}
2 changes: 2 additions & 0 deletions declarations/cjs.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
declare const _exports: typeof import('.').default;
export = _exports;
8 changes: 8 additions & 0 deletions declarations/getCLIEngine.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export default function getCLIEngine(
options: any,
startCli?: boolean
): {
eslintPath: any;
CLIEngine: any;
cli: any;
};
1 change: 1 addition & 0 deletions declarations/getOptions.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default function getOptions(pluginOptions: any): any;
7 changes: 7 additions & 0 deletions declarations/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default ESLintWebpackPlugin;
declare class ESLintWebpackPlugin {
constructor(options?: {});
options: any;
apply(compiler: any): void;
getContext(compiler: any): any;
}
5 changes: 5 additions & 0 deletions declarations/linter.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export default function linter(
options: any,
compiler: any,
callback: any
): void;
2 changes: 1 addition & 1 deletion lint-staged.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
'*.js': ['prettier --write', 'eslint --fix'],
'*.{json,md,yml,css}': ['prettier --write'],
'*.{json,md,yml,css,ts}': ['prettier --write'],
};
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 9 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,22 @@
"homepage": "https://github.com/webpack-contrib/eslint-webpack-plugin",
"bugs": "https://github.com/webpack-contrib/eslint-webpack-plugin/issues",
"main": "dist/cjs.js",
"types": "declarations/index.d.ts",
"engines": {
"node": ">= 10.13.0"
},
"scripts": {
"start": "npm run build -- -w",
"clean": "del-cli dist",
"clean": "del-cli dist declarations",
"prebuild": "npm run clean",
"build": "cross-env NODE_ENV=production babel src -d dist --copy-files",
"build:types": "tsc --declaration --emitDeclarationOnly --outDir declarations && prettier \"declarations/**/*.ts\" --write",
"build:code": "cross-env NODE_ENV=production babel src -d dist --copy-files",
"build": "npm-run-all -p \"build:**\"",
"commitlint": "commitlint --from=master",
"security": "npm audit",
"lint:prettier": "prettier --list-different .",
"lint:js": "eslint --cache .",
"lint:types": "tsc --pretty --noEmit",
"lint": "npm-run-all -l -p \"lint:**\"",
"test:only": "cross-env NODE_ENV=test jest",
"test:watch": "npm run test:only -- --watch",
Expand All @@ -31,7 +35,8 @@
"defaults": "webpack-defaults"
},
"files": [
"dist"
"dist",
"declarations"
],
"peerDependencies": {
"eslint": "^6.0.0 || ^7.0.0",
Expand Down Expand Up @@ -67,6 +72,7 @@
"npm-run-all": "^4.1.5",
"prettier": "^2.0.5",
"standard-version": "^7.1.0",
"typescript": "^3.8.3",
"webpack": "^4.43.0"
},
"keywords": [
Expand Down
13 changes: 13 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"compilerOptions": {
"target": "esnext",
"moduleResolution": "node",
"allowJs": true,
"checkJs": true,
"strict": true,
"types": ["node"],
"esModuleInterop": true,
"resolveJsonModule": true
},
"include": ["./types/**/*", "./src/**/*"]
}