Add `eslintConfig` to `PackageJson` type
pting-me opened this issue · 5 comments
ESLint allows their configuration to be stored within the package.json
. Seeing as TypeScript and Yarn configs are added, I think ESLint deserves a spot there as well.
Upvote & Fund
- We're using Polar.sh so you can upvote and help fund this issue.
- The funding will be given to active contributors.
- Thank you in advance for helping prioritize & fund our backlog.
We cannot possible support every config that can be put into package.json. We support TypeScript as it's only 3 fields and very popular. So not sure about this one.
Do you actually need this or are did you just notice it was missing?
I agree with @sindresorhus, at most it would be as part of something like PackageJsonExtras
, but also nothing stopping eg ESLint themselves to publish a type for their property, which would be even better than us maintaining it here 👍
Have you tried asking the ESLint project? If they reject the idea, then we can revisit it here?
Yeah I actually do need this for another project. I've done my own implementation for the time being.
There is a definition in @types/eslint
for their configuration object: Linter.Config
. I'm proposing that the PackageJson
include a property eslintConfig
that points to that type. I just noticed you don't have any dependencies on other @types
packages, so wanted to check in if that was a specific design decision. Otherwise, the change should be fairly simple, and I can raise a PR.
@voxpelli makes a good point about having some sort of PackageJsonExtras
. Perhaps we should consider that for other possible package.json
additions (including this one). Thoughts?