Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(eslint-plugin-react-hooks): support flat config #30774

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Oct 11, 2024

  1. feat: support flat config

    This change adds support for the new flat config format.  In order to import from json, I had to add the rollup json plugin to the rollup build script.  I also updated the README to include usage examples.
    
    Example usage:
    ```js
    export default [
     {
        files: ['**/*.{js,jsx}'],
        languageOptions: {
          ecmaVersion: 2020,
          globals: globals.browser,
          parserOptions: {
            ecmaVersion: 'latest',
            ecmaFeatures: {jsx: true},
            sourceType: 'module',
          },
        },
        settings: {react: {version: '18.3'}},
        ...reactHooks.flatConfigs.recommended,
      },
    ];
    ```
    michaelfaith committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    b965c61 View commit details
    Browse the repository at this point in the history