Skip to content

@types/json-schema as direct dependency #441

@Badisi

Description

@Badisi

Which packages are affected?

  • @eslint/compat
  • @eslint/config-array
  • @eslint/config-helpers
  • @eslint/core
  • @eslint/mcp
  • @eslint/migrate-config
  • @eslint/object-schema
  • @eslint/plugin-kit

Environment

Node v24.14.1
MacOS

What did you do?

Package @eslint/core has @types/json-schema as a direct dependency:

"dependencies": {
"@types/json-schema": "^7.0.15"
},

I don't think this is intentional because usually types are not direct dependencies.

What did you expect to happen?

@types/json-schema should be a devDependency.

What actually happened?

I've spotted this while trying to build my own plugin for eslint.
I'm importing a few types from @eslint/core (like ConfigObject, RulesConfig) and due to this tsdown is actually bundling types from json-schema into my d.ts too.

Participation

  • I am willing to submit a pull request for this issue.

AI acknowledgment

  • I did not use AI to generate this issue report.
  • (If the above is not checked) I have reviewed the AI-generated content before submitting.

Additional comments

I remember reading somewhere that package eslint/config was chosen for being the package reference for types.

  • So it's true that I could use import { Config } from 'eslint/config' instead of import { ConfigObject } from '@eslint/core'
  • But then it might be worth adding a Rule type into eslint/config too

PS: it doesn't fix the issue here, it's just an additional improvement I'm thinking of 😉

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingrepro:neededThis issue should include a reproducible example

Type

No type
No fields configured for issues without a type.

Projects

Status

Triaging

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions