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

json-schema-to-ts belongs in dependencies #2441

Closed
4 tasks
alecmev opened this issue Jul 25, 2024 · 3 comments · Fixed by #2783
Closed
4 tasks

json-schema-to-ts belongs in dependencies #2441

alecmev opened this issue Jul 25, 2024 · 3 comments · Fixed by #2783
Labels
help wanted Extra attention is needed

Comments

@alecmev
Copy link

alecmev commented Jul 25, 2024

Issue workflow progress

Progress of the issue based on the Contributor Workflow

  • 1. The issue provides a reproduction available on GitHub, Stackblitz or CodeSandbox
  • 2. A failing test has been provided
  • 3. A local solution has been provided
  • 4. A pull request is pending review

Describe the bug

When type-checking a project with @graphql-eslint/eslint-plugin and skipLibCheck: false, I get the following:

node_modules/@graphql-eslint/eslint-plugin/esm/types.d.mts:4:28 - error TS2307: Cannot find module 'json-schema-to-ts' or its corresponding type declarations.
│ 
│ 4 import { JSONSchema } from 'json-schema-to-ts';

To reproduce

Just skipLibCheck: false is enough.

Expected behavior

No errors.

Environment:

  • @graphql-eslint/eslint-plugin: 4.0.0-alpha.0

Additional context

Workaround with Yarn:

packageExtensions:
  '@graphql-eslint/eslint-plugin@*':
    dependencies:
      json-schema-to-ts: ^2

Let me know if you need more details or a reproduction.

@dimaMachina
Copy link
Owner

Hi! I don't think I want to include types dependency in package.json's dependencies, wdyt @dotansimha ?

@dimaMachina dimaMachina added the wontfix This will not be worked on label Nov 16, 2024
@alecmev
Copy link
Author

alecmev commented Nov 24, 2024

At least as an optional peer dependency? Similar discussion in ESLint.

@dimaMachina dimaMachina reopened this Nov 24, 2024
@dimaMachina
Copy link
Owner

LGTM Feel free submit a PR

@dimaMachina dimaMachina added help wanted Extra attention is needed and removed wontfix This will not be worked on labels Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants