github.com/argoproj/argo-cd/v3@v3.2.1/ui/eslint.config.mjs (about)

     1  import globals from 'globals';
     2  import pluginJs from '@eslint/js';
     3  import tseslint from 'typescript-eslint';
     4  import pluginReactConfig from 'eslint-plugin-react/configs/recommended.js';
     5  import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
     6  
     7  export default [
     8      {languageOptions: {globals: globals.browser}},
     9      pluginJs.configs.recommended,
    10      ...tseslint.configs.recommended,
    11      {
    12          rules: {
    13              '@typescript-eslint/no-explicit-any': 'off',
    14              '@typescript-eslint/ban-types': 'off',
    15              '@typescript-eslint/no-var-requires': 'off'
    16          }
    17      },
    18      {
    19          settings: {
    20              react: {
    21                  version: 'detect'
    22              }
    23          },
    24          ...pluginReactConfig,
    25          rules: {
    26              'react/display-name': 'off',
    27              'react/no-string-refs': 'off',
    28              'react/jsx-no-useless-fragment': ['error', {allowExpressions: true}]
    29          }
    30      },
    31      eslintPluginPrettierRecommended,
    32      {
    33          files: ['./src/**/*.{ts,tsx}']
    34      },
    35      {
    36          ignores: ['dist', 'assets', '**/*.config.js', '__mocks__', 'coverage', '**/*.test.{ts,tsx}']
    37      }
    38  ];