{"id":19884,"library":"eslint-plugin-putout","title":"eslint-plugin-putout","description":"ESLint plugin for 🐊Putout, a code transformation tool. Current stable version is 31.1.2, released as part of the putout monorepo. The plugin provides ESLint rules that mirror Putout's linting capabilities, including formatting rules like array-element-newline, single-property-destructuring, and tape-specific rules for test files. It requires eslint >=10 and putout >=42. Key differentiator is seamless integration of Putout's code transformations into ESLint workflows, allowing users to leverage both tools in a unified configuration. Release cadence is high (multiple versions per week).","status":"active","version":"31.1.2","language":"javascript","source_language":"en","source_url":"https://github.com/coderaiser/putout","tags":["javascript","putout","eslint","eslintplugin","eslint-plugin"],"install":[{"cmd":"npm install eslint-plugin-putout","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-putout","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-putout","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency required for ESLint plugin functionality","package":"eslint","optional":false},{"reason":"peer dependency required for Putout core functionality","package":"putout","optional":false}],"imports":[{"note":"Plugin object used in eslint.config.js under plugins field","symbol":"default","correct":"import putout from 'eslint-plugin-putout'"},{"note":"Recommended preset (flat config) - ESM-only","symbol":"recommended","correct":"import { recommended } from 'eslint-plugin-putout'"},{"note":"Safe preset - ESM-only; require not supported","wrong":"const { safe } = require('eslint-plugin-putout')","symbol":"safe","correct":"import { safe } from 'eslint-plugin-putout'"}],"quickstart":{"code":"// eslint.config.js\nimport putout from 'eslint-plugin-putout';\nimport { recommended } from 'eslint-plugin-putout';\nimport process from 'process';\n\nexport default [\n  ...recommended,\n  {\n    plugins: { putout },\n    rules: {\n      'putout/putout': ['error', {\n        fix: true,\n        ignores: ['*.d.ts'],\n        regex: /\\.(js|mjs)$/\n      }],\n      'putout/array-element-newline': 'error',\n      'putout/tape-add-newline-between-tests': 'error'\n    }\n  }\n];","lang":"typescript","description":"Demonstrates importing plugin and presets, configuring putout rule with options, and enabling formatting rules in flat config."},"warnings":[{"fix":"Update dependencies: npm i eslint@^10 putout@^42 eslint-plugin-putout@^31 -D","message":"Requires eslint >=10 and putout >=42. Older versions incompatible.","severity":"breaking","affected_versions":"<31.0.0"},{"fix":"Use import syntax only; if using CommonJS, consider dynamic import.","message":"ESM-only package. require() will fail with ERR_REQUIRE_ESM.","severity":"breaking","affected_versions":">=31.0.0"},{"fix":"Use flat config format (eslint.config.js) with import.","message":"Config presets like recommended and safe are now flat config only; old .eslintrc style presets removed.","severity":"deprecated","affected_versions":">=31.0.0"},{"fix":"Disable conflicting rules (e.g., 'indent', 'max-len') if using putout/putout with fix:true.","message":"The 'putout' rule internally uses Putout's engine; may conflict with other ESLint formatting rules.","severity":"gotcha","affected_versions":"*"},{"fix":"Use 'import putout from \"eslint-plugin-putout\"' not 'import { putout } from \"eslint-plugin-putout\"'.","message":"Plugin must be imported as default export, not named exports like { rules }.","severity":"gotcha","affected_versions":"*"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"npm i eslint-plugin-putout -D (ensure it's in package.json)","cause":"Package not installed or wrong import path.","error":"Cannot find module 'eslint-plugin-putout'"},{"fix":"npm i putout -D","cause":"putout peer dependency missing.","error":"ESLint: Failed to load plugin 'putout': Cannot find module 'putout'"},{"fix":"Use \"import putout from 'eslint-plugin-putout'\" instead of \"import { putout } from 'eslint-plugin-putout'\".","cause":"Using named import instead of default import for the plugin object.","error":"TypeError: (0 , eslint_plugin_putout__WEBPACK_IMPORTED_MODULE_0__.default) is not a function"},{"fix":"Update eslint to >=10: npm i eslint@^10 -D","cause":"Outdated eslint version.","error":"Error: Plugin 'putout' requires eslint >=10"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}