Skip to content

Commit

Permalink
chore: Migration guide in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
mvarendorff2 committed Oct 7, 2024
1 parent 3d67b8e commit cf6559e
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,27 @@ ESLint configuration is provided in the `eslint.config.js`, aka. "Flat Config" f
```
This will set up the necessary dependencies and configurations for you.

## Migration von v2 to v3

When upgrading from `@atmina/linting@^2` to `@^3` in a Next project, a few changes are currently required:
1. Add `@eslint/compat` as a dev-dependency to the Next project
2. Update your `eslint.config.js` by wrapping the next plugin's config with `fixupConfigRules`:
```diff
// For CJS
+ const {fixupConfigRules} = require('@eslint/compat');
// ...
- require('@atmina/linting/eslint/next')(require('@next/eslint-plugin-next')),
+ ...fixupConfigRules(
+ require('@atmina/linting/eslint/next')(require('@next/eslint-plugin-next')),
+ ),
// For ESM
import {fixupConfigRules} from '@eslint/compat';
// ...
- next(nextPlugin),
+ fixupConfigRules(next(nextPlugin)),
```
## IDE Integration
In VS Code, use these workspace settings:
Expand Down

0 comments on commit cf6559e

Please sign in to comment.