Closed christopherschroer closed 6 months ago
I created a PR: https://github.com/mthadley/eslint-plugin-sort-destructure-keys/pull/267
To test it out before it is merged: npm i eslint-plugin-sort-destructure-keys@github:ptb/eslint-plugin-sort-destructure-keys
Thanks for the help, @ptb! In my testing everything seems to work fine with eslint@9
, and so this has been published in 1.6.0
.
Marking as resolved, but please let me know if anyone notices any other issues.
Can I just verify how to use this library with ESLint 9. This is what I did, but I'm not sure if this is the proper way
import tsEslint from 'typescript-eslint';
import react from 'eslint-plugin-react';
import { rules as sortDestructureKeys } from 'eslint-plugin-sort-destructure-keys';
export default tsEslint.config(
...tsEslint.configs.recommended,
{
plugins: {
'@typescript-eslint': tsEslint.plugin,
react,
'sort-destructure-keys': {
rules: sortDestructureKeys,
},
}
}
}
Can I just verify how to use this library with ESLint 9. This is what I did, but I'm not sure if this is the proper way
import tsEslint from 'typescript-eslint'; import react from 'eslint-plugin-react'; import { rules as sortDestructureKeys } from 'eslint-plugin-sort-destructure-keys'; export default tsEslint.config( ...tsEslint.configs.recommended, { plugins: { '@typescript-eslint': tsEslint.plugin, react, 'sort-destructure-keys': { rules: sortDestructureKeys, }, } } }
I thought you may try this approach, which works properly on my end.
import tsEslint from 'typescript-eslint';
import react from 'eslint-plugin-react';
import eslintPluginSortDestructureKeys from 'eslint-plugin-sort-destructure-keys';
export default tsEslint.config(
...tsEslint.configs.recommended,
{
plugins: {
'@typescript-eslint': tsEslint.plugin,
react,
'sort-destructure-keys': eslintPluginSortDestructureKeys,
}
}
}
I thought you may try this approach, which works properly on my end.
import tsEslint from 'typescript-eslint'; import react from 'eslint-plugin-react'; import eslintPluginSortDestructureKeys from 'eslint-plugin-sort-destructure-keys'; export default tsEslint.config( ...tsEslint.configs.recommended, { plugins: { '@typescript-eslint': tsEslint.plugin, react, 'sort-destructure-keys': eslintPluginSortDestructureKeys, } } }
Thanks for your example. I tried this approach but getting the following error:
@ps-20x Hi, were you able to fix the declaration file error. I am facing the same issue but could not figure out a solution
ESlint v9 was recently released
https://eslint.org/blog/2024/04/eslint-v9.0.0-released/
It includes breaking changes for plugins
https://eslint.org/docs/latest/use/migrate-to-9.0.0#breaking-changes-for-plugin-developers
Could support for ESLint v9 be added to this plugin?