diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000000000000000000000000000000000000..82a9a730d1eb49a60b39ab7be3194025c4891533 --- /dev/null +++ b/.eslintignore @@ -0,0 +1 @@ +.eslintrc.js \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js index 58fb1759f8f8aa785f3b9c88d0066b89c1f30ffb..bf7a39a5c36d8a9ace0a301ddd48cac09db1075f 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,12 +1,13 @@ module.exports = { - parser: '@typescript-eslint/parser', // Specifies the ESLint parser extends: [ - 'plugin:react/recommended', // Uses the recommended rules from @eslint-plugin-react + 'eslint:recommended', 'prettier', // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier + 'plugin:react/recommended', // Uses the recommended rules from @eslint-plugin-react 'plugin:prettier/recommended', // Enables eslint-plugin-prettier and displays prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array. 'plugin:react-hooks/recommended', ], - plugins: ['react', '@typescript-eslint'], // Enable TypeScript plugin + parser: '@typescript-eslint/parser', // Specifies the ESLint parser + plugins: ['@typescript-eslint', 'react', 'react-hooks'], parserOptions: { ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features sourceType: 'module', // Allows for the use of imports @@ -19,14 +20,11 @@ module.exports = { root: true, overrides: [ { + files: ['**/*.{ts,tsx}'], extends: [ 'plugin:@typescript-eslint/recommended', - 'plugin:@typescript-eslint/stylistic', + 'plugin:@typescript-eslint/stylistic-type-checked', ], - files: ['**/*.{ts,tsx}'], - parserOptions: { - project: true, - }, rules: { '@typescript-eslint/explicit-function-return-type': 'off', '@typescript-eslint/no-unused-vars': 'warn',