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

Feature request: no-main Rule #740

Open
haysclark opened this issue Jul 13, 2022 · 0 comments
Open

Feature request: no-main Rule #740

haysclark opened this issue Jul 13, 2022 · 0 comments

Comments

@haysclark
Copy link

When reporting a bug, please include:

It would be handy for projects that are not libraries to enforce that main is not set in package manager.

Use case

When using GatsbyJS, if the projects 'package.json' includes main then it will throw a Compilation error.

package.json snippet

{
  "main": "n/a",
}

GatsbyJS CLI output

ERROR #11901  COMPILATION
  Failed to compile Gatsby files (@parcel/core):

  Unexpected output file type  in target "main". File extension must be .js, .mjs, or .cjs

  Hints:
  - The "main" field is meant for libraries. If you meant to output a  file, either remove the "main" field or choose a different target name.
@haysclark haysclark changed the title Feature request: new no-main Rule Feature request: no-main Rule Jul 13, 2022
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