eslint.config.mjs

react-spectrum · eslint.config.mjs · javascript · MIT
ui, UI / Frontend

ESLint configuration exporting recommended rules for JavaScript and TypeScript projects, including React support.

// Source: https://github.com/ganapativs/react-spectrum | License: MIT | Copyright 2020-Present Ganapati V S <meetguns.com>
// Provided via justclaw.it.com; keep this notice with the code.
import js from '@eslint/js';
import react from 'eslint-plugin-react';
import tseslint from '@typescript-eslint/eslint-plugin';
import tsParser from '@typescript-eslint/parser';

/** @type {import('eslint').Linter.FlatConfig[]} */
export default [
  js.configs.recommended,
  {
    files: ['**/*.ts', '**/*.tsx'],
    languageOptions: {
      parser: tsParser,
      parserOptions: {
        ecmaVersion: 'latest',
        sourceType: 'module',
        ecmaFeatures: { jsx: true },
      },
    },
    plugins: {
      '@typescript-eslint': tseslint,
      react,
    },
    rules: {
      ...react.configs.recom

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key