Open rakleed opened 1 week ago
can i pick this up?
i am already testing it out in v9.14.0
@rakleed it should look something like this
module.exports = {
files: ["**/*.js"],
plugins: {
"sort-destructure-keys": require("eslint-plugin-sort-destructure-keys"),
},
rules: {
"sort-destructure-keys/sort-destructure-keys": [
"error",
{ caseSensitive: true },
],
},
};
I was able to get the plugin to work based on the information in https://github.com/mthadley/eslint-plugin-sort-destructure-keys/issues/266#issuecomment-2154205822, but it would be nice for that information to be in the README. If you do PR, that will be great.
By the way, here is my simplified config for ESM:
import sortDestructureKeys from 'eslint-plugin-sort-destructure-keys';
export default [
{
files: ['**/*.js', '**/*.jsx'],
plugins: {
'sort-destructure-keys': sortDestructureKeys,
},
rules: {
'sort-destructure-keys/sort-destructure-keys': 'error',
},
},
];
As an example of documentation for ESM and CJS, you can look at https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/readme.md#usage-eslintconfigjs
Please add to README information about how to use your plugin in flat config. Now it has information only about usage with eslintrc which is deprecated in ESLint 9.