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

feat: Check order of sub-properties #1054

Open
regseb opened this issue Jun 7, 2023 · 0 comments
Open

feat: Check order of sub-properties #1054

regseb opened this issue Jun 7, 2023 · 0 comments

Comments

@regseb
Copy link
Contributor

regseb commented Jun 7, 2023

Check order of sub-properties with prefer-property-order. Example with sub-properties of exports to check that types comes first and default comes last (I had a problem because I had positioned types after default):

{
  "rules": {
    "prefer-property-order": ["error", [
      "...",
      "files",
      "exports",
      "exports.types",
      "exports.deno",
      "exports.browser",
      "exports.react-native",
      "exports.node-addons",
      "exports.node",
      "exports.import",
      "exports.require",
      "exports.default",
      "main",
      "..."
    ]]
  }
}

Other sub-properties:

[
  "bugs.url",
  "bugs.email",

  "license.type",
  "license.url",

  "author.name",
  "author.email",
  "author.url",

  "funding.type",
  "funding.url",

  "repository.type",
  "repository.url",
  "repository.directory"
]
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

No branches or pull requests

1 participant