diff --git a/CommonConfig.mjs b/CommonConfig.mjs index 2a5a4b5..207d4b8 100644 --- a/CommonConfig.mjs +++ b/CommonConfig.mjs @@ -5,6 +5,7 @@ import ImportNewlinesPlugin from "eslint-plugin-import-newlines"; import JsdocPlugin from "eslint-plugin-jsdoc"; import NoAutofixPlugin from "eslint-plugin-no-autofix"; import SimpleImportSortPlugin from "eslint-plugin-simple-import-sort"; +import SortKeysPlusPlugin from "eslint-plugin-sort-keys-plus"; const CommonConfig = { @@ -18,6 +19,7 @@ const CommonConfig = { "jsdoc": JsdocPlugin, "no-autofix": NoAutofixPlugin, "simple-import-sort": SimpleImportSortPlugin, + "sort-keys-plus": SortKeysPlusPlugin, }, rules: { "accessor-pairs": ["error"], @@ -356,7 +358,8 @@ const CommonConfig = { }, ], "sort-imports": ["off"], - "sort-keys": [ + "sort-keys": ["off"], + "sort-keys-plus/sort-keys": [ "warn", "asc", {allowLineSeparatedGroups: true, caseSensitive: true, minKeys: 5, natural: true}, diff --git a/StylisticConfigArray.mjs b/StylisticConfigArray.mjs index eabf43e..026bc78 100644 --- a/StylisticConfigArray.mjs +++ b/StylisticConfigArray.mjs @@ -96,7 +96,7 @@ const StylisticConfigArray = [ ], "@stylistic/lines-around-comment": [ "error", - /* eslint-disable sort-keys */ + /* eslint-disable sort-keys-plus/sort-keys */ { ignorePattern: "c8|Enum", beforeBlockComment: true, @@ -123,7 +123,7 @@ const StylisticConfigArray = [ allowTypeStart: true, allowTypeEnd: true, }, - /* eslint-enable sort-keys */ + /* eslint-enable sort-keys-plus/sort-keys */ ], "@stylistic/lines-between-class-members": ["error"], "@stylistic/max-len": [ diff --git a/package-lock.json b/package-lock.json index cf66b8a..8240b40 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,6 +19,7 @@ "eslint-plugin-react": "^7.37.3", "eslint-plugin-react-hooks": "^5.1.0", "eslint-plugin-simple-import-sort": "^12.1.1", + "eslint-plugin-sort-keys-plus": "^1.4.0", "globals": "^15.14.0", "typescript-eslint": "8.19.0" } @@ -2044,6 +2045,20 @@ "eslint": ">=5.0.0" } }, + "node_modules/eslint-plugin-sort-keys-plus": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-sort-keys-plus/-/eslint-plugin-sort-keys-plus-1.4.0.tgz", + "integrity": "sha512-4MsaETpu8+Atfhp3kyz+vu5ATHfst/vkAhVFUkzEDDgq39jpecGAbSVNGKd0OfDK7TDLGoeNzxnCLrMM06zvNg==", + "license": "ISC", + "peer": true, + "dependencies": { + "escape-string-regexp": "^4.0.0", + "natural-compare": "^1.4.0" + }, + "engines": { + "node": ">=14" + } + }, "node_modules/eslint-rule-composer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/eslint-rule-composer/-/eslint-rule-composer-0.3.0.tgz", diff --git a/package.json b/package.json index fce6819..210c39b 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,7 @@ "eslint-plugin-react": "^7.37.3", "eslint-plugin-react-hooks": "^5.1.0", "eslint-plugin-simple-import-sort": "^12.1.1", + "eslint-plugin-sort-keys-plus": "^1.4.0", "globals": "^15.14.0", "typescript-eslint": "8.19.0" }