text: module.exports = {
    parser: '@typescript-eslint/parser',
    parserOptions: {
      ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features
      ecmaFeatures: {
        jsx: true,
      },
      sourceType: 'module', // Allows for the use of imports
      project: ['./tsconfig.eslint.json', './cypress/tsconfig.json'],
    },
    settings: {
      react: {
        version: 'detect',
      },
    },
    env: {
      node: true,
      browser: true,
    },
    extends: [
      'plugin:@typescript-eslint/recommended',
      'plugin:@typescript-eslint/recommended-requiring-type-checking',
      'plugin:react/recommended',
      'plugin:import/recommended',
      'plugin:import/typescript',
    ],
    plugins: ['@typescript-eslint', 'react'],
    rules: {
      'no-await-in-loop': 'error',
      'import/no-duplicates': 'error',
      'import/order': [
        'error',
        {
          // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/order.md
          groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'],
          // Make react first
          pathGroups: [
            {
              pattern: 'react',
              group: 'builtin',
              position: 'before',
            },
          ],
          pathGroupsExcludedImportTypes: ['react'],
          'newlines-between': 'always',
          alphabetize: {
            order: 'asc',
            caseInsensitive: true,
          },
        },
      ],
      '@typescript-eslint/explicit-member-accessibility': [
        'error',
        {
          accessibility: 'no-public',
        },
      ],
      '@typescript-eslint/no-use-before-define': 'off',
      '@typescript-eslint/no-non-null-assertion': 'off',
      'react/react-in-jsx-scope': 'off',
      'react/prop-types': 'off',
      '@typescript-eslint/explicit-function-return-type': 'off',
      '@typescript-eslint/no-explicit-any': 'off',
      '@typescript-eslint/prefer-interface': 'off',
      'react/no-unescaped-entities': 'off',
      '@typescript-eslint/no-var-requires': 'off',
      '@typescript-eslint/explicit-module-boundary-types': 'off',
      'import/no-named-as-default': 'off',
      '@typescript-eslint/no-extra-semi': 'off',
      'no-mixed-spaces-and-tabs': 'off',
      // Too restrictive typescript eslint rules
      '@typescript-eslint/no-unsafe-call': 'off',
      '@typescript-eslint/no-unsafe-member-access': 'off',
      '@typescript-eslint/no-unsafe-assignment': 'off',
      '@typescript-eslint/restrict-template-expressions': 'off',
      '@typescript-eslint/restrict-plus-operands': 'off',
      '@typescript-eslint/no-unsafe-return': 'off',
      '@typescript-eslint/no-floating-promises': 'off',
      '@typescript-eslint/no-unsafe-argument': 'off',
      // Sometimes you want to add await to satisfy TS when it expects function to return a promise
      '@typescript-eslint/require-await': 'off',
      // TODO: Enable once the redux-thunk types are properly typed
      '@typescript-eslint/await-thenable': 'off',
    },
  }
  