{"id":19857,"library":"eslint-plugin-no-snapshot-testing","title":"ESLint Plugin No Snapshot Testing","description":"An ESLint plugin (v1.0.61) that enforces a rule disallowing snapshot testing in Jest. It prevents calls to `toMatchSnapshot` and `toMatchInlineSnapshot`, offering an auto-fix to remove them. This package is a niche utility for teams that ban snapshot testing. It has a simple setup, only one rule, and is dependency-light. No known major alternative exists with identical focus.","status":"active","version":"1.0.61","language":"javascript","source_language":"en","source_url":"https://github.com/VicJer/eslint-plugin-no-snapshot-testing","tags":["javascript","eslint","eslintplugin","no-snapshots","no-snapshot","jest"],"install":[{"cmd":"npm install eslint-plugin-no-snapshot-testing","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-no-snapshot-testing","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-no-snapshot-testing","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency: required for plugin to function","package":"eslint","optional":false}],"imports":[{"note":"ESLint expects short plugin name; the 'eslint-plugin-' prefix is omitted.","wrong":"plugins: ['eslint-plugin-no-snapshot-testing']","symbol":"plugin (default)","correct":"plugins: ['no-snapshot-testing']"},{"note":"The rule name is 'no-snapshot-testing', not a shorter variant.","wrong":"rules: { 'no-snapshot-testing/no-snapshot': 'error' }","symbol":"rule (no-snapshot-testing/no-snapshot-testing)","correct":"rules: { 'no-snapshot-testing/no-snapshot-testing': 'error' }"},{"note":"No official options documented; plugin is simple.","wrong":"rules: { 'no-snapshot-testing/no-snapshot-testing': ['error', { ... }] }","symbol":"rule options","correct":"rules: { 'no-snapshot-testing/no-snapshot-testing': ['error', { ... }] }"}],"quickstart":{"code":"// .eslintrc.js\nmodule.exports = {\n  plugins: ['no-snapshot-testing'],\n  rules: {\n    'no-snapshot-testing/no-snapshot-testing': 'error',\n  },\n};\n\n// test.js\nconst x = 1;\nexpect(x).toMatchSnapshot(); // ESLint error + fix removes this line","lang":"javascript","description":"Shows ESLint config enabling the plugin and rule, and an example of a flagged snapshot call."},"warnings":[{"fix":"Use exactly as documented; no alternative rule name exists.","message":"The rule name is repetitive: 'no-snapshot-testing/no-snapshot-testing'.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Extend rule or use additional ESLint configurations if needed.","message":"Only disallows Jest snapshot matchers; not other snapshot-like patterns (e.g., manual file snapshots).","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Ensure snapshot call is on its own line before auto-fix.","message":"Auto-fix removes the entire `expect(...).toMatchSnapshot()` line; may remove other chained matchers if on same line.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Plugin is intentionally limited; consider custom ESLint rules for advanced cases.","message":"No support for custom matchers that wrap snapshot testing.","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":"Run `npm install eslint-plugin-no-snapshot-testing --save-dev` and check node_modules.","cause":"Plugin not installed or ESLint cannot resolve it.","error":"ESLint couldn't find the plugin \"eslint-plugin-no-snapshot-testing\"."},{"fix":"Add 'no-snapshot-testing' to plugins in .eslintrc.","cause":"Plugin not listed in 'plugins' array or misspelled.","error":"Rule \"no-snapshot-testing/no-snapshot-testing\" is not defined."},{"fix":"Ensure plugins array contains 'no-snapshot-testing' and rules object key is 'no-snapshot-testing/no-snapshot-testing'.","cause":"Invalid plugin configuration: using 'rules' with wrong format.","error":"Cannot read property 'rule' of undefined"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}