Support relative imports in packages (#234)

* Update tsconfigs

* Add ESLint support for relative paths
This commit is contained in:
Pavel 2022-03-02 18:08:35 +01:00 committed by GitHub
parent 3aba1ec88a
commit c1f9fc9f9f
No known key found for this signature in database
GPG Key ID: 0EB8D75C775AB6F1
3 changed files with 16 additions and 4 deletions

View File

@ -3,6 +3,8 @@
"parser": "@typescript-eslint/parser",
"parserOptions": {
// TODO: Enable type-aware linting (https://typescript-eslint.io/docs/linting/type-linting)
// "tsconfigRootDir": ".",
// "project": ["./packages/*/tsconfig.json"],
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
@ -70,10 +72,12 @@
},
"import/resolver": {
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx"]
"extensions": [".js", ".jsx", ".ts", ".tsx"],
"project": ["tsconfig.base.json", "packages/*/tsconfig.json"]
},
"typescript": {
"alwaysTryTypes": true
"alwaysTryTypes": true,
"project": ["tsconfig.base.json", "packages/*/tsconfig.json"]
}
}
}

View File

@ -3,6 +3,10 @@
"include": ["src"],
"compilerOptions": {
"outDir": "dist",
"declarationDir": "dist/types"
"declarationDir": "dist/types",
"baseUrl": ".",
"paths": {
"~/*": ["./*"]
}
}
}

View File

@ -4,6 +4,10 @@
"compilerOptions": {
"outDir": "./dist",
"declarationDir": "dist/types",
"resolveJsonModule": true
"resolveJsonModule": true,
"baseUrl": ".",
"paths": {
"~/*": ["./*"]
}
}
}