Verified Solution[facebook/react] [eslint-plugin-react-hooks] sync plugin version with package.json
Sponsored Content
### ROOT CAUSE
The version in `index.ts` is hardcoded, violating the Single Source of Truth principle and leading to potential version mismatches between `package.json` and the plugin's metadata.
### CODE FIX
To fix the issue, dynamically read the version from `package.json` instead of hardcoding it.
```typescript
const packageJson = require('../../../package.json');
const plugin = {
meta: {
name: 'eslint-plugin-react-hooks',
version: packageJson.version,
},
rules,
configs,
};
```
This change ensures the version is always up-to-date with `package.json`.
Deploy on DigitalOcean ($200 Credit)
Related Fixes
[gitlab-org/gitlab] Reaction picker has two vertical scrollbars
[golang/go] cmd/go/internal/vcweb/vcstest: TestScripts/git/v3pkg.txt failures
[golang/go] x/build: add darwin/amd64 builders with macOS 15 (macOS Sequoia)