{"id":20319,"library":"prettier-eslint-plugin","title":"prettier-eslint-webpack-plugin (fork)","description":"Fork of prettier-eslint-webpack-plugin (v1.1.4, last updated 2017) that integrates prettier-eslint formatting into Webpack 2 build pipeline as a plugin. This package is a legacy fork with no active maintenance; it runs prettier and eslint on files after compilation. Differs from alternatives by being a Webpack plugin rather than a loader or CLI tool. Dependencies include prettier, eslint, and prettier-eslint. Not recommended for new projects; use eslint-plugin-prettier or prettier-eslint-cli instead.","status":"deprecated","version":"1.1.4","language":"javascript","source_language":"en","source_url":"https://github.com/dmacdnld/prettier-eslint-webpack-plugin","tags":["javascript"],"install":[{"cmd":"npm install prettier-eslint-plugin","lang":"bash","label":"npm"},{"cmd":"yarn add prettier-eslint-plugin","lang":"bash","label":"yarn"},{"cmd":"pnpm add prettier-eslint-plugin","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"core formatting engine","package":"prettier-eslint","optional":false}],"imports":[{"note":"Package is ESM. default export is not available; named export only.","wrong":"const PrettierEslintPlugin = require('prettier-eslint-plugin')","symbol":"PrettierEslintPlugin","correct":"import { PrettierEslintPlugin } from 'prettier-eslint-plugin'"},{"note":"CJS destructured require works as alternative.","wrong":"","symbol":"PrettierEslintPlugin","correct":"const { PrettierEslintPlugin } = require('prettier-eslint-plugin')"},{"note":"No default export; attempting to use require as default will yield an object.","wrong":"const prettierEslintPlugin = require('prettier-eslint-plugin')","symbol":"prettierEslintPlugin","correct":"import { PrettierEslintPlugin } from 'prettier-eslint-plugin'"}],"quickstart":{"code":"import { PrettierEslintPlugin } from 'prettier-eslint-plugin';\nimport fs from 'fs';\n\nconst eslintConfig = fs.readFileSync('.eslintrc', 'utf-8');\nconst config = {\n  plugins: [new PrettierEslintPlugin({\n    encoding: 'utf-8',\n    extensions: ['.js', '.jsx'],\n    eslintConfig: JSON.parse(eslintConfig),\n    logLevel: 'warn',\n    prettierOptions: { singleQuote: true }\n  })]\n};\n\nexport default config;","lang":"javascript","description":"Configures the PrettierEslintPlugin in a Webpack config with eslintConfig from file and custom prettier options."},"warnings":[{"fix":"Switch to eslint-plugin-prettier or prettier-eslint-cli.","message":"This package is a legacy fork of prettier-eslint-webpack-plugin and is no longer maintained. It uses Webpack 2 API and may not work with Webpack 4/5.","severity":"deprecated","affected_versions":">=1.0.0 <2.0.0"},{"fix":"Ensure encoding matches your project's file encoding; test on a copy first.","message":"Incorrect file encoding can cause malformed output; plugin writes files using the provided encoding which may not match the source.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Use JSON.parse(config) or require the .eslintrc file directly.","message":"The plugin reads eslintConfig as a string or object; if using fs.readFileSync, you must JSON.parse for object config.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Always pass extensions as an array, e.g., ['.js', '.jsx'].","message":"Options merge with defaults; providing extensions as a string instead of array may cause unexpected behavior.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Use import { PrettierEslintPlugin } from 'prettier-eslint-plugin'.","cause":"Using default import where package has named export only.","error":"PrettierEslintPlugin is not a constructor"},{"fix":"npm install prettier-eslint --save-dev","cause":"Missing peer dependency prettier-eslint.","error":"Cannot find module 'prettier-eslint'"},{"fix":"Upgrade to eslint-plugin-prettier or use a different plugin.","cause":"Fork targets Webpack 2; incompatible with Webpack 4/5.","error":"Plugin only supports webpack 2"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}