Skip to content

Commit

Permalink
fix: expose plugin.configs in types
Browse files Browse the repository at this point in the history
  • Loading branch information
fasttime committed Nov 12, 2024
1 parent 72273f5 commit ee7f2a2
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,21 @@ const plugin = {
"no-empty-keys": noEmptyKeys,
"no-unsafe-values": noUnsafeValues,
},
configs: {},
};

Object.assign(plugin.configs, {
recommended: {
plugins: { json: plugin },
rules: {
"json/no-duplicate-keys": "error",
"json/no-empty-keys": "error",
"json/no-unsafe-values": "error",
configs: {
recommended: {
plugins: {
get json() {
return plugin;
},
},
rules: {
"json/no-duplicate-keys": "error",
"json/no-empty-keys": "error",
"json/no-unsafe-values": "error",
},
},
},
});
};

export default plugin;
export { JSONLanguage, JSONSourceCode };

0 comments on commit ee7f2a2

Please sign in to comment.