module.exports = { env: { es6: true, node: true, jest: true, }, extends: [ 'eslint:recommended', 'plugin:react/recommended', 'plugin:@typescript-eslint/eslint-recommended', 'plugin:@typescript-eslint/recommended', 'plugin:@typescript-eslint/recommended-requiring-type-checking', 'plugin:jsdoc/recommended-error', ], globals: { Atomics: 'readonly', SharedArrayBuffer: 'readonly', }, parser: '@typescript-eslint/parser', parserOptions: { project: './tsconfig.json', ecmaFeatures: { jsx: true, }, ecmaVersion: 2018, sourceType: 'module', }, plugins: [ 'react', 'react-hooks', '@typescript-eslint', 'unused-imports', 'import', 'functional', 'unicorn', ], rules: { indent: ['error', 2, { SwitchCase: 1 }], 'linebreak-style': ['error', 'unix'], quotes: ['error', 'single'], semi: ['error', 'always'], '@typescript-eslint/no-empty-function': 'off', '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/no-unused-vars': 'off', '@typescript-eslint/consistent-type-imports': 'error', '@typescript-eslint/require-await': 'error', '@typescript-eslint/member-ordering': [ 'error', { default: ['field', 'signature', 'constructor', 'method'], }, ], '@typescript-eslint/method-signature-style': ['error', 'method'], '@typescript-eslint/unbound-method': 'off', 'react/display-name': 'off', 'react/react-in-jsx-scope': 'off', 'react/jsx-no-useless-fragment': 'error', 'react/jsx-handler-names': [ 'error', { eventHandlerPrefix: 'handle', eventHandlerPropPrefix: 'on', }, ], 'unused-imports/no-unused-imports': 'error', 'import/order': [ 'error', { groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'], alphabetize: { order: 'asc', caseInsensitive: true }, pathGroups: [ { pattern: 'react**', group: 'external', position: 'before', }, ], pathGroupsExcludedImportTypes: ['builtin'], }, ], 'import/exports-last': 'error', 'functional/prefer-readonly-type': [ 'error', { allowLocalMutation: true, allowMutableReturnType: true, ignoreClass: true, }, ], 'unicorn/no-null': 'error', 'require-await': 'off', eqeqeq: 'error', 'no-empty-function': 'off', semi: 'off', complexity: 'error', 'max-depth': 'error', }, settings: { react: { version: 'detect', }, }, }