fix: eslint-plugin-import support TypeScript (#77)

Co-authored-by: CondorHero <love2xinwei@gmail.com>
This commit is contained in:
CondorHero 2022-03-31 22:19:07 +08:00 committed by GitHub
parent 25668d5d1c
commit 5f05cfcfd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -35,7 +35,7 @@ module.exports = {
], ],
settings: { settings: {
'import/resolver': { 'import/resolver': {
node: { extensions: ['.js', '.mjs', '.ts', '.d.ts'] }, node: { extensions: ['.js', '.mjs'] },
}, },
}, },
overrides: [ overrides: [

View File

@ -4,8 +4,14 @@ const basic = require('@antfu/eslint-config-basic')
module.exports = { module.exports = {
extends: [ extends: [
'@antfu/eslint-config-basic', '@antfu/eslint-config-basic',
'plugin:import/typescript',
'plugin:@typescript-eslint/recommended', 'plugin:@typescript-eslint/recommended',
], ],
settings: {
'import/resolver': {
node: { extensions: ['.js', '.jsx', '.mjs', '.ts', '.tsx', '.d.ts'] },
},
},
overrides: basic.overrides, overrides: basic.overrides,
rules: { rules: {
'import/named': 'off', 'import/named': 'off',