Skip to content

Add eslintConfig to PackageJson type #371

Closed

Description

@pting-me

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.

Activity

  1. sindresorhus commented on Mar 6, 2022

    @sindresorhus
    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.

  2. sindresorhus commented on Mar 6, 2022

    @sindresorhus
    Owner

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

  3. voxpelli commented on Mar 6, 2022

    @voxpelli
    Collaborator

    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?

  4. pting-me commented on Mar 6, 2022

    @pting-me
    Author

    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?

  5. voxpelli commented on Mar 8, 2022

    @voxpelli
    Collaborator

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions