You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .eslintrc.js
+50Lines changed: 50 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -11,12 +11,21 @@ const config = {
11
11
react: {
12
12
version: 'detect',// Tells eslint-plugin-react to automatically detect the version of React to use
13
13
},
14
+
'import/resolver': {
15
+
// Allows eslint-plugin-import to detect resolved imports
16
+
typescript: {
17
+
project: './tsconfig.json',
18
+
},
19
+
},
14
20
},
15
21
extends: [
16
22
'plugin:react/recommended',// Uses the recommended rules from @eslint-plugin-react
17
23
'plugin:@typescript-eslint/recommended',// Uses the recommended rules from the @typescript-eslint/eslint-plugin
18
24
'plugin:prettier/recommended',// Enables eslint-plugin-prettier and eslint-config-prettier. This will display prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
25
+
'plugin:import/recommended',// Used along with eslint-plugin-import to sort imports with recommended standards
26
+
'plugin:import/typescript',// To handle import order cases for typescript files
19
27
],
28
+
plugins: ['import'],
20
29
rules: {
21
30
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
22
31
// e.g. "@typescript-eslint/explicit-function-return-type": "off",
0 commit comments