Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement aliasing and standardize imports #1

Open
Atomic71 opened this issue Dec 10, 2023 · 1 comment
Open

Implement aliasing and standardize imports #1

Atomic71 opened this issue Dec 10, 2023 · 1 comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@Atomic71
Copy link
Owner

Atomic71 commented Dec 10, 2023

Babel and TsConfig should be configured to use some aliasing system as opposed to relative path to get to things

@Atomic71 Atomic71 added help wanted Extra attention is needed good first issue Good for newcomers labels Dec 10, 2023
@gegeke
Copy link
Collaborator

gegeke commented Jan 3, 2024

Adding the tsconfig (packages/tsconfig/base.json in this case, after this discussion) entries is pretty straightforward, for example

"compilerOptions": {
    "composite": false,
    "declaration": true,
    "declarationMap": true,
    "esModuleInterop": true,
    "forceConsistentCasingInFileNames": true,
    "inlineSources": false,
    "isolatedModules": true,
    "moduleResolution": "node",
    "noUnusedLocals": false,
    "noUnusedParameters": false,
    "preserveWatchOutput": true,
    "skipLibCheck": true,
    "strict": true,
-    "strictNullChecks": true
+    "strictNullChecks": true,
+    "baseUrl": ".",
+    "paths": {
+      "@web/*": ["../../apps/web/*"],
+      "@docs/*": ["../../apps/docs/*"]
+    }
  },

with this, everything seems to be OK:
image

Note:

  • You have to pnpm i, as the config files are moved to the node_modules with that command, and the dependencies are directed there.
  • gegeke/adding-ts-aliases branch is the suggestion (eslintrc.js is modified temporarily - rules should be turned back to error, when those ESLint issues are solved)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants