ESLint plugin for Valtio that helps catch common mistakes when using proxy-based state management. Current version 0.8.0 supports both ESLint v8 (legacy config) and v9 (flat config). Key differentiators: specifically targets Valtio anti-patterns like stale snapshots in callbacks, mutating snapshots, using proxies in render phase, incorrect computed dependency order, and `this` usage in snapshots. Maintained by pmndrs. Release cadence: irregular updates with breaking changes in minor versions.
npm install eslint-plugin-valtioVerified import paths — ran on the pinned version, not inferred.
Setup for ESLint v9 flat config and v8 legacy config with recommended rules.
Use valtio.configs['flat/recommended'] with ESLint v9, or plugin:valtio/recommended with ESLint v8.
If using ESLint v9, use flat config pattern; for v8, stay on v0.6.x or use legacy extends string.
Use require('eslint-plugin-valtio') instead of import.Run `npm install --save-dev eslint-plugin-valtio`. Ensure extends uses 'plugin:valtio/recommended'.
Change to 'plugin:valtio/recommended' in extends array.
Use valtio.configs['flat/recommended'] for ESLint v9 flat config.
No dependency data recorded yet.