{"id":19878,"library":"eslint-plugin-prettier-internal-rules","title":"ESLint Plugin Prettier Internal Rules","description":"An ESLint plugin containing internal linting rules used by the Prettier project itself. Version 2.0.1 is the current stable release, part of the Prettier monorepo and published to npm primarily for Prettier contributors. The plugin enforces coding conventions within Prettier's codebase, such as no unnecessary backticks or no nested ternaries. It is not intended for general public use but can be referenced for custom rule development.","status":"active","version":"2.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/prettier/eslint-plugin-prettier-internal-rules","tags":["javascript"],"install":[{"cmd":"npm install eslint-plugin-prettier-internal-rules","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-prettier-internal-rules","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-prettier-internal-rules","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"ESM default import works; CJS require not recommended for ESLint plugins.","wrong":"const plugin = require('eslint-plugin-prettier-internal-rules')","symbol":"plugin","correct":"import plugin from 'eslint-plugin-prettier-internal-rules'"},{"note":"Named export 'rules' contains the rule definitions.","wrong":"const { rules } = require('eslint-plugin-prettier-internal-rules')","symbol":"rules","correct":"import { rules } from 'eslint-plugin-prettier-internal-rules'"},{"note":"Named export 'configs' provides default configuration.","wrong":null,"symbol":"configs","correct":"import { configs } from 'eslint-plugin-prettier-internal-rules'"}],"quickstart":{"code":"import plugin from 'eslint-plugin-prettier-internal-rules';\n\nexport default [\n  {\n    plugins: { 'prettier-internal-rules': plugin },\n    rules: {\n      'prettier-internal-rules/no-unnecessary-backticks': 'error',\n    },\n  },\n];\n","lang":"javascript","description":"Shows how to load the plugin and enable the 'no-unnecessary-backticks' rule in a flat ESLint config."},"warnings":[{"fix":"Use only if contributing to Prettier or as a reference.","message":"This plugin is specifically for Prettier's internal codebase and may not be stable for external use.","severity":"gotcha","affected_versions":"all"},{"fix":"Use import syntax or update Node.js to support ESM.","message":"ESM only since v2.0.0; no CommonJS support.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Use ESLint flat config (eslint.config.js).","message":"Flat config only since v2.0.0; eslintrc config not supported.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Pin exact version if using externally.","message":"Rules may change without major version bump as they are internal.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"npm install eslint-plugin-prettier-internal-rules --save-dev","cause":"Plugin not installed in project.","error":"Error: Failed to load plugin 'prettier-internal-rules': Cannot find module 'eslint-plugin-prettier-internal-rules'"},{"fix":"Use import instead of require.","cause":"Using require() with ESM-only version v2.0.0+.","error":"TypeError: eslint-plugin-prettier-internal-rules is not a function"},{"fix":"Migrate to flat config (eslint.config.js).","cause":"Using eslintrc config instead of flat config with v2.0.0+.","error":"Error: ConfigError: Could not find config for 'prettier-internal-rules'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}