You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 typein 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.
The text was updated successfully, but these errors were encountered:
haysclark
changed the title
Feature request: new no-main Rule
Feature request: no-main Rule
Jul 13, 2022
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
GatsbyJS CLI output
The text was updated successfully, but these errors were encountered: