# Breaking changes in v15

## Minimum Node.js version

The minimum Node.js supported version is now `^20`.

## Removed legacy preset

The legacy preset is removed, as it only existed for some internal turo projects. Maintaining it to support eslint v9
was not worth the effort.

## Default flat configuration

The default configuration for this package is now a flat eslint configuration. Read the
eslint [guide](https://eslint.org/docs/latest/use/configure/migration-guide) for how to update legacy configurations
to flat configs.

The legacy configuration is still supported. To keep using it, you just have to update the `.eslintrc` file to:

```diff
{
--  "extends": "@open-turo/eslint-config-react"
++  "extends": "@open-turo/eslint-config-react/recommended"
}
```

If you are using eslint v9, this also means that you will have to set the `ESLINT_USE_FLAT_CONFIG` env var to true.

### Updating to flat configuration

If you wish to update to a flat configuration, you will have to make the following changes (please refer to the above guide
for all the details).

- Move from `.eslintrc` (or equivalent file) into `eslint.config.js` (or equivalent file).
- If you have a `.eslintignore` file, replace that into the `ignores` section of the `eslint.config.js` file

A `.eslintignore` file like this:

```
/lib
```

Will become a `eslint.config.js` file like this:

```js
const turoConfig = require("@open-turo/eslint-config-react");

module.exports = turoConfig({ turo: { ignores: ["/lib"] } });
```
