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

Add eslintConfig to PackageJson type #371

Closed
pting-me opened this issue Mar 6, 2022 · 5 comments · Fixed by #372
Closed

Add eslintConfig to PackageJson type #371

pting-me opened this issue Mar 6, 2022 · 5 comments · Fixed by #372

Comments

@pting-me
Copy link
Contributor

pting-me commented Mar 6, 2022

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.
Fund with Polar
@sindresorhus
Copy link
Owner

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.

@sindresorhus
Copy link
Owner

Do you actually need this or are did you just notice it was missing?

@voxpelli
Copy link
Collaborator

voxpelli commented Mar 6, 2022

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?

@pting-me
Copy link
Contributor Author

pting-me commented Mar 6, 2022

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?

@voxpelli
Copy link
Collaborator

voxpelli commented Mar 8, 2022

Added comment to #372, lets keep the discussion there then

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 a pull request may close this issue.

3 participants