-
Notifications
You must be signed in to change notification settings - Fork 30
Support ESLint 9.x #77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
+1 would also love this |
For those who want to use this plugin before it officially support v9, set this up: // @ts-check
import pluginJs from "@eslint/js";
import { config as typedConfig, configs as tsConfigs } from "typescript-eslint";
import typescriptSortKeys from "eslint-plugin-typescript-sort-keys";
export default typedConfig(
{ ignores: ["node_modules"] },
pluginJs.configs.recommended,
{
languageOptions: {
parserOptions: {
projectService: true,
ecmaVersion: "latest",
sourceType: "module",
tsconfigRootDir: import.meta.dirname,
},
},
},
{
files: ["**/*.ts"],
extends: [...tsConfigs.strictTypeChecked],
},
{
plugins: {
"typescript-sort-keys": typescriptSortKeys,
},
rules: {
"typescript-sort-keys/interface": "error",
"typescript-sort-keys/string-enum": "error",
},
}
); The installation progress will warn you that the version is incompatible but it's fine. |
@moontai0724 any workaround for the below? (i have the config you provided)
|
@skilbjo I've updated to my current version and also uploaded a workaround here: https://github.com/moontai0724/workaround-eslint-v9-sort-keys/blob/main/eslint.config.js |
FYI there’s also https://perfectionist.dev/ which seems pretty feature-complete and can handle most other types of sorting too |
@FlorianWendelborn oh my, that seems FANTASTIC! |
@infctr would you accept a PR for this? |
Similar to #42
It would be great to officially support ESLint v9.x now that it has been released.
The text was updated successfully, but these errors were encountered: