-
-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Description
π I'm a big fan of this plugin and use it in http://github.com/JoshuaKGoldberg/template-typescript-node-package to sort package.json contents. Thanks for making it!
Turns out sometimes package.json content ordering does matter. Per https://www.typescriptlang.org/docs/handbook/esm-node.html#packagejson-exports-imports-and-self-referencing, the types resolution under "exports" > "." must come first:
Would you be open to a config option allowing to exclude certain object property paths? Maybe:
module.exports = {
overrides: [
{
files: "*.json",
parser: "jsonc-eslint-parser",
rules: {
"jsonc/sort-keys": [
"error",
{
ignore: ["exports", "."],
},
],
},
},
],
};...I'm not confident in that ignore: string[] format. But can't think of a better option right now. π€
Potentially relevant: typescript-eslint/typescript-eslint#6017
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed