module.exports = { plugins: ['react-refresh'], extends: [ // By extending from a plugin config, we can get recommended rules without having to add them manually. 'eslint:recommended', 'plugin:react/recommended', 'plugin:import/recommended', 'plugin:import/typescript', 'plugin:jsx-a11y/recommended', 'plugin:@typescript-eslint/recommended', // 'plugin:react-refresh/recommended', // This disables the formatting rules in ESLint that Prettier is going to be responsible for handling. // Make sure it's always the last config, so it gets the chance to override other configs. 'eslint-config-prettier' ], settings: { react: { // Tells eslint-plugin-react to automatically detect the version of React to use. version: 'detect' }, // Tells eslint how to resolve imports 'import/resolver': { node: { paths: ['src'], extensions: ['.js', '.jsx', '.ts', '.tsx'] }, typescript: { alwaysTryTypes: true // always try to resolve types under `@types` directory even it doesn't contain any source code, like `@types/unist` } } }, parserOptions: { project: ['tsconfig.json'], createDefaultProgram: true }, rules: { // Add your own rules here to override ones from the extended configs. 'react/react-in-jsx-scope': 'off', '@typescript-eslint/no-explicit-any': 'off', 'jsx-a11y/no-autofocus': 'off', 'react-refresh/only-export-components': 'off', 'no-console': 'warn', 'react/prop-types': 'off', 'react/self-closing-comp': 'warn', '@typescript-eslint/consistent-type-definitions': ['off', 'type'], '@typescript-eslint/explicit-function-return-type': 'off' } };