Skip to content

Commit

Permalink
refactor: only use ts resolver in typescript presets (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcalexiei authored Sep 1, 2024
1 parent 2f21f7e commit ed07e06
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
7 changes: 1 addition & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,22 +203,17 @@ export default [
eslintPluginImportX.flatConfigs.typescript,
{
files: ['**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}'],
ignores: ['eslint.config.js'],
languageOptions: {
parser: tsParser,
ecmaVersion: 'latest',
sourceType: 'module',
},
ignores: ['eslint.config.js'],
rules: {
'no-unused-vars': 'off',
'import/no-dynamic-require': 'warn',
'import/no-nodejs-modules': 'warn',
},
settings: {
'import-x/resolver': {
typescript: true,
},
},
},
]
```
Expand Down
4 changes: 1 addition & 3 deletions src/config/flat/typescript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ export default {
'@typescript-eslint/parser': [...typeScriptExtensions],
},
'import-x/resolver': {
node: {
extensions: allExtensions,
},
typescript: true,
},
},
rules: {
Expand Down
4 changes: 1 addition & 3 deletions src/config/typescript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ export = {
'@typescript-eslint/parser': [...typeScriptExtensions],
},
'import-x/resolver': {
node: {
extensions: allExtensions,
},
typescript: true,
},
},
rules: {
Expand Down

0 comments on commit ed07e06

Please sign in to comment.