text: module.exports = {
    env: {
      browser: true,
      es6: true,
      node: true,
      'jest/globals': true
    },
    extends: [
      'eslint:recommended',
      'plugin:react/recommended',
      'plugin:jsx-a11y/recommended',
      'plugin:jest/recommended',
      'airbnb',
      'plugin:import/errors',
      'plugin:import/warnings',
      'plugin:import/typescript',
      'plugin:@typescript-eslint/eslint-recommended',
      'plugin:@typescript-eslint/recommended',
      'plugin:prettier/recommended',
      'prettier',
      'prettier/@typescript-eslint',
      'prettier/react',
      'prettier/standard'
    ],
    globals: {
      Atomics: 'readonly',
      SharedArrayBuffer: 'readonly',
      __DEV__: true
    },
    parser: '@typescript-eslint/parser',
    parserOptions: {
      ecmaFeatures: {
        jsx: true
      },
      project: './tsconfig.json',
      sourceType: 'module'
    },
    plugins: [
      '@typescript-eslint',
      'import',
      'jest',
      'jsx-a11y',
      'prefer-arrow',
      'prettier',
      'react',
      'react-hooks'
    ],
    root: true,
    rules: {
      // eslint official
      'newline-before-return': 'error',
      'no-console': 'warn',
      'no-continue': 'off',
      'require-yield': 'error',
      // for react-app-env.d.ts (https://github.com/facebook/create-react-app/issues/6560)
      'spaced-comment': [
        'error',
        'always',
        {
          markers: ['/']
        }
      ],
  
      // @typescript-eslint
      '@typescript-eslint/explicit-function-return-type': 'off',
      '@typescript-eslint/explicit-member-accessibility': 'off',
      indent: 'off',
      '@typescript-eslint/indent': 'off',
      '@typescript-eslint/no-unnecessary-type-assertion': 'error',
  
      // prefer-arrow
      'prefer-arrow/prefer-arrow-functions': [
        'error',
        {
          disallowPrototype: true,
          singleReturnOnly: true,
          classPropertiesAllowed: false
        }
      ],
  
      // react
      'react/jsx-filename-extension': [
        'error',
        {
          extensions: ['jsx', 'tsx']
        }
      ],
      'react/jsx-props-no-spreading': [
        'warn',
        {
          custom: 'ignore'
        }
      ],
      'react/prop-types': 'off',
      'react/prefer-stateless-function': 'off',
  
      // react hooks
      'react-hooks/rules-of-hooks': 'error',
      'react-hooks/exhaustive-deps': 'error',
  
      // import
      'import/extensions': [
        'error',
        'always',
        {
          js: 'never',
          jsx: 'never',
          ts: 'never',
          tsx: 'never'
        }
      ],
      'import/prefer-default-export': 'off',
      // input label
      'jsx-a11y/label-has-associated-control': [
        'error',
        {
          required: {
            some: ['nesting', 'id']
          }
        }
      ]
    },
    settings: {
      'import/parsers': {
        '@typescript-eslint/parser': ['.ts', '.tsx']
      },
      'import/resolver': {
        node: {
          extensions: ['.js', 'jsx', '.ts', '.tsx'],
          paths: ['src']
        }
      },
      react: {
        version: 'detect'
      }
    }
  };
  