Update TypeScript and ESLint configs for compatibility #5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This PR makes some changes in reaction to integrating these configs into viamrobotics/prime.
@viamrobotics/typescript-config
specifies exportstsconfig.json
files from being published in the modulesI tested these changes locally with Prime.
Changelog
TypeScript
Lesson no. 1 from integrating the common configs into a project: the TypeScript config world is not yet ready for
packageJson.exports
. Support intsc
itself is barely there in v5 (e.g. see microsoft/TypeScript#53314), and other related tooling - like get-tsconfig, used in eslint-plugin-import - completely chokes on it.This PR updates the TypeScript config package to remove
exports
, so package consumers can specify file paths directly, and updates the documentation. It's less neat, but more pragmatic.ESLint
no-duplicate-imports
, it's redundant with the already enabledimport/no-duplicates
and is annoying about type importsno-use-before-define
with type-aware@typescript-eslint/no-use-before-define
and configure to only catch actual errors