eslint-plugin-react-native icon indicating copy to clipboard operation
eslint-plugin-react-native copied to clipboard

Support "Flat Config" (ESLint 9)

Open JoshuaKGoldberg opened this issue 1 year ago • 6 comments

👋 Coming over from https://github.com/eslint/eslint/issues/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 https://github.com/eslint/eslint/issues/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:

JoshuaKGoldberg avatar Feb 13 '24 14:02 JoshuaKGoldberg

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)
    }
  }
]

Miguel-A-Jara avatar Jun 05 '24 17:06 Miguel-A-Jara