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

feat(cli): check command #170

Merged
merged 20 commits into from
Apr 5, 2024
Merged

feat(cli): check command #170

merged 20 commits into from
Apr 5, 2024

Conversation

JoviDeCroock
Copy link
Member

Summary

Addresses part of #76

This adds gql.tada check --severity error which gets the current TS Project and runs the diagnostics from the LSP project

Copy link

changeset-bot bot commented Apr 4, 2024

🦋 Changeset detected

Latest commit: 105550e

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@JoviDeCroock JoviDeCroock marked this pull request as ready for review April 4, 2024 19:05
packages/internal/src/diagnostics/index.ts Outdated Show resolved Hide resolved
packages/cli-utils/src/index.ts Outdated Show resolved Hide resolved
packages/cli-utils/src/index.ts Outdated Show resolved Hide resolved
packages/cli-utils/src/index.ts Outdated Show resolved Hide resolved
Copy link
Member

@kitten kitten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think anything's strictly blocking the merge, assuming we'll keep iterating, so nothing here blocks this and we're good to go on the main implementation

Comment on lines 31 to 33
const project = new Project({
tsConfigFilePath: './tsconfig.json',
});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question (not a blocker): I'm a bit concerned about this being hardcoded to ./tsconfig.json. And the same goes for other parts of the CLI using mainly ${CWD}/tsconfig.json.

I tested new Project() and it seems to indeed not trigger the resolver, so todo here to figure out resolver, which could be grouped with the polishing task to figure out reusing TsConfigResolver from @ts-morph/common, and then to also get to replacing resolveTypeScriptRootDir with something externally maintained, as discussed 🤔 ❤️

examples/example-pokemon-api/package.json Outdated Show resolved Hide resolved
packages/cli-utils/package.json Outdated Show resolved Hide resolved
@JoviDeCroock JoviDeCroock force-pushed the check-command branch 2 times, most recently from 3997f8b to 575e5f7 Compare April 5, 2024 11:00
@JoviDeCroock JoviDeCroock merged commit 9735dc6 into main Apr 5, 2024
1 check passed
@JoviDeCroock JoviDeCroock deleted the check-command branch April 5, 2024 11:03
@github-actions github-actions bot mentioned this pull request Apr 5, 2024
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

Successfully merging this pull request may close these issues.

None yet

2 participants