{"id":25888,"library":"lint-webpack-plugin","title":"lint-webpack-plugin","description":"A webpack plugin that runs custom lint shell commands before or during webpack build/watch. Version 0.1.1 is the latest release (no recent updates). It integrates with webpack's build and watch modes: during build, errors halt the webpack process; during watch, errors are ignored and the process continues. Simpler than alternatives like webpack-shell-plugin, but limited to running shell commands without advanced lifecycle hooks.","status":"abandoned","version":"0.1.1","language":"javascript","source_language":"en","source_url":"https://github.com/utatti/lint-webpack-plugin","tags":["javascript","webpack","webpack-plugin","lint","shell"],"install":[{"cmd":"npm install lint-webpack-plugin","lang":"bash","label":"npm"},{"cmd":"yarn add lint-webpack-plugin","lang":"bash","label":"yarn"},{"cmd":"pnpm add lint-webpack-plugin","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Package only supports CommonJS (no ESM exports).","wrong":"import LintPlugin from 'lint-webpack-plugin'","symbol":"default","correct":"const LintPlugin = require('lint-webpack-plugin')"},{"note":"Constructor expects an array of command strings, not a single string.","wrong":"new LintPlugin('tsc --noEmit')","symbol":"default","correct":"new LintPlugin(['tsc --noEmit'])"},{"note":"No default export object; require returns the constructor directly.","wrong":"const LintPlugin = require('lint-webpack-plugin').default;","symbol":"default","correct":"const LintPlugin = require('lint-webpack-plugin');"}],"quickstart":{"code":"const path = require('path');\nconst webpack = require('webpack');\nconst LintPlugin = require('lint-webpack-plugin');\n\nmodule.exports = {\n  entry: './src/index.js',\n  output: {\n    path: path.resolve(__dirname, 'dist'),\n    filename: 'bundle.js'\n  },\n  plugins: [\n    new LintPlugin([\n      'eslint --ext .js,.jsx src/',\n      'prettier --check \"src/**/*.js\"'\n    ])\n  ]\n};","lang":"javascript","description":"Shows how to set up lint-webpack-plugin in a webpack config to run ESLint and Prettier checks."},"warnings":[{"fix":"Pass at least one command or omit the plugin entirely.","message":"Empty array input causes plugin to run no commands but still attaches hooks, potentially causing no-op builds.","severity":"breaking","affected_versions":">=0.1.0"},{"fix":"Consider using webpack-shell-plugin or a modern alternative.","message":"Package has not been updated since 2018 and has no ESM support. Webpack 5 may have compatibility issues.","severity":"deprecated","affected_versions":">=0.1.0"},{"fix":"Add explicit console logging or use a plugin that supports error reporting.","message":"Command failures during watch mode are silently ignored; errors in lint might not be noticed by the developer.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Sanitize command strings, especially if they contain data from external sources.","message":"The plugin runs commands via child_process.exec() which can be a security risk if commands include user input.","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use const LintPlugin = require('lint-webpack-plugin'); instead of import.","cause":"Incorrect import: using ESM import syntax with a CommonJS module.","error":"TypeError: LintPlugin is not a constructor"},{"fix":"Ensure the linting tool (e.g., eslint) is installed locally or globally and available in PATH.","cause":"The shell command specified does not exist in PATH.","error":"Error: spawn ENOENT"},{"fix":"Run npm install --save-dev lint-webpack-plugin.","cause":"Plugin not installed in the project.","error":"Module not found: Error: Can't resolve 'lint-webpack-plugin'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}