lint-webpack-plugin
A webpack plugin to run custom lint shell command
What's this?
lint-webpack-plugin is a simple script to run custom lint commands.
If it's build (webpack
), it will run the commands before the webpack build
starts. If there is any error occuring in the commands, the webpack process will
stop.
If it's watch (webpack --watch
), it will run the commands with the webpack
build. Although there is any error, it will be ignored and the webpack process
will continue to work.
Install
npm i --save-dev lint-webpack-plugin
How to use
An example webpack.config.js
with TypeScript and Prettier:
const LintPlugin = ;moduleexports =...plugins:'tsc --noEmit'"prettier -l --parser=babylon \'src/**/*'";
Demo
Build
Watch
Similar works
webpack-shell-plugin
If you want to run shell commands at more specific timings, please use webpack-shell-plugin.