import globals from 'globals';
import eslintReact from '@eslint-react/eslint-plugin';
import jsxA11yPlugin from 'eslint-plugin-jsx-a11y';
import reactRules from '../rules/react.mjs';
import reactA11yRules from '../rules/react-a11y.mjs';

export default [
  {
    languageOptions: {
      parserOptions: {
        ecmaFeatures: {
          jsx: true,
        },
      },
      globals: {
        ...globals.browser,
      },
    },
    plugins: {
      ...eslintReact.configs.all.plugins,
      'jsx-a11y': jsxA11yPlugin,
    },
    rules: {
      ...reactRules,
      ...reactA11yRules,
    },
  },
];
