bluwy / publint

Lint packaging errors
https://publint.dev
MIT License
932 stars 19 forks source link

Add a warning for jsnext field #85

Closed sapphi-red closed 7 months ago

sapphi-red commented 7 months ago

jsnext and jsnext:main fields are superseded by module field (https://github.com/jsforum/jsforum/issues/5, https://github.com/rollup/rollup/wiki/pkg.module#:~:text=(Note%3A%20Tools%20such%20as%20rollup%2Dplugin%2Dnode%2Dresolve%20and%20Webpack%202%20treat%20jsnext%3Amain%20and%20module%20interchangeably.%20They%27re%20the%20same%20thing%2C%20except%20that%20module%20is%20more%20likely%20to%20become%20standardised.)). This PR adds a warning for those fields.

bluwy commented 7 months ago

Actually I realized something. We should downgrade this to a suggestion if "module" is already specified, similar to how the deprecated subpath mapping works: https://github.com/bluwy/publint/issues/62. I can do a quick fix for this.