{"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,"search_vec":"'altern':62 'auto':29 'auto-fix':28 'ban':43 'call':21 'depend':57 'dependency-light':56 'disallow':14 'enforc':11 'eslint':1,7,68 'eslintplugin':69 'exist':63 'fix':30 'focus':66 'ident':65 'javascript':67 'jest':18,76 'known':60 'light':58 'major':61 'nich':38 'no-snapshot':70,73 'offer':26 'one':52 'packag':35 'plugin':2,8 'prevent':20 'remov':32 'rule':13,53 'setup':50 'simpl':49 'snapshot':4,15,44,72,75 'team':41 'test':5,16,45 'tomatchinlinesnapshot':25 'tomatchsnapshot':23 'util':39 'v1.0.61':9","created_at":"2026-04-25T11:20:02.632036+00:00","updated_at":"2026-04-25T11:20:02.632036+00:00","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,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/VicJer/eslint-plugin-no-snapshot-testing","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/eslint-plugin-no-snapshot-testing","openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-07-24","install_tag":null}}