{"id":20322,"library":"prettier-ignore","title":"prettier-ignore","description":"A utility package that provides commonly used ignore patterns for Prettier to skip files and folders like pnpm-lock.yaml, dist, coverage, etc. Version 0.5.0 requires Node.js >=20.19.0 and is actively maintained. It packages community-agreed ignore rules that Prettier does not ignore by default, saving users from manually listing them. It is distributed via npm and integrates with Prettier's --ignore-path option.","status":"active","version":"0.5.0","language":"javascript","source_language":"en","source_url":"https://github.com/zanminkian/fenge","tags":["javascript","prettier","ignore"],"install":[{"cmd":"npm install prettier-ignore","lang":"bash","label":"npm"},{"cmd":"yarn add prettier-ignore","lang":"bash","label":"yarn"},{"cmd":"pnpm add prettier-ignore","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"The package provides a file, not a JS export. Use the file path directly.","wrong":"import { prettierignore } from 'prettier-ignore';","symbol":"prettierignore","correct":"const path = require('path'); const ignorePath = path.join(require.resolve('prettier-ignore'), '../prettierignore');"},{"note":"The option is --ignore-path (with hyphen, not space).","wrong":"npx prettier --ignore path ./node_modules/prettier-ignore/prettierignore","symbol":"prettier-ignore/prettierignore","correct":"npx prettier --ignore-path ./node_modules/prettier-ignore/prettierignore"},{"note":"require() returns the module's main entry (if any), not the ignore file. Use require.resolve to get the directory path.","wrong":"const ignore = require('prettier-ignore');","symbol":"require('prettier-ignore')","correct":"const ignorePath = require.resolve('prettier-ignore')"}],"quickstart":{"code":"// Install: npm i prettier-ignore -D\n// Then run Prettier with the ignore file:\nnpx prettier --ignore-path ./node_modules/prettier-ignore/prettierignore --check .","lang":"javascript","description":"Shows how to install and use prettier-ignore with Prettier's --ignore-path option."},"warnings":[{"fix":"Upgrade Node.js to >=20.19.0 or stick to version <0.5.0.","message":"Node.js >=20.19.0 is required since version 0.5.0.","severity":"breaking","affected_versions":">=0.5.0"},{"fix":"Do not try to import or require the module programmatically; use the file path directly.","message":"The package does not expose any JavaScript API; it only provides a file.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Use the full path: ./node_modules/prettier-ignore/prettierignore.","message":"The ignore file is located at node_modules/prettier-ignore/prettierignore, not at the package root.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Use require.resolve('prettier-ignore') to get the path or use the file directly.","cause":"Using require('prettier-ignore') as if it exports a module.","error":"Error: Cannot find module 'prettier-ignore'"},{"fix":"Use --ignore-path (with hyphen).","cause":"Typo in option name: '--ignore path' instead of '--ignore-path'.","error":"Unrecognized option '--ignore path'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}