Support "Flat Config" (ESLint 9)
JoshuaKGoldberg opened this issue Β· comments
Josh Goldberg β¨ commented
π Coming over from eslint/eslint#18093: ESLint is migrating to a new "flat config" format that will be the default in ESLint v9.
It doesn't look like eslint-plugin-react-native
has support yet. I'm posting this issue here as a reference & cross-linking it to the table in eslint/eslint#18093. If there's anything technical blocking the extension from supporting flat configs, please let us know - we'd be happy to try to help! π
Additional resources:
- Configuration Migration Guide
- (edit) Plugin Migration Guide
- Blog posts on the new config system: Part 1: Background, Part 2: Introduction to flat config
Miguel Jara commented
If anyone is trying to use this with eslint's flat config. You can use the fixupPluginRules
from @eslint/compat
.
https://www.npmjs.com/package/@eslint/compat
import { fixupPluginRules } from '@eslint/compat'
import reactNative from 'eslint-plugin-react-native'
export default [
// ...
{
plugins: {
'react-native': fixupPluginRules(reactNative)
}
}
]