Skip to content

Commit

Permalink
fix: added name attribute for eslint config inspector
Browse files Browse the repository at this point in the history
  • Loading branch information
NishargShah authored Jan 24, 2025
1 parent 826d8c9 commit a04205f
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { onlyExportComponents } from "./only-export-components.ts";
export const rules = {
"only-export-components": onlyExportComponents,
};

const plugin = { rules };

export const configs = {
Expand All @@ -21,5 +22,16 @@ export const configs = {
},
};

export const flatConfigs = Object.entries(configs).reduce((acc, value) => {
const [type, config] = value;

acc[type] = {
...config,
name: `react-refresh/${type}`
};

return acc;
}, {});

// Probably not needed, but keep for backwards compatibility
export default { rules, configs };
export default { rules, configs, flatConfigs };

0 comments on commit a04205f

Please sign in to comment.