Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions __tests__/index-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,12 @@ test('schemas', (t) => {

t.end();
});

test('plugin referentially equal to prevent flat config issues', (t) => {
const keys = Object.keys(plugin.flatConfigs);
for (let i = 0; i < keys.length; i += 1) {
const config = plugin.flatConfigs[keys[i]];
t.equal(plugin, config.plugins['jsx-a11y'], `${config.name}'s plugin reference is referentially equal to the top-level export`);
}
t.end();
});
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -317,4 +317,4 @@ const flatConfigs = {
strict: createConfig(strictRules, 'strict'),
};

module.exports = { ...jsxA11y, configs, flatConfigs };
module.exports = Object.assign(jsxA11y, { configs, flatConfigs });