Support relative imports in packages (#234)
* Update tsconfigs * Add ESLint support for relative paths
This commit is contained in:
parent
8bde2a6fc5
commit
f14a029da6
|
@ -3,6 +3,8 @@
|
||||||
"parser": "@typescript-eslint/parser",
|
"parser": "@typescript-eslint/parser",
|
||||||
"parserOptions": {
|
"parserOptions": {
|
||||||
// TODO: Enable type-aware linting (https://typescript-eslint.io/docs/linting/type-linting)
|
// TODO: Enable type-aware linting (https://typescript-eslint.io/docs/linting/type-linting)
|
||||||
|
// "tsconfigRootDir": ".",
|
||||||
|
// "project": ["./packages/*/tsconfig.json"],
|
||||||
"sourceType": "module",
|
"sourceType": "module",
|
||||||
"ecmaFeatures": {
|
"ecmaFeatures": {
|
||||||
"jsx": true
|
"jsx": true
|
||||||
|
@ -70,10 +72,12 @@
|
||||||
},
|
},
|
||||||
"import/resolver": {
|
"import/resolver": {
|
||||||
"node": {
|
"node": {
|
||||||
"extensions": [".js", ".jsx", ".ts", ".tsx"]
|
"extensions": [".js", ".jsx", ".ts", ".tsx"],
|
||||||
|
"project": ["tsconfig.base.json", "packages/*/tsconfig.json"]
|
||||||
},
|
},
|
||||||
"typescript": {
|
"typescript": {
|
||||||
"alwaysTryTypes": true
|
"alwaysTryTypes": true,
|
||||||
|
"project": ["tsconfig.base.json", "packages/*/tsconfig.json"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,10 @@
|
||||||
"include": ["src"],
|
"include": ["src"],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "dist",
|
"outDir": "dist",
|
||||||
"declarationDir": "dist/types"
|
"declarationDir": "dist/types",
|
||||||
|
"baseUrl": ".",
|
||||||
|
"paths": {
|
||||||
|
"~/*": ["./*"]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,10 @@
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "./dist",
|
"outDir": "./dist",
|
||||||
"declarationDir": "dist/types",
|
"declarationDir": "dist/types",
|
||||||
"resolveJsonModule": true
|
"resolveJsonModule": true,
|
||||||
|
"baseUrl": ".",
|
||||||
|
"paths": {
|
||||||
|
"~/*": ["./*"]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue