# Breaking changes in v16

## Minimum Node.js version

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

## Removed plugins

The following plugins are getting replaced by [eslint-plugin-perfectionist](https://github.com/azat-io/eslint-plugin-perfectionist):

- [eslint-plugin-simple-import-sort](https://github.com/lydell/eslint-plugin-simple-import-sort)
- [eslint-plugin-sort-destructure-keys](https://github.com/mthadley/eslint-plugin-sort-destructure-keys)
- [eslint-plugin-typescript-sort-keys](https://github.com/infctr/eslint-plugin-typescript-sort-keys/tree/master)

If you were reconfiguring some of the rules from these plugins in your eslint config you will have to update them and reference
the equivalent rule from https://perfectionist.dev/rules.

## 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-typescript"
++  "extends": "@open-turo/eslint-config-typescript/recommended"
}
```

If you are using legacy configurations, 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-typescript");

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

Refer to the README file for all the avaiable options for the `turoConfig` function.
