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

Use "extends" in tsconfig.json #143

Closed
karlhorky opened this issue Aug 5, 2022 · 1 comment
Closed

Use "extends" in tsconfig.json #143

karlhorky opened this issue Aug 5, 2022 · 1 comment
Assignees

Comments

@karlhorky
Copy link
Member

To simplify the config file tsconfig.json, we can use the "extends" key to refer to a base configuration file.

Example: expo/expo#11680

@karlhorky karlhorky self-assigned this Aug 5, 2022
@karlhorky
Copy link
Member Author

Unfortunately, we need to use these brittle relative paths in our configuration:

"include": [
"../../../**/.eslintrc.cjs",
"../../../next-env.d.ts",
"../../../**/*.ts",
"../../../**/*.tsx",
"../../../**/*.js",
"../../../**/*.jsx",
"../../../**/*.cjs",
"../../../**/*.mjs"
],
"exclude": ["../../../node_modules", "../../../build"]

That's because TypeScript doesn't have an easy way to refer to the "root directory" from an "extends" config, asked about that here:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant