diff --git a/tools/ui/node_modules/eslint-config-prettier/LICENSE b/tools/ui/node_modules/eslint-config-prettier/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..4b17469e8038a832051611418c2bf8d569f88c44
--- /dev/null
+++ b/tools/ui/node_modules/eslint-config-prettier/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2017, 2018, 2019, 2020, 2021, 2022, 2023 Simon Lydell and contributors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/tools/ui/node_modules/eslint-config-prettier/README.md b/tools/ui/node_modules/eslint-config-prettier/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..2bdb30c30ebc4ec51c2108ed1c6b5256af412b6c
--- /dev/null
+++ b/tools/ui/node_modules/eslint-config-prettier/README.md
@@ -0,0 +1,928 @@
+# eslint-config-prettier
+
+Turns off all rules that are unnecessary or might conflict with [Prettier].
+
+This lets you use your favorite shareable config without letting its stylistic choices get in the way when using Prettier.
+
+Note that this config _only_ turns rules _off,_ so it only makes sense using it together with some other config.
+
+[prettier]: https://github.com/prettier/prettier
+
+## Installation
+
+1. Install eslint-config-prettier:
+
+ ```shell
+ npm i -D eslint-config-prettier
+ ```
+
+ ```shell
+ yarn add -D eslint-config-prettier
+ ```
+
+ ```shell
+ pnpm add -D eslint-config-prettier
+ ```
+
+ ```shell
+ bun add -D eslint-config-prettier
+ ```
+
+2. Add eslint-config-prettier to your ESLint configuration – either to [eslintrc] or to [eslint.config.js (flat config)].
+
+ - eslintrc: Add `"prettier"` to the "extends" array in your `.eslintrc.*` file. Make sure to put it **last,** so it gets the chance to override other configs.
+
+
+ ```json
+ {
+ "extends": [
+ "some-other-config-you-use",
+ "prettier"
+ ]
+ }
+ ```
+
+ - eslint.config.js (flat config): Import eslint-config-prettier, and put it in the configuration array – **after** other configs that you want to override.
+
+
+ ```js
+ import someConfig from "some-other-config-you-use";
+ // Note the `/flat` suffix here, the difference from default entry is that
+ // `/flat` added `name` property to the exported object to improve
+ // [config-inspector](https://eslint.org/blog/2024/04/eslint-config-inspector/) experience.
+ import eslintConfigPrettier from "eslint-config-prettier/flat";
+
+ export default [
+ someConfig,
+ eslintConfigPrettier,
+ ];
+ ```
+
+3. Finally, run the [CLI helper tool](#cli-helper-tool) to find problems in the `"rules"` sections of your config.
+
+> 👉 Using [eslint-plugin-prettier]? Check out [eslint-plugin-prettier’s recommended config][eslint-plugin-prettier-recommended].
+
+### Plugins
+
+eslint-config-prettier not only turns off _core_ rules, but also some from these plugins automatically:
+
+- [@babel/eslint-plugin]
+- [@stylistic/eslint-plugin]
+- [@typescript-eslint/eslint-plugin]
+- [eslint-plugin-babel]
+- [eslint-plugin-flowtype]
+- [eslint-plugin-react]
+- [eslint-plugin-standard]
+- [eslint-plugin-unicorn]
+- [eslint-plugin-vue]
+
+> ℹ️ Note: You might find guides on the Internet saying you should also extend stuff like `"prettier/react"`. Since version 8.0.0 of eslint-config-prettier, all you need to extend is `"prettier"`! That includes all plugins.
+
+#### eslint.config.js (flat config) plugin caveat
+
+With flat config, _you_ get to decide the plugin name! For example:
+
+```js
+import typescriptEslint from "@typescript-eslint/eslint-plugin";
+import eslintConfigPrettier from "eslint-config-prettier/flat";
+
+export default [
+ {
+ plugins: {
+ // You’d typically use one of the following two:
+ // typescriptEslint: typescriptEslint,
+ // typescriptEslint,
+ // But in this example we give it another name.
+ // It might be tempting to use something shorter like “ts”:
+ ts: typescriptEslint, // 🚨 Don’t do this!
+ },
+ rules: {
+ // With eslintrc, this is _always_ called:
+ // @typescript-eslint/indent
+ // But in eslint.config.js (flat config), the name chosen above in `plugins` is used.
+ "ts/indent": "error", // 🚨 Don’t do this!
+ },
+ },
+ eslintConfigPrettier,
+];
+```
+
+You might expect eslint-config-prettier to turn off `ts/indent`, but it won’t! Because eslint-config-prettier only turns off `@typescript-eslint/indent`. It cannot know what you chose to call the plugin. Same thing for the CLI helper tool.
+
+Simply stick to the official plugin names and you’ll be all good.
+
+If you encounter a shared _config_ that uses a non-standard plugin name, please ask them to use the standard name instead.
+
+### Excluding deprecated rules
+
+Some of the rules that eslint-config-prettier turns off may be deprecated, or even removed from ESLint. **This is perfectly fine,** but if you really need to omit the deprecated and removed rules, you can do so by setting the `ESLINT_CONFIG_PRETTIER_NO_DEPRECATED` environment variable to a non-empty value. For example:
+
+```
+env ESLINT_CONFIG_PRETTIER_NO_DEPRECATED=true npx eslint-find-rules --deprecated index.js
+```
+
+## CLI helper tool
+
+eslint-config-prettier also ships with a little CLI tool to help you check if your configuration contains any rules that are unnecessary or conflict with Prettier. Here’s how to run it:
+
+```
+npx eslint-config-prettier path/to/main.js
+```
+
+(Change `path/to/main.js` to a file that exists in your project.)
+
+### What and why
+
+Now, let’s have a look at what it does and why you might want to use it.
+
+🚨 This eslintrc example has a **conflicting rule** `"indent"` enabled:
+
+
+```json
+{
+ "extends": [
+ "some-other-config-you-use",
+ "prettier"
+ ],
+ "rules": {
+ "indent": "error"
+ }
+}
+```
+
+For eslintrc, while the `"prettier"` config can disable problematic rules in `"some-other-config-you-use"`, it cannot touch `"rules"`! (That’s how ESLint works – it lets you override configs you extend.) The CLI helper tool reports that `"indent"` conflicts with Prettier, so you can remove it. (Which is nice – simplifying your config!)
+
+🚨 This eslint.config.js (flat config) example also has a **conflicting rule** `"indent"` enabled:
+
+```js
+import someConfig from "some-other-config-you-use";
+import eslintConfigPrettier from "eslint-config-prettier/flat";
+
+export default [
+ someConfig,
+ eslintConfigPrettier,
+ {
+ rules: {
+ indent: "error",
+ },
+ },
+];
+```
+
+With the new ESLint “flat config” format, you can control what things override what yourself. One way of solving the above conflict is to reorder the config objects so that eslint-config-prettier is last:
+
+```js
+import someConfig from "some-other-config-you-use";
+import eslintConfigPrettier from "eslint-config-prettier/flat";
+
+export default [
+ someConfig,
+ {
+ rules: {
+ indent: "error",
+ },
+ },
+ eslintConfigPrettier, // eslint-config-prettier last
+];
+```
+
+However, looking at the above config might feel confusing. It looks like we enable the `indent` rule, but in reality it’s disabled thanks to the `eslintConfigPrettier` line below it. Instead you might want to actually have your own rules _after_ eslint-config-prettier and run the CLI helper tool to find out about problems, so you can remove conflicting rules from the config file altogether (simplifying your config).
+
+### Checking multiple files
+
+In theory you need to run the tool for every single file in your project to be 100% sure that there are no conflicting rules, because ESLint supports having different rules for different files. Usually you’ll have about the same rules for all files, so it is good enough to run the command on one file. But if you use [multiple configuration files] or [overrides], you can provide several files to check:
+
+```
+npx eslint-config-prettier index.js test/index.js legacy/main.js
+```
+
+### Exit codes
+
+- 0: No problems found.
+- 1: Unexpected error.
+- 2: Conflicting rules found.
+
+### ESLINT_USE_FLAT_CONFIG environment variable
+
+Just like ESLint itself, you can control the eslint-config-prettier CLI helper tool using the `ESLINT_USE_FLAT_CONFIG` environment variable:
+
+- `ESLINT_USE_FLAT_CONFIG=true`: Only use eslint.config.js (flat config).
+- `ESLINT_USE_FLAT_CONFIG=false`: Only use eslintrc files.
+- Unset or any other value: First try eslint.config.js, then eslintrc.
+
+> **Warning**
+> For eslint.config.js (flat config), the CLI helper tool imports `eslint/use-at-your-own-risk` which may break at any time.
+
+### Legacy
+
+eslint-config-prettier versions before 7.0.0 had a slightly different CLI tool that was run in a different way. For example:
+
+```
+npx eslint --print-config index.js | npx eslint-config-prettier-check
+```
+
+If you find something like that in a tutorial, this is what the command looks like in 7.0.0 or later:
+
+```
+npx eslint-config-prettier index.js
+```
+
+## Special rules
+
+There a few rules that eslint-config-prettier disables that actually can be enabled in some cases.
+
+- Some require certain options. The CLI helper tool validates this.
+- Some require special attention when writing code. The CLI helper tool warns you if any of those rules are enabled, but can’t tell if anything is problematic.
+- Some can cause problems if using [eslint-plugin-prettier] and `--fix`.
+
+For maximum ease of use, the special rules are disabled by default (provided that you include all needed things in `"extends"`). If you want them, you need to explicitly specify them in your ESLint config.
+
+### [arrow-body-style] and [prefer-arrow-callback]
+
+**These rules might cause problems if using [eslint-plugin-prettier] and `--fix`.**
+
+See the [`arrow-body-style` and `prefer-arrow-callback` issue][eslint-plugin-prettier-autofix-issue] for details.
+
+There are a couple of ways to turn these rules off:
+
+- Put `"plugin:prettier/recommended"` in your `"extends"`. That’s [eslint-plugin-prettier’s recommended config][eslint-plugin-prettier-recommended].
+- Put `"prettier/prettier"` in your `"extends"`. (Yes, there’s both a _rule_ called `"prettier/prettier"` and a _config_ called `"prettier/prettier"`.)
+- Remove them from your config or turn them off manually.
+
+It doesn’t matter which approach you use. `"plugin:prettier/recommended"` is probably the easiest.
+
+Note: The CLI tool only reports these as problematic if the `"prettier/prettier"` _rule_ is enabled for the same file.
+
+These rules are safe to use if you don’t use [eslint-plugin-prettier]. In other words, if you run `eslint --fix` and `prettier --write` as separate steps.
+
+### [curly]
+
+**This rule requires certain options.**
+
+If a block (for example after `if`, `else`, `for` or `while`) contains only one statement, JavaScript allows omitting the curly braces around that statement. This rule enforces if or when those optional curly braces should be omitted.
+
+If you use the `"multi-line"` or `"multi-or-nest"` option, the rule can conflict with Prettier.
+
+For example, the `"multi-line"` option allows this line:
+
+
+```js
+if (cart.items && cart.items[0] && cart.items[0].quantity === 0) updateCart(cart);
+```
+
+However, Prettier might consider the line too long and turn it into the following, which the `"multi-line"` option does _not_ allow:
+
+
+```js
+if (cart.items && cart.items[0] && cart.items[0].quantity === 0)
+ updateCart(cart);
+```
+
+If you like this rule, it can be used just fine with Prettier as long as you don’t use the `"multi-line"` or `"multi-or-nest"` option.
+
+Example ESLint configuration:
+
+
+```json
+{
+ "rules": {
+ "curly": ["error", "all"]
+ }
+}
+```
+
+### [lines-around-comment] \(deprecated)
+
+(The following applies to [@stylistic/lines-around-comment], [@stylistic/js/lines-around-comment], [@stylistic/ts/lines-around-comment], and [@typescript-eslint/lines-around-comment] as well.)
+
+**This rule can be used with certain options.**
+
+This rule requires empty lines before and/or after comments. Prettier preserves blank lines, with two exceptions:
+
+- Several blank lines in a row are collapsed into a single blank line. This is fine.
+- Blank lines at the beginning and end of blocks, objects and arrays are always removed. This may lead to conflicts.
+
+By default, ESLint requires a blank line above the comment is this case:
+
+
+```js
+if (result) {
+
+ /* comment */
+ return result;
+}
+```
+
+However, Prettier removes the blank line:
+
+
+```js
+if (result) {
+ /* comment */
+ return result;
+}
+```
+
+If you like this rule, it can be used just fine with Prettier as long as you add some extra configuration to allow comments at the start and end of blocks, objects and arrays.
+
+Example ESLint configuration:
+
+
+```json
+{
+ "rules": {
+ "lines-around-comment": [
+ "error",
+ {
+ "beforeBlockComment": true,
+ "afterBlockComment": true,
+ "beforeLineComment": true,
+ "afterLineComment": true,
+ "allowBlockStart": true,
+ "allowBlockEnd": true,
+ "allowObjectStart": true,
+ "allowObjectEnd": true,
+ "allowArrayStart": true,
+ "allowArrayEnd": true
+ }
+ ]
+ }
+}
+```
+
+### [max-len] \(deprecated)
+
+(The following applies to [@stylistic/max-len], [@stylistic/js/max-len], and [vue/max-len] as well.)
+
+**This rule requires special attention when writing code.**
+
+Usually, Prettier takes care of following a maximum line length automatically. However, there are cases where Prettier can’t do anything, such as for long strings, regular expressions and comments. Those need to be split up by a human.
+
+If you’d like to enforce an even stricter maximum line length policy than Prettier can provide automatically, you can enable this rule. Just remember to keep `max-len`’s options and Prettier’s `printWidth` option in sync.
+
+Keep in mind that you might have to refactor code slightly if Prettier formats lines in a way that the `max-len` rule does not approve of.
+
+Example ESLint configuration:
+
+
+```json
+{
+ "rules": {
+ "max-len": ["error", {"code": 80, "ignoreUrls": true}]
+ }
+}
+```
+
+### [no-confusing-arrow] \(deprecated)
+
+(The following applies to [@stylistic/no-confusing-arrow] and [@stylistic/js/no-confusing-arrow] as well.)
+
+**This rule requires certain options.**
+
+For example, the rule could warn about this line:
+
+
+```js
+var x = a => 1 ? 2 : 3;
+```
+
+With `{allowParens: true}` (the default since ESLint 6.0.0), adding parentheses is considered a valid way to avoid the arrow confusion:
+
+
+```js
+var x = a => (1 ? 2 : 3);
+```
+
+While Prettier keeps those parentheses, it removes them if the line is long enough to introduce a line break:
+
+
+```js
+EnterpriseCalculator.prototype.calculateImportantNumbers = inputNumber =>
+ 1 ? 2 : 3;
+```
+
+With `{allowParens: false}`, ESLint instead suggests switching to an explicit return:
+
+
+```js
+var x = a => { return 1 ? 2 : 3; };
+```
+
+That causes no problems with Prettier.
+
+If you like this rule, it can be used just fine with Prettier as long as the `allowParens` option is off.
+
+Example ESLint configuration:
+
+
+```json
+{
+ "rules": {
+ "no-confusing-arrow": ["error", { "allowParens": false }]
+ }
+}
+```
+
+(Note: The CLI helper tool considers `{allowParens: true}` to be the default, which is the case since ESLint 6.0.0. The tool will produce a warning if you use the default even if you use an older version of ESLint. It doesn’t hurt to explicitly set `{allowParens: false}` even though it is technically redundant. This way you are prepared for a future ESLint upgrade and the CLI tool can be kept simple.)
+
+### [no-mixed-operators] \(deprecated)
+
+(The following applies to [@stylistic/no-mixed-operators] and [@stylistic/js/no-mixed-operators] as well.)
+
+**This rule requires special attention when writing code.**
+
+This rule forbids mixing certain operators, such as `&&` and `||`.
+
+For example, the rule could warn about this line:
+
+
+```js
+var foo = a + b * c;
+```
+
+The rule suggests adding parentheses, like this:
+
+
+```js
+var foo = a + (b * c);
+```
+
+However, Prettier removes many “unnecessary” parentheses, turning it back to:
+
+
+```js
+var foo = a + b * c;
+```
+
+If you want to use this rule with Prettier, you need to split the expression into another variable:
+
+
+```js
+var bar = b * c;
+var foo = a + bar;
+```
+
+Keep in mind that Prettier prints _some_ “unnecessary” parentheses, though:
+
+
+```js
+var foo = (a && b) || c;
+```
+
+Example ESLint configuration:
+
+
+```json
+{
+ "rules": {
+ "no-mixed-operators": "error"
+ }
+}
+```
+
+### [no-tabs] \(deprecated)
+
+(The following applies to [@stylistic/no-tabs] and [@stylistic/js/no-tabs] as well.)
+
+**This rule requires certain options.**
+
+This rule disallows the use of tab characters. By default the rule forbids _all_ tab characters. That can be used just fine with Prettier as long as you don’t configure Prettier to indent using tabs.
+
+Luckily, it’s possible to configure the rule so that it works regardless of whether Prettier uses spaces or tabs: Set `allowIndentationTabs` to `true`. This way Prettier takes care of your indentation, while the `no-tabs` takes care of potential tab characters anywhere else in your code.
+
+Example ESLint configuration:
+
+
+```json
+{
+ "rules": {
+ "no-tabs": ["error", {"allowIndentationTabs": true}]
+ }
+}
+```
+
+### [no-unexpected-multiline]
+
+**This rule requires special attention when writing code.**
+
+This rule disallows confusing multiline expressions where a newline looks like it is ending a statement, but is not.
+
+For example, the rule could warn about this:
+
+
+```js
+var hello = "world"
+[1, 2, 3].forEach(addNumber)
+```
+
+Prettier usually formats this in a way that makes it obvious that a semicolon was missing:
+
+
+```js
+var hello = "world"[(1, 2, 3)].forEach(addNumber);
+```
+
+However, there are cases where Prettier breaks things into several lines such that the `no-unexpected-multiline` conflicts.
+
+
+```js
+const value = text.trim().split("\n")[position].toLowerCase();
+```
+
+Prettier breaks it up into several lines, though, causing a conflict:
+
+
+```js
+const value = text
+ .trim()
+ .split("\n")
+ [position].toLowerCase();
+```
+
+If you like this rule, it can usually be used with Prettier without problems, but occasionally you might need to either temporarily disable the rule or refactor your code.
+
+
+```js
+const value = text
+ .trim()
+ .split("\n")
+ // eslint-disable-next-line no-unexpected-multiline
+ [position].toLowerCase();
+
+// Or:
+
+const lines = text.trim().split("\n");
+const value = lines[position].toLowerCase();
+```
+
+**Note:** If you _do_ enable this rule, you have to run ESLint and Prettier as two separate steps (and ESLint first) in order to get any value out of it. Otherwise Prettier might reformat your code in such a way that ESLint never gets a chance to report anything (as seen in the first example).
+
+Example configuration:
+
+
+```json
+{
+ "rules": {
+ "no-unexpected-multiline": "error"
+ }
+}
+```
+
+### [quotes] \(deprecated)
+
+(The following applies to [babel/quotes], [@stylistic/quotes], [@stylistic/js/quotes], [@stylistic/ts/quotes], and [@typescript-eslint/quotes] as well.)
+
+**This rule requires certain options and certain Prettier options.**
+
+Usually, you don’t need this rule at all. But there are two cases where it could be useful:
+
+- To enforce the use of backticks rather than single or double quotes for strings.
+- To forbid backticks where regular strings could have been used.
+
+#### Enforce backticks
+
+If you’d like all strings to use backticks (never quotes), enable the `"backtick"` option.
+
+Example ESLint configuration:
+
+
+```json
+{
+ "rules": {
+ "quotes": ["error", "backtick"]
+ }
+}
+```
+
+#### Forbid unnecessary backticks
+
+In the following example, the first array item could have been written with quotes instead of backticks.
+
+
+```js
+const strings = [
+ `could have been a regular string`,
+ `
+ multiple
+ lines
+ `,
+ `uses ${interpolation}`,
+ String.raw`\tagged/`,
+];
+```
+
+If you’d like ESLint to enforce `` `could have been a regular string` `` being written as either `"could have been a regular string"` or `'could have been a regular string'`, you need to use some specific configuration. The `quotes` rule has two options, a string option and an object option.
+
+- The first (string) option needs to be set to `"single"` or `"double"` and be kept in sync with Prettier’s [singleQuote] option.
+- The second (object) option needs the following properties:
+ - `"avoidEscape": true` to follow Prettier’s [string formatting rules].
+ - `"allowTemplateLiterals": false` to disallow unnecessary backticks.
+
+##### Example double quote configuration
+
+ESLint:
+
+
+```json
+{
+ "rules": {
+ "quotes": [
+ "error",
+ "double",
+ { "avoidEscape": true, "allowTemplateLiterals": false }
+ ]
+ }
+}
+```
+
+Prettier (this is the default, so adding this is not required):
+
+
+```json
+{
+ "singleQuote": false
+}
+```
+
+##### Example single quote configuration
+
+ESLint:
+
+
+```json
+{
+ "rules": {
+ "quotes": [
+ "error",
+ "single",
+ { "avoidEscape": true, "allowTemplateLiterals": false }
+ ]
+ }
+}
+```
+
+Prettier:
+
+
+```json
+{
+ "singleQuote": true
+}
+```
+
+### [unicorn/template-indent]
+
+**This rule can be used with certain options.**
+
+This rule will automatically fix the indentation of multiline string templates, to keep them in alignment with the code they are found in. A configurable whitelist is used to ensure no whitespace-sensitive strings are edited.
+
+Prettier deals with:
+
+- HTML
+- CSS
+- GraphQL
+- markdown
+
+Using various tags, functions and comments.
+
+`unicorn/template-indent` by default formats some of the same tagged templates, which can cause conflicts. For example, the rule and Prettier disagree about indentation in ternaries:
+
+```js
+condition
+ ? null
+ : html`
+
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in dui
+ mauris.
+
+ `;
+```
+
+If you like this rule, it can be used just fine with Prettier as long as you configure the rule to not deal with the same templates as Prettier.
+
+Example ESLint configuration:
+
+
+```json
+{
+ "rules": {
+ "unicorn/template-indent": [
+ "error",
+ {
+ "tags": [
+ "outdent",
+ "dedent",
+ "sql",
+ "styled"
+ ],
+ "functions": [
+ "dedent",
+ "stripIndent"
+ ],
+ "selectors": [],
+ "comments": [
+ "indent"
+ ]
+ }
+ ]
+ }
+}
+```
+
+Note: If you use `"selectors"`, the CLI helper tool cannot detect if your selectors might cause conflicts.
+
+### [vue/html-self-closing]
+
+**This rule requires certain options.**
+
+This rule enforces whether elements should be self-closing or not.
+
+Prettier generally preserves the way you wrote your elements:
+
+
+```vue
+
+
+
+
+
+
+```
+
+But for known _void_ HTML elements, Prettier always uses the self-closing style. For example, `` is turned into ``.
+
+If you like this rule, it can be used just fine with Prettier as long as you set `html.void` to `"any"`.
+
+Example ESLint configuration:
+
+
+```json
+{
+ "rules": {
+ "vue/html-self-closing": [
+ "error",
+ {
+ "html": {
+ "void": "any"
+ }
+ }
+ ]
+ }
+}
+```
+
+## Other rules worth mentioning
+
+These rules don’t conflict with Prettier, but have some gotchas when used with Prettier.
+
+### [no-sequences]
+
+This rule forbids using JavaScript’s confusing comma operator (sequence expressions). This piece of code is not doing what it looks like:
+
+
+```js
+matrix[4, 7];
+```
+
+Prettier adds parentheses to the above to make it clear that a sequence expression is used:
+
+
+```js
+matrix[(4, 7)];
+```
+
+However, the `no-sequences` rule allows comma operators if the expression sequence is explicitly wrapped in parentheses. Since Prettier automatically wraps them in parentheses, you might never see any warnings from ESLint about comma operators.
+
+Ending up with an accidental sequence expression can easily happen while refactoring. If you want ESLint to catch such mistakes, it is recommended to forbid sequence expressions entirely using [no-restricted-syntax] \([as mentioned in the `no-sequences` documentation][no-sequences-full]):
+
+
+```json
+{
+ "rules": {
+ "no-restricted-syntax": ["error", "SequenceExpression"]
+ }
+}
+```
+
+If you still need to use the comma operator for some edge case, you can place an `// eslint-disable-next-line no-restricted-syntax` comment on the line above the expression. `no-sequences` can safely be disabled if you use the `no-restricted-syntax` approach.
+
+You can also supply a custom message if you want:
+
+
+```json
+{
+ "rules": {
+ "no-restricted-syntax": [
+ "error",
+ {
+ "selector": "SequenceExpression",
+ "message": "The comma operator is confusing and a common mistake. Don’t use it!"
+ }
+ ]
+ }
+}
+```
+
+## Contributing
+
+See [package.json] for the exact versions of ESLint, Prettier and ESLint plugins that eslint-config-prettier has been tested with.
+
+Have new rules been added since those versions? Have we missed any rules? Is there a plugin you would like to see exclusions for? Open an issue or a pull request!
+
+If you’d like to add support for eslint-plugin-foobar, this is how you’d go about it:
+
+First, add rules to `index.js`:
+
+
+```js
+"foobar/some-rule": "off"
+```
+
+Then, create `test-lint/foobar.js`:
+
+
+```js
+/* eslint-disable quotes */
+"use strict";
+
+// Prettier does not want spaces before the parentheses, but
+// `plugin:foobar/recommended` wants one.
+console.log();
+```
+
+`test-lint/foobar.js` must fail when used with eslint-plugin-foobar and eslint-plugin-prettier at the same time – until eslint-config-prettier is added to the ESLint config. The file should be formatted according to Prettier, and that formatting should disagree with the plugin.
+
+Finally, you need to mention the plugin in several places:
+
+- Add eslint-plugin-foobar to the "devDependencies" field in `package.json`.
+- Make sure that at least one rule from eslint-plugin-foobar gets used in `.eslintrc.base.js` and `eslint.base.config.js`.
+- Add it to the lists of supported plugins in this `README.md`.
+
+When you’re done, run `npm test` to verify that you got it all right. It runs several other npm scripts:
+
+- `"test:prettier"` checks that Prettier has been run on all files.
+- `"test:eslint"` makes sure that the files in `test-lint/` pass ESLint when the exclusions from eslint-config-prettier are used. It also lints the code of eslint-config-prettier itself.
+- `"test:lint-verify-fail"` is run by a test in `test/lint-verify-fail.test.js`.
+- `"test:lint-rules"` is run by a test in `test/rules.test.js`.
+- `"test:jest"` runs unit tests that check a number of things:
+ - That eslint-plugin-foobar is mentioned in all the places shown above.
+ - That no unknown rules are turned off. This helps catching typos, for example.
+ - That the CLI works.
+- `"test:cli-sanity"` and `"test:cli-sanity-warning"` are sanity checks for the CLI.
+
+## License
+
+[MIT](LICENSE).
+
+[@babel/eslint-plugin]: https://github.com/babel/babel/tree/main/eslint/babel-eslint-plugin
+[@stylistic/eslint-plugin]: https://github.com/eslint-stylistic/eslint-stylistic
+[@stylistic/lines-around-comment]: https://eslint.style/rules/default/lines-around-comment
+[@stylistic/js/lines-around-comment]: https://eslint.style/rules/js/lines-around-comment
+[@stylistic/ts/lines-around-comment]: https://eslint.style/rules/ts/lines-around-comment
+[@stylistic/max-len]: https://eslint.style/rules/default/max-len
+[@stylistic/js/max-len]: https://eslint.style/rules/js/max-len
+[@stylistic/no-confusing-arrow]: https://eslint.style/rules/default/no-confusing-arrow
+[@stylistic/js/no-confusing-arrow]: https://eslint.style/rules/js/no-confusing-arrow
+[@stylistic/no-mixed-operators]: https://eslint.style/rules/default/no-mixed-operators
+[@stylistic/js/no-mixed-operators]: https://eslint.style/rules/js/no-mixed-operators
+[@stylistic/no-tabs]: https://eslint.style/rules/default/no-tabs
+[@stylistic/js/no-tabs]: https://eslint.style/rules/js/no-tabs
+[@stylistic/quotes]: https://eslint.style/rules/default/quotes
+[@stylistic/js/quotes]: https://eslint.style/rules/js/quotes
+[@stylistic/ts/quotes]: https://eslint.style/rules/ts/quotes
+[@typescript-eslint/eslint-plugin]: https://github.com/typescript-eslint/typescript-eslint
+[@typescript-eslint/lines-around-comment]: https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/lines-around-comment.md
+[@typescript-eslint/quotes]: https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/quotes.md
+[arrow-body-style]: https://eslint.org/docs/rules/arrow-body-style
+[babel/quotes]: https://github.com/babel/eslint-plugin-babel#rules
+[curly]: https://eslint.org/docs/rules/curly
+[eslint-plugin-babel]: https://github.com/babel/eslint-plugin-babel
+[eslint-plugin-flowtype]: https://github.com/gajus/eslint-plugin-flowtype
+[eslint-plugin-prettier-autofix-issue]: https://github.com/prettier/eslint-plugin-prettier#arrow-body-style-and-prefer-arrow-callback-issue
+[eslint-plugin-prettier-recommended]: https://github.com/prettier/eslint-plugin-prettier#recommended-configuration
+[eslint-plugin-prettier]: https://github.com/prettier/eslint-plugin-prettier
+[eslint-plugin-react]: https://github.com/yannickcr/eslint-plugin-react
+[eslint-plugin-standard]: https://github.com/xjamundx/eslint-plugin-standard
+[eslint-plugin-unicorn]: https://github.com/sindresorhus/eslint-plugin-unicorn
+[eslint-plugin-vue]: https://github.com/vuejs/eslint-plugin-vue
+[eslint.config.js (flat config)]: https://eslint.org/docs/latest/use/configure/configuration-files-new
+[eslintrc]: https://eslint.org/docs/latest/use/configure/configuration-files
+[lines-around-comment]: https://eslint.org/docs/rules/lines-around-comment
+[max-len]: https://eslint.org/docs/rules/max-len
+[multiple configuration files]: https://eslint.org/docs/user-guide/configuring#configuration-cascading-and-hierarchy
+[no-confusing-arrow]: https://eslint.org/docs/rules/no-confusing-arrow
+[no-mixed-operators]: https://eslint.org/docs/rules/no-mixed-operators
+[no-restricted-syntax]: https://eslint.org/docs/rules/no-restricted-syntax
+[no-sequences-full]: https://eslint.org/docs/rules/no-sequences#when-not-to-use-it
+[no-sequences]: https://eslint.org/docs/rules/no-sequences
+[no-tabs]: https://eslint.org/docs/rules/no-tabs
+[no-unexpected-multiline]: https://eslint.org/docs/rules/no-unexpected-multiline
+[overrides]: https://eslint.org/docs/user-guide/configuring#configuration-based-on-glob-patterns
+[package.json]: https://github.com/prettier/eslint-config-prettier/blob/main/package.json
+[prefer-arrow-callback]: https://eslint.org/docs/rules/prefer-arrow-callback
+[quotes]: https://eslint.org/docs/rules/quotes
+[singlequote]: https://prettier.io/docs/en/options.html#quotes
+[string formatting rules]: https://prettier.io/docs/en/rationale.html#strings
+[unicorn/template-indent]: https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/template-indent.md
+[vue/html-self-closing]: https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/html-self-closing.md
+[vue/max-len]: https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/max-len.md
diff --git a/tools/ui/node_modules/eslint-config-prettier/bin/cli.js b/tools/ui/node_modules/eslint-config-prettier/bin/cli.js
new file mode 100644
index 0000000000000000000000000000000000000000..da85433640340258448a748ac62b830855f8a668
--- /dev/null
+++ b/tools/ui/node_modules/eslint-config-prettier/bin/cli.js
@@ -0,0 +1,240 @@
+#!/usr/bin/env node
+
+"use strict";
+
+const validators = require("./validators");
+const config = require("..");
+const prettier = require("../prettier");
+
+// Require locally installed eslint, for `npx eslint-config-prettier` support
+// with no local eslint-config-prettier installation.
+const localRequire = (request) =>
+ require(
+ require.resolve(request, {
+ paths: [process.cwd(), ...require.resolve.paths("eslint")],
+ })
+ );
+
+let experimentalApi = {};
+try {
+ experimentalApi = localRequire("eslint/use-at-your-own-risk");
+} catch (_error) {}
+
+const { ESLint, FlatESLint = experimentalApi.FlatESLint } =
+ localRequire("eslint");
+
+const SPECIAL_RULES_URL =
+ "https://github.com/prettier/eslint-config-prettier#special-rules";
+
+const PRETTIER_RULES_URL =
+ "https://github.com/prettier/eslint-config-prettier#arrow-body-style-and-prefer-arrow-callback";
+
+if (module === require.main) {
+ const args = process.argv.slice(2);
+
+ if (args.length === 0) {
+ console.error(help());
+ process.exit(1);
+ }
+
+ const eslint = new ESLint();
+ const flatESLint = FlatESLint === undefined ? undefined : new FlatESLint();
+
+ Promise.all(
+ args.map((file) => {
+ switch (process.env.ESLINT_USE_FLAT_CONFIG) {
+ case "true": {
+ return flatESLint.calculateConfigForFile(file);
+ }
+ case "false": {
+ return eslint.calculateConfigForFile(file);
+ }
+ default: {
+ // This turns synchronous errors (such as `.calculateConfigForFile` not existing)
+ // and turns them into promise rejections.
+ return Promise.resolve()
+ .then(() => flatESLint.calculateConfigForFile(file))
+ .catch(() => eslint.calculateConfigForFile(file));
+ }
+ }
+ })
+ )
+ .then((configs) => {
+ const rules = configs.flatMap(
+ (
+ // Initializing config and rules for files that aren't included in the flat config,
+ // which is a very unlikely scenario, but should still be treated as a success
+ { rules = {} } = {},
+ index
+ ) => Object.entries(rules).map((entry) => [...entry, args[index]])
+ );
+ const result = processRules(rules);
+ if (result.stderr) {
+ console.error(result.stderr);
+ }
+ if (result.stdout) {
+ console.error(result.stdout);
+ }
+ process.exit(result.code);
+ })
+ .catch((error) => {
+ console.error(error.message);
+ process.exit(1);
+ });
+}
+
+function help() {
+ return `
+Usage: npx eslint-config-prettier FILE...
+
+Resolves an ESLint configuration for every given FILE and checks if they
+contain rules that are unnecessary or conflict with Prettier. Example:
+
+ npx eslint-config-prettier index.js test/index.js other/file/to/check.js
+
+Exit codes:
+
+0: No automatically detectable problems found.
+1: General error.
+2: Conflicting rules found.
+
+For more information, see:
+https://github.com/prettier/eslint-config-prettier#cli-helper-tool
+ `.trim();
+}
+
+function processRules(configRules) {
+ const regularRules = filterRules(config.rules, (_, value) => value === "off");
+ const optionsRules = filterRules(
+ config.rules,
+ (ruleName, value) => value === 0 && ruleName in validators
+ );
+ const specialRules = filterRules(
+ config.rules,
+ (ruleName, value) => value === 0 && !(ruleName in validators)
+ );
+
+ const enabledRules = configRules
+ .map(([ruleName, value, source]) => {
+ const arrayValue = Array.isArray(value) ? value : [value];
+ const [level, ...options] = arrayValue;
+ const isOff = level === "off" || level === 0;
+ return isOff ? null : { ruleName, options, source };
+ })
+ .filter(Boolean);
+
+ const flaggedRules = enabledRules.filter(
+ ({ ruleName }) => ruleName in config.rules
+ );
+
+ const regularFlaggedRuleNames = filterRuleNames(
+ flaggedRules,
+ ({ ruleName }) => ruleName in regularRules
+ );
+ const optionsFlaggedRuleNames = filterRuleNames(
+ flaggedRules,
+ ({ ruleName, ...rule }) =>
+ ruleName in optionsRules && !validators[ruleName](rule)
+ );
+ const specialFlaggedRuleNames = filterRuleNames(
+ flaggedRules,
+ ({ ruleName }) => ruleName in specialRules
+ );
+ const prettierFlaggedRuleNames = filterRuleNames(
+ enabledRules,
+ ({ ruleName, source }) =>
+ ruleName in prettier.rules &&
+ enabledRules.some(
+ (rule) =>
+ rule.ruleName === "prettier/prettier" && rule.source === source
+ )
+ );
+
+ const regularMessage = [
+ "The following rules are unnecessary or might conflict with Prettier:",
+ "",
+ printRuleNames(regularFlaggedRuleNames),
+ ].join("\n");
+
+ const optionsMessage = [
+ "The following rules are enabled with config that might conflict with Prettier. See:",
+ SPECIAL_RULES_URL,
+ "",
+ printRuleNames(optionsFlaggedRuleNames),
+ ].join("\n");
+
+ const specialMessage = [
+ "The following rules are enabled but cannot be automatically checked. See:",
+ SPECIAL_RULES_URL,
+ "",
+ printRuleNames(specialFlaggedRuleNames),
+ ].join("\n");
+
+ const prettierMessage = [
+ "The following rules can cause issues when using eslint-plugin-prettier at the same time.",
+ "Only enable them if you know what you are doing! See:",
+ PRETTIER_RULES_URL,
+ "",
+ printRuleNames(prettierFlaggedRuleNames),
+ ].join("\n");
+
+ if (
+ regularFlaggedRuleNames.length === 0 &&
+ optionsFlaggedRuleNames.length === 0
+ ) {
+ const message =
+ specialFlaggedRuleNames.length === 0 &&
+ prettierFlaggedRuleNames.length === 0
+ ? "No rules that are unnecessary or conflict with Prettier were found."
+ : [
+ specialFlaggedRuleNames.length === 0 ? null : specialMessage,
+ prettierFlaggedRuleNames.length === 0 ? null : prettierMessage,
+ "Other than that, no rules that are unnecessary or conflict with Prettier were found.",
+ ]
+ .filter(Boolean)
+ .join("\n\n");
+
+ return {
+ stdout: message,
+ code: 0,
+ };
+ }
+
+ const message = [
+ regularFlaggedRuleNames.length === 0 ? null : regularMessage,
+ optionsFlaggedRuleNames.length === 0 ? null : optionsMessage,
+ specialFlaggedRuleNames.length === 0 ? null : specialMessage,
+ prettierFlaggedRuleNames.length === 0 ? null : prettierMessage,
+ ]
+ .filter(Boolean)
+ .join("\n\n");
+
+ return {
+ stdout: message,
+ code: 2,
+ };
+}
+
+function filterRules(rules, fn) {
+ return Object.fromEntries(
+ Object.entries(rules)
+ .filter(([ruleName, value]) => fn(ruleName, value))
+ .map(([ruleName]) => [ruleName, true])
+ );
+}
+
+function filterRuleNames(rules, fn) {
+ return [
+ ...new Set(rules.filter((rule) => fn(rule)).map((rule) => rule.ruleName)),
+ ];
+}
+
+function printRuleNames(ruleNames) {
+ return ruleNames
+ .slice()
+ .sort()
+ .map((ruleName) => `- ${ruleName}`)
+ .join("\n");
+}
+
+exports.processRules = processRules;
diff --git a/tools/ui/node_modules/eslint-config-prettier/bin/validators.js b/tools/ui/node_modules/eslint-config-prettier/bin/validators.js
new file mode 100644
index 0000000000000000000000000000000000000000..175d67a11196bef9cd0e4d8834fb5fa656d9d016
--- /dev/null
+++ b/tools/ui/node_modules/eslint-config-prettier/bin/validators.js
@@ -0,0 +1,86 @@
+"use strict";
+
+// These validator functions answer the question “Is the config valid?” – return
+// `false` if the options DO conflict with Prettier, and `true` if they don’t.
+
+module.exports = {
+ "curly"({ options }) {
+ if (options.length === 0) {
+ return true;
+ }
+
+ const firstOption = options[0];
+ return firstOption !== "multi-line" && firstOption !== "multi-or-nest";
+ },
+
+ "lines-around-comment"({ options }) {
+ if (options.length === 0) {
+ return false;
+ }
+
+ const firstOption = options[0];
+ return Boolean(
+ firstOption &&
+ firstOption.allowBlockStart &&
+ firstOption.allowBlockEnd &&
+ firstOption.allowObjectStart &&
+ firstOption.allowObjectEnd &&
+ firstOption.allowArrayStart &&
+ firstOption.allowArrayEnd
+ );
+ },
+
+ "no-confusing-arrow"({ options }) {
+ if (options.length === 0) {
+ return false;
+ }
+
+ const firstOption = options[0];
+ return firstOption ? firstOption.allowParens === false : false;
+ },
+
+ "no-tabs"({ options }) {
+ if (options.length === 0) {
+ return false;
+ }
+
+ const firstOption = options[0];
+ return Boolean(firstOption && firstOption.allowIndentationTabs);
+ },
+
+ "unicorn/template-indent"({ options }) {
+ if (options.length === 0) {
+ return false;
+ }
+
+ const { comments = [], tags = [] } = options[0] || {};
+
+ return (
+ Array.isArray(comments) &&
+ Array.isArray(tags) &&
+ !(
+ comments.includes("GraphQL") ||
+ comments.includes("HTML") ||
+ tags.includes("css") ||
+ tags.includes("graphql") ||
+ tags.includes("gql") ||
+ tags.includes("html") ||
+ tags.includes("markdown") ||
+ tags.includes("md")
+ )
+ );
+ },
+
+ "vue/html-self-closing"({ options }) {
+ if (options.length === 0) {
+ return false;
+ }
+
+ const firstOption = options[0];
+ return Boolean(
+ firstOption && firstOption.html && firstOption.html.void === "any"
+ // Enable when Prettier supports SVG: https://github.com/prettier/prettier/issues/5322
+ // && firstOption.svg === "any"
+ );
+ },
+};
diff --git a/tools/ui/node_modules/eslint-config-prettier/flat.d.ts b/tools/ui/node_modules/eslint-config-prettier/flat.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..980b69e6c23d917c1d52be4eb10539fcdd73e73f
--- /dev/null
+++ b/tools/ui/node_modules/eslint-config-prettier/flat.d.ts
@@ -0,0 +1,7 @@
+import eslintConfigPrettier from "./index.js";
+
+declare const eslintConfigPrettierFlat: typeof eslintConfigPrettier & {
+ name: "config-prettier";
+};
+
+export = eslintConfigPrettierFlat;
diff --git a/tools/ui/node_modules/eslint-config-prettier/flat.js b/tools/ui/node_modules/eslint-config-prettier/flat.js
new file mode 100644
index 0000000000000000000000000000000000000000..adf9deec17c58f2c6e1036f3b5264467dad54f2b
--- /dev/null
+++ b/tools/ui/node_modules/eslint-config-prettier/flat.js
@@ -0,0 +1,6 @@
+"use strict";
+
+const { rules } = require("./index.js");
+
+exports.name = "config-prettier";
+exports.rules = rules;
diff --git a/tools/ui/node_modules/eslint-config-prettier/index.d.ts b/tools/ui/node_modules/eslint-config-prettier/index.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..3548ea38c54adba1db6b1c818b9bb0ab7d95affb
--- /dev/null
+++ b/tools/ui/node_modules/eslint-config-prettier/index.d.ts
@@ -0,0 +1,5 @@
+declare const eslintConfigPrettier: {
+ rules: Record;
+};
+
+export = eslintConfigPrettier;
diff --git a/tools/ui/node_modules/eslint-config-prettier/index.js b/tools/ui/node_modules/eslint-config-prettier/index.js
new file mode 100644
index 0000000000000000000000000000000000000000..dc39bee2999f3de532c56f16734d24a3e678d956
--- /dev/null
+++ b/tools/ui/node_modules/eslint-config-prettier/index.js
@@ -0,0 +1,395 @@
+"use strict";
+
+const includeDeprecated = !process.env.ESLINT_CONFIG_PRETTIER_NO_DEPRECATED;
+
+const specialRule = 0;
+
+exports.rules = {
+ // The following rules can be used in some cases. See the README for more
+ // information. These are marked with `0` instead of `"off"` so that a
+ // script can distinguish them. Note that there are a few more of these
+ // in the deprecated section below.
+ "curly": specialRule,
+ "no-unexpected-multiline": specialRule,
+ "@stylistic/lines-around-comment": specialRule,
+ "@stylistic/max-len": specialRule,
+ "@stylistic/no-confusing-arrow": specialRule,
+ "@stylistic/no-mixed-operators": specialRule,
+ "@stylistic/no-tabs": specialRule,
+ "@stylistic/quotes": specialRule,
+ "@stylistic/js/lines-around-comment": specialRule,
+ "@stylistic/js/max-len": specialRule,
+ "@stylistic/js/no-confusing-arrow": specialRule,
+ "@stylistic/js/no-mixed-operators": specialRule,
+ "@stylistic/js/no-tabs": specialRule,
+ "@stylistic/js/quotes": specialRule,
+ "@stylistic/ts/lines-around-comment": specialRule,
+ "@stylistic/ts/quotes": specialRule,
+ "@typescript-eslint/lines-around-comment": specialRule,
+ "@typescript-eslint/quotes": specialRule,
+ "babel/quotes": specialRule,
+ "unicorn/template-indent": specialRule,
+ "vue/html-self-closing": specialRule,
+ "vue/max-len": specialRule,
+
+ // The rest are rules that you never need to enable when using Prettier.
+ "@babel/object-curly-spacing": "off",
+ "@babel/semi": "off",
+ "@stylistic/array-bracket-newline": "off",
+ "@stylistic/array-bracket-spacing": "off",
+ "@stylistic/array-element-newline": "off",
+ "@stylistic/arrow-parens": "off",
+ "@stylistic/arrow-spacing": "off",
+ "@stylistic/block-spacing": "off",
+ "@stylistic/brace-style": "off",
+ "@stylistic/comma-dangle": "off",
+ "@stylistic/comma-spacing": "off",
+ "@stylistic/comma-style": "off",
+ "@stylistic/computed-property-spacing": "off",
+ "@stylistic/dot-location": "off",
+ "@stylistic/eol-last": "off",
+ "@stylistic/func-call-spacing": "off",
+ "@stylistic/function-call-argument-newline": "off",
+ "@stylistic/function-call-spacing": "off",
+ "@stylistic/function-paren-newline": "off",
+ "@stylistic/generator-star-spacing": "off",
+ "@stylistic/implicit-arrow-linebreak": "off",
+ "@stylistic/indent": "off",
+ "@stylistic/jsx-quotes": "off",
+ "@stylistic/key-spacing": "off",
+ "@stylistic/keyword-spacing": "off",
+ "@stylistic/linebreak-style": "off",
+ "@stylistic/max-statements-per-line": "off",
+ "@stylistic/multiline-ternary": "off",
+ "@stylistic/new-parens": "off",
+ "@stylistic/newline-per-chained-call": "off",
+ "@stylistic/no-extra-parens": "off",
+ "@stylistic/no-extra-semi": "off",
+ "@stylistic/no-floating-decimal": "off",
+ "@stylistic/no-mixed-spaces-and-tabs": "off",
+ "@stylistic/no-multi-spaces": "off",
+ "@stylistic/no-multiple-empty-lines": "off",
+ "@stylistic/no-trailing-spaces": "off",
+ "@stylistic/no-whitespace-before-property": "off",
+ "@stylistic/nonblock-statement-body-position": "off",
+ "@stylistic/object-curly-newline": "off",
+ "@stylistic/object-curly-spacing": "off",
+ "@stylistic/object-property-newline": "off",
+ "@stylistic/one-var-declaration-per-line": "off",
+ "@stylistic/operator-linebreak": "off",
+ "@stylistic/padded-blocks": "off",
+ "@stylistic/quote-props": "off",
+ "@stylistic/rest-spread-spacing": "off",
+ "@stylistic/semi": "off",
+ "@stylistic/semi-spacing": "off",
+ "@stylistic/semi-style": "off",
+ "@stylistic/space-before-blocks": "off",
+ "@stylistic/space-before-function-paren": "off",
+ "@stylistic/space-in-parens": "off",
+ "@stylistic/space-infix-ops": "off",
+ "@stylistic/space-unary-ops": "off",
+ "@stylistic/switch-colon-spacing": "off",
+ "@stylistic/template-curly-spacing": "off",
+ "@stylistic/template-tag-spacing": "off",
+ "@stylistic/wrap-iife": "off",
+ "@stylistic/wrap-regex": "off",
+ "@stylistic/yield-star-spacing": "off",
+ "@stylistic/member-delimiter-style": "off",
+ "@stylistic/type-annotation-spacing": "off",
+ "@stylistic/jsx-child-element-spacing": "off",
+ "@stylistic/jsx-closing-bracket-location": "off",
+ "@stylistic/jsx-closing-tag-location": "off",
+ "@stylistic/jsx-curly-newline": "off",
+ "@stylistic/jsx-curly-spacing": "off",
+ "@stylistic/jsx-equals-spacing": "off",
+ "@stylistic/jsx-first-prop-new-line": "off",
+ "@stylistic/jsx-indent": "off",
+ "@stylistic/jsx-indent-props": "off",
+ "@stylistic/jsx-max-props-per-line": "off",
+ "@stylistic/jsx-newline": "off",
+ "@stylistic/jsx-one-expression-per-line": "off",
+ "@stylistic/jsx-props-no-multi-spaces": "off",
+ "@stylistic/jsx-tag-spacing": "off",
+ "@stylistic/jsx-wrap-multilines": "off",
+ "@stylistic/indent-binary-ops": "off",
+ "@stylistic/type-generic-spacing": "off",
+ "@stylistic/type-named-tuple-spacing": "off",
+ "@stylistic/js/array-bracket-newline": "off",
+ "@stylistic/js/array-bracket-spacing": "off",
+ "@stylistic/js/array-element-newline": "off",
+ "@stylistic/js/arrow-parens": "off",
+ "@stylistic/js/arrow-spacing": "off",
+ "@stylistic/js/block-spacing": "off",
+ "@stylistic/js/brace-style": "off",
+ "@stylistic/js/comma-dangle": "off",
+ "@stylistic/js/comma-spacing": "off",
+ "@stylistic/js/comma-style": "off",
+ "@stylistic/js/computed-property-spacing": "off",
+ "@stylistic/js/dot-location": "off",
+ "@stylistic/js/eol-last": "off",
+ "@stylistic/js/func-call-spacing": "off",
+ "@stylistic/js/function-call-argument-newline": "off",
+ "@stylistic/js/function-call-spacing": "off",
+ "@stylistic/js/function-paren-newline": "off",
+ "@stylistic/js/generator-star-spacing": "off",
+ "@stylistic/js/implicit-arrow-linebreak": "off",
+ "@stylistic/js/indent": "off",
+ "@stylistic/js/jsx-quotes": "off",
+ "@stylistic/js/key-spacing": "off",
+ "@stylistic/js/keyword-spacing": "off",
+ "@stylistic/js/linebreak-style": "off",
+ "@stylistic/js/max-statements-per-line": "off",
+ "@stylistic/js/multiline-ternary": "off",
+ "@stylistic/js/new-parens": "off",
+ "@stylistic/js/newline-per-chained-call": "off",
+ "@stylistic/js/no-extra-parens": "off",
+ "@stylistic/js/no-extra-semi": "off",
+ "@stylistic/js/no-floating-decimal": "off",
+ "@stylistic/js/no-mixed-spaces-and-tabs": "off",
+ "@stylistic/js/no-multi-spaces": "off",
+ "@stylistic/js/no-multiple-empty-lines": "off",
+ "@stylistic/js/no-trailing-spaces": "off",
+ "@stylistic/js/no-whitespace-before-property": "off",
+ "@stylistic/js/nonblock-statement-body-position": "off",
+ "@stylistic/js/object-curly-newline": "off",
+ "@stylistic/js/object-curly-spacing": "off",
+ "@stylistic/js/object-property-newline": "off",
+ "@stylistic/js/one-var-declaration-per-line": "off",
+ "@stylistic/js/operator-linebreak": "off",
+ "@stylistic/js/padded-blocks": "off",
+ "@stylistic/js/quote-props": "off",
+ "@stylistic/js/rest-spread-spacing": "off",
+ "@stylistic/js/semi": "off",
+ "@stylistic/js/semi-spacing": "off",
+ "@stylistic/js/semi-style": "off",
+ "@stylistic/js/space-before-blocks": "off",
+ "@stylistic/js/space-before-function-paren": "off",
+ "@stylistic/js/space-in-parens": "off",
+ "@stylistic/js/space-infix-ops": "off",
+ "@stylistic/js/space-unary-ops": "off",
+ "@stylistic/js/switch-colon-spacing": "off",
+ "@stylistic/js/template-curly-spacing": "off",
+ "@stylistic/js/template-tag-spacing": "off",
+ "@stylistic/js/wrap-iife": "off",
+ "@stylistic/js/wrap-regex": "off",
+ "@stylistic/js/yield-star-spacing": "off",
+ "@stylistic/ts/block-spacing": "off",
+ "@stylistic/ts/brace-style": "off",
+ "@stylistic/ts/comma-dangle": "off",
+ "@stylistic/ts/comma-spacing": "off",
+ "@stylistic/ts/func-call-spacing": "off",
+ "@stylistic/ts/function-call-spacing": "off",
+ "@stylistic/ts/indent": "off",
+ "@stylistic/ts/key-spacing": "off",
+ "@stylistic/ts/keyword-spacing": "off",
+ "@stylistic/ts/member-delimiter-style": "off",
+ "@stylistic/ts/no-extra-parens": "off",
+ "@stylistic/ts/no-extra-semi": "off",
+ "@stylistic/ts/object-curly-spacing": "off",
+ "@stylistic/ts/semi": "off",
+ "@stylistic/ts/space-before-blocks": "off",
+ "@stylistic/ts/space-before-function-paren": "off",
+ "@stylistic/ts/space-infix-ops": "off",
+ "@stylistic/ts/type-annotation-spacing": "off",
+ "@stylistic/jsx/jsx-child-element-spacing": "off",
+ "@stylistic/jsx/jsx-closing-bracket-location": "off",
+ "@stylistic/jsx/jsx-closing-tag-location": "off",
+ "@stylistic/jsx/jsx-curly-newline": "off",
+ "@stylistic/jsx/jsx-curly-spacing": "off",
+ "@stylistic/jsx/jsx-equals-spacing": "off",
+ "@stylistic/jsx/jsx-first-prop-new-line": "off",
+ "@stylistic/jsx/jsx-indent": "off",
+ "@stylistic/jsx/jsx-indent-props": "off",
+ "@stylistic/jsx/jsx-max-props-per-line": "off",
+ "@typescript-eslint/block-spacing": "off",
+ "@typescript-eslint/brace-style": "off",
+ "@typescript-eslint/comma-dangle": "off",
+ "@typescript-eslint/comma-spacing": "off",
+ "@typescript-eslint/func-call-spacing": "off",
+ "@typescript-eslint/indent": "off",
+ "@typescript-eslint/key-spacing": "off",
+ "@typescript-eslint/keyword-spacing": "off",
+ "@typescript-eslint/member-delimiter-style": "off",
+ "@typescript-eslint/no-extra-parens": "off",
+ "@typescript-eslint/no-extra-semi": "off",
+ "@typescript-eslint/object-curly-spacing": "off",
+ "@typescript-eslint/semi": "off",
+ "@typescript-eslint/space-before-blocks": "off",
+ "@typescript-eslint/space-before-function-paren": "off",
+ "@typescript-eslint/space-infix-ops": "off",
+ "@typescript-eslint/type-annotation-spacing": "off",
+ "babel/object-curly-spacing": "off",
+ "babel/semi": "off",
+ "flowtype/boolean-style": "off",
+ "flowtype/delimiter-dangle": "off",
+ "flowtype/generic-spacing": "off",
+ "flowtype/object-type-curly-spacing": "off",
+ "flowtype/object-type-delimiter": "off",
+ "flowtype/quotes": "off",
+ "flowtype/semi": "off",
+ "flowtype/space-after-type-colon": "off",
+ "flowtype/space-before-generic-bracket": "off",
+ "flowtype/space-before-type-colon": "off",
+ "flowtype/union-intersection-spacing": "off",
+ "react/jsx-child-element-spacing": "off",
+ "react/jsx-closing-bracket-location": "off",
+ "react/jsx-closing-tag-location": "off",
+ "react/jsx-curly-newline": "off",
+ "react/jsx-curly-spacing": "off",
+ "react/jsx-equals-spacing": "off",
+ "react/jsx-first-prop-new-line": "off",
+ "react/jsx-indent": "off",
+ "react/jsx-indent-props": "off",
+ "react/jsx-max-props-per-line": "off",
+ "react/jsx-newline": "off",
+ "react/jsx-one-expression-per-line": "off",
+ "react/jsx-props-no-multi-spaces": "off",
+ "react/jsx-tag-spacing": "off",
+ "react/jsx-wrap-multilines": "off",
+ "standard/array-bracket-even-spacing": "off",
+ "standard/computed-property-even-spacing": "off",
+ "standard/object-curly-even-spacing": "off",
+ "unicorn/empty-brace-spaces": "off",
+ "unicorn/no-nested-ternary": "off",
+ "unicorn/number-literal-case": "off",
+ "vue/array-bracket-newline": "off",
+ "vue/array-bracket-spacing": "off",
+ "vue/array-element-newline": "off",
+ "vue/arrow-spacing": "off",
+ "vue/block-spacing": "off",
+ "vue/block-tag-newline": "off",
+ "vue/brace-style": "off",
+ "vue/comma-dangle": "off",
+ "vue/comma-spacing": "off",
+ "vue/comma-style": "off",
+ "vue/dot-location": "off",
+ "vue/func-call-spacing": "off",
+ "vue/html-closing-bracket-newline": "off",
+ "vue/html-closing-bracket-spacing": "off",
+ "vue/html-end-tags": "off",
+ "vue/html-indent": "off",
+ "vue/html-quotes": "off",
+ "vue/key-spacing": "off",
+ "vue/keyword-spacing": "off",
+ "vue/max-attributes-per-line": "off",
+ "vue/multiline-html-element-content-newline": "off",
+ "vue/multiline-ternary": "off",
+ "vue/mustache-interpolation-spacing": "off",
+ "vue/no-extra-parens": "off",
+ "vue/no-multi-spaces": "off",
+ "vue/no-spaces-around-equal-signs-in-attribute": "off",
+ "vue/object-curly-newline": "off",
+ "vue/object-curly-spacing": "off",
+ "vue/object-property-newline": "off",
+ "vue/operator-linebreak": "off",
+ "vue/quote-props": "off",
+ "vue/script-indent": "off",
+ "vue/singleline-html-element-content-newline": "off",
+ "vue/space-in-parens": "off",
+ "vue/space-infix-ops": "off",
+ "vue/space-unary-ops": "off",
+ "vue/template-curly-spacing": "off",
+
+ ...(includeDeprecated && {
+ // Removed in version 0.10.0.
+ // https://eslint.org/docs/latest/rules/space-unary-word-ops
+ "space-unary-word-ops": "off",
+
+ // Removed in version 1.0.0.
+ // https://github.com/eslint/eslint/issues/1898
+ "generator-star": "off",
+ "no-comma-dangle": "off",
+ "no-reserved-keys": "off",
+ "no-space-before-semi": "off",
+ "no-wrap-func": "off",
+ "space-after-function-name": "off",
+ "space-before-function-parentheses": "off",
+ "space-in-brackets": "off",
+
+ // Removed in version 2.0.0.
+ // https://github.com/eslint/eslint/issues/5032
+ "no-arrow-condition": "off",
+ "space-after-keywords": "off",
+ "space-before-keywords": "off",
+ "space-return-throw-case": "off",
+
+ // Deprecated since version 3.3.0.
+ // https://eslint.org/docs/rules/no-spaced-func
+ "no-spaced-func": "off",
+
+ // Deprecated since version 4.0.0.
+ // https://github.com/eslint/eslint/pull/8286
+ "indent-legacy": "off",
+
+ // Deprecated since version 8.53.0.
+ // https://eslint.org/blog/2023/10/deprecating-formatting-rules/
+ "array-bracket-newline": "off",
+ "array-bracket-spacing": "off",
+ "array-element-newline": "off",
+ "arrow-parens": "off",
+ "arrow-spacing": "off",
+ "block-spacing": "off",
+ "brace-style": "off",
+ "comma-dangle": "off",
+ "comma-spacing": "off",
+ "comma-style": "off",
+ "computed-property-spacing": "off",
+ "dot-location": "off",
+ "eol-last": "off",
+ "func-call-spacing": "off",
+ "function-call-argument-newline": "off",
+ "function-paren-newline": "off",
+ "generator-star-spacing": "off",
+ "implicit-arrow-linebreak": "off",
+ "indent": "off",
+ "jsx-quotes": "off",
+ "key-spacing": "off",
+ "keyword-spacing": "off",
+ "linebreak-style": "off",
+ "lines-around-comment": specialRule,
+ "max-len": specialRule,
+ "max-statements-per-line": "off",
+ "multiline-ternary": "off",
+ "new-parens": "off",
+ "newline-per-chained-call": "off",
+ "no-confusing-arrow": specialRule,
+ "no-extra-parens": "off",
+ "no-extra-semi": "off",
+ "no-floating-decimal": "off",
+ "no-mixed-operators": specialRule,
+ "no-mixed-spaces-and-tabs": "off",
+ "no-multi-spaces": "off",
+ "no-multiple-empty-lines": "off",
+ "no-tabs": specialRule,
+ "no-trailing-spaces": "off",
+ "no-whitespace-before-property": "off",
+ "nonblock-statement-body-position": "off",
+ "object-curly-newline": "off",
+ "object-curly-spacing": "off",
+ "object-property-newline": "off",
+ "one-var-declaration-per-line": "off",
+ "operator-linebreak": "off",
+ "padded-blocks": "off",
+ "quote-props": "off",
+ "quotes": specialRule,
+ "rest-spread-spacing": "off",
+ "semi": "off",
+ "semi-spacing": "off",
+ "semi-style": "off",
+ "space-before-blocks": "off",
+ "space-before-function-paren": "off",
+ "space-in-parens": "off",
+ "space-infix-ops": "off",
+ "space-unary-ops": "off",
+ "switch-colon-spacing": "off",
+ "template-curly-spacing": "off",
+ "template-tag-spacing": "off",
+ "wrap-iife": "off",
+ "wrap-regex": "off",
+ "yield-star-spacing": "off",
+
+ // Deprecated since version 7.0.0.
+ // https://github.com/yannickcr/eslint-plugin-react/blob/master/CHANGELOG.md#700---2017-05-06
+ "react/jsx-space-before-closing": "off",
+ }),
+};
diff --git a/tools/ui/node_modules/eslint-config-prettier/package.json b/tools/ui/node_modules/eslint-config-prettier/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..20fd2b8b336f8c75916b0e74fd2edd53ebeb177d
--- /dev/null
+++ b/tools/ui/node_modules/eslint-config-prettier/package.json
@@ -0,0 +1,51 @@
+{
+ "name": "eslint-config-prettier",
+ "version": "10.1.8",
+ "type": "commonjs",
+ "description": "Turns off all rules that are unnecessary or might conflict with Prettier.",
+ "repository": "prettier/eslint-config-prettier",
+ "homepage": "https://github.com/prettier/eslint-config-prettier#readme",
+ "author": "Simon Lydell",
+ "maintainers": [
+ "JounQin (https://www.1stG.me) "
+ ],
+ "funding": "https://opencollective.com/eslint-config-prettier",
+ "license": "MIT",
+ "bin": "bin/cli.js",
+ "main": "index.js",
+ "types": "index.d.ts",
+ "exports": {
+ ".": {
+ "types": "./index.d.ts",
+ "default": "./index.js"
+ },
+ "./flat": {
+ "types": "./flat.d.ts",
+ "default": "./flat.js"
+ },
+ "./prettier": {
+ "types": "./prettier.d.ts",
+ "default": "./prettier.js"
+ },
+ "./package.json": "./package.json"
+ },
+ "files": [
+ "bin",
+ "flat.d.ts",
+ "flat.js",
+ "index.d.ts",
+ "index.js",
+ "prettier.d.ts",
+ "prettier.js"
+ ],
+ "keywords": [
+ "eslint",
+ "eslintconfig",
+ "eslint-config",
+ "eslint-prettier",
+ "prettier"
+ ],
+ "peerDependencies": {
+ "eslint": ">=7.0.0"
+ }
+}
\ No newline at end of file
diff --git a/tools/ui/node_modules/eslint-config-prettier/prettier.d.ts b/tools/ui/node_modules/eslint-config-prettier/prettier.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..19b02c2c60c906ce45be1d95c9ec8313278ebd59
--- /dev/null
+++ b/tools/ui/node_modules/eslint-config-prettier/prettier.d.ts
@@ -0,0 +1 @@
+export const rules: Record;
diff --git a/tools/ui/node_modules/eslint-config-prettier/prettier.js b/tools/ui/node_modules/eslint-config-prettier/prettier.js
new file mode 100644
index 0000000000000000000000000000000000000000..b9ec0f73602cde3ea57d72c475b1ada105899331
--- /dev/null
+++ b/tools/ui/node_modules/eslint-config-prettier/prettier.js
@@ -0,0 +1,10 @@
+"use strict";
+
+exports.rules = {
+ // These are safe to use as long as the `"prettier/prettier"` rule from
+ // eslint-plugin-prettier isn’t enabled.
+ // These are also included in `"plugin:prettier/recommended"`:
+ // https://github.com/prettier/eslint-plugin-prettier#recommended-configuration
+ "arrow-body-style": 0,
+ "prefer-arrow-callback": 0,
+};
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/alphabet.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/alphabet.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..0d6a025e9dab5bc9a50f15638f6a25b883d6f6c4
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/alphabet.d.ts
@@ -0,0 +1,2 @@
+export * from './utils/alphabet.js'
+export {}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/index.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/index.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..e45abd43901cd12deae9c528e4d435b37c3f7590
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/index.d.ts
@@ -0,0 +1,43 @@
+import { ESLint, Linter } from 'eslint'
+interface PluginConfigs extends Record<
+ string,
+ Linter.LegacyConfig | Linter.Config[] | Linter.Config
+> {
+ 'recommended-alphabetical-legacy': Linter.LegacyConfig
+ 'recommended-line-length-legacy': Linter.LegacyConfig
+ 'recommended-natural-legacy': Linter.LegacyConfig
+ 'recommended-custom-legacy': Linter.LegacyConfig
+ 'recommended-alphabetical': Linter.Config
+ 'recommended-line-length': Linter.Config
+ 'recommended-natural': Linter.Config
+ 'recommended-custom': Linter.Config
+}
+export declare let rules: ESLint.Plugin['rules']
+export declare let configs: PluginConfigs
+declare const _default: {
+ configs: PluginConfigs
+} & ESLint.Plugin
+export default _default
+export type { Options as SortVariableDeclarationsOptions } from './rules/sort-variable-declarations/types.js'
+export type { Options as SortIntersectionTypesOptions } from './rules/sort-intersection-types/types.js'
+export type { Options as SortImportAttributesOptions } from './rules/sort-import-attributes/types.js'
+export type { Options as SortExportAttributesOptions } from './rules/sort-export-attributes/types.js'
+export type { Options as SortHeritageClausesOptions } from './rules/sort-heritage-clauses/types.js'
+export type { Options as SortArrayIncludesOptions } from './rules/sort-array-includes/types.js'
+export type { Options as SortNamedImportsOptions } from './rules/sort-named-imports/types.js'
+export type { Options as SortNamedExportsOptions } from './rules/sort-named-exports/types.js'
+export type { Options as SortObjectTypesOptions } from './rules/sort-object-types/types.js'
+export type { Options as SortSwitchCaseOptions } from './rules/sort-switch-case/types.js'
+export type { Options as SortUnionTypesOptions } from './rules/sort-union-types/types.js'
+export type { Options as SortInterfacesOptions } from './rules/sort-interfaces/types.js'
+export type { Options as SortDecoratorsOptions } from './rules/sort-decorators/types.js'
+export type { Options as SortJsxPropsOptions } from './rules/sort-jsx-props/types.js'
+export type { Options as SortClassesOptions } from './rules/sort-classes/types.js'
+export type { Options as SortImportsOptions } from './rules/sort-imports/types.js'
+export type { Options as SortExportsOptions } from './rules/sort-exports/types.js'
+export type { Options as SortObjectsOptions } from './rules/sort-objects/types.js'
+export type { Options as SortModulesOptions } from './rules/sort-modules/types.js'
+export type { Options as SortArraysOptions } from './rules/sort-arrays/types.js'
+export type { Options as SortEnumsOptions } from './rules/sort-enums/types.js'
+export type { Options as SortMapsOptions } from './rules/sort-maps/types.js'
+export type { Options as SortSetsOptions } from './rules/sort-sets/types.js'
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/index.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/index.js
new file mode 100644
index 0000000000000000000000000000000000000000..9c1d705197a177de6b23f88a9cbaa8e2c9e63928
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/index.js
@@ -0,0 +1,119 @@
+import { name, version } from './package.json.js'
+import sort_variable_declarations_default from './rules/sort-variable-declarations.js'
+import sort_intersection_types_default from './rules/sort-intersection-types.js'
+import sort_import_attributes_default from './rules/sort-import-attributes.js'
+import sort_export_attributes_default from './rules/sort-export-attributes.js'
+import sort_heritage_clauses_default from './rules/sort-heritage-clauses.js'
+import sort_array_includes_default from './rules/sort-array-includes.js'
+import sort_named_imports_default from './rules/sort-named-imports.js'
+import sort_named_exports_default from './rules/sort-named-exports.js'
+import sort_object_types_default from './rules/sort-object-types.js'
+import sort_switch_case_default from './rules/sort-switch-case.js'
+import sort_union_types_default from './rules/sort-union-types.js'
+import sort_interfaces_default from './rules/sort-interfaces.js'
+import sort_decorators_default from './rules/sort-decorators.js'
+import sort_jsx_props_default from './rules/sort-jsx-props.js'
+import sort_classes_default from './rules/sort-classes.js'
+import sort_imports_default from './rules/sort-imports.js'
+import sort_exports_default from './rules/sort-exports.js'
+import sort_objects_default from './rules/sort-objects.js'
+import sort_modules_default from './rules/sort-modules.js'
+import sort_arrays_default from './rules/sort-arrays.js'
+import sort_enums_default from './rules/sort-enums.js'
+import sort_maps_default from './rules/sort-maps.js'
+import sort_sets_default from './rules/sort-sets.js'
+var pluginName = 'perfectionist'
+var recommendedRules = {
+ 'sort-variable-declarations': sort_variable_declarations_default,
+ 'sort-intersection-types': sort_intersection_types_default,
+ 'sort-import-attributes': sort_import_attributes_default,
+ 'sort-export-attributes': sort_export_attributes_default,
+ 'sort-heritage-clauses': sort_heritage_clauses_default,
+ 'sort-array-includes': sort_array_includes_default,
+ 'sort-named-imports': sort_named_imports_default,
+ 'sort-named-exports': sort_named_exports_default,
+ 'sort-object-types': sort_object_types_default,
+ 'sort-union-types': sort_union_types_default,
+ 'sort-switch-case': sort_switch_case_default,
+ 'sort-decorators': sort_decorators_default,
+ 'sort-interfaces': sort_interfaces_default,
+ 'sort-jsx-props': sort_jsx_props_default,
+ 'sort-modules': sort_modules_default,
+ 'sort-classes': sort_classes_default,
+ 'sort-imports': sort_imports_default,
+ 'sort-exports': sort_exports_default,
+ 'sort-objects': sort_objects_default,
+ 'sort-enums': sort_enums_default,
+ 'sort-sets': sort_sets_default,
+ 'sort-maps': sort_maps_default,
+}
+var rules = {
+ ...recommendedRules,
+ 'sort-arrays': sort_arrays_default,
+}
+var plugin = {
+ meta: {
+ version,
+ name,
+ },
+ rules,
+}
+function getRules(options) {
+ return Object.fromEntries(
+ Object.keys(recommendedRules).map(ruleName => [
+ `${pluginName}/${ruleName}`,
+ ['error', options],
+ ]),
+ )
+}
+function createConfig(options) {
+ return {
+ plugins: { [pluginName]: plugin },
+ rules: getRules(options),
+ }
+}
+function createLegacyConfig(options) {
+ return {
+ rules: getRules(options),
+ plugins: [pluginName],
+ }
+}
+var configs = {
+ 'recommended-alphabetical-legacy': createLegacyConfig({
+ type: 'alphabetical',
+ order: 'asc',
+ }),
+ 'recommended-line-length-legacy': createLegacyConfig({
+ type: 'line-length',
+ order: 'desc',
+ }),
+ 'recommended-natural-legacy': createLegacyConfig({
+ type: 'natural',
+ order: 'asc',
+ }),
+ 'recommended-custom-legacy': createLegacyConfig({
+ type: 'custom',
+ order: 'asc',
+ }),
+ 'recommended-alphabetical': createConfig({
+ type: 'alphabetical',
+ order: 'asc',
+ }),
+ 'recommended-line-length': createConfig({
+ type: 'line-length',
+ order: 'desc',
+ }),
+ 'recommended-natural': createConfig({
+ type: 'natural',
+ order: 'asc',
+ }),
+ 'recommended-custom': createConfig({
+ type: 'custom',
+ order: 'asc',
+ }),
+}
+var eslint_plugin_perfectionist_default = {
+ ...plugin,
+ configs,
+}
+export { configs, eslint_plugin_perfectionist_default as default, rules }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/package.json.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/package.json.js
new file mode 100644
index 0000000000000000000000000000000000000000..86a46cb8332b7b0c05d193106ff8ef3fc62ccf51
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/package.json.js
@@ -0,0 +1,3 @@
+var name = 'eslint-plugin-perfectionist'
+var version = '5.10.1'
+export { name, version }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-array-includes.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-array-includes.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..a1d1666121d1faaf895ba60ebfd2e8886eeb2f4f
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-array-includes.d.ts
@@ -0,0 +1,25 @@
+import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'
+import { Options } from './sort-array-includes/types.js'
+declare const ORDER_ERROR_ID = 'unexpectedArrayIncludesOrder'
+declare const GROUP_ORDER_ERROR_ID = 'unexpectedArrayIncludesGroupOrder'
+declare const EXTRA_SPACING_ERROR_ID = 'extraSpacingBetweenArrayIncludesMembers'
+declare const MISSED_SPACING_ERROR_ID =
+ 'missedSpacingBetweenArrayIncludesMembers'
+type MessageId =
+ | typeof MISSED_SPACING_ERROR_ID
+ | typeof EXTRA_SPACING_ERROR_ID
+ | typeof GROUP_ORDER_ERROR_ID
+ | typeof ORDER_ERROR_ID
+export declare let defaultOptions: Required
+export declare let jsonSchema: JSONSchema4
+declare const _default: import('@typescript-eslint/utils/ts-eslint').RuleModule<
+ MessageId,
+ import('...js').SortArraysOptions,
+ {
+ recommended?: boolean
+ },
+ import('@typescript-eslint/utils/ts-eslint').RuleListener
+> & {
+ name: string
+}
+export default _default
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-array-includes.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-array-includes.js
new file mode 100644
index 0000000000000000000000000000000000000000..79f4ec229c1f3511087ee9feaca8cb76d8d54aa6
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-array-includes.js
@@ -0,0 +1,128 @@
+import {
+ buildCommonJsonSchemas,
+ buildUseConfigIfJsonSchema,
+ matchesAstSelectorJsonSchema,
+} from '../utils/json-schemas/common-json-schemas.js'
+import { buildCommonGroupsJsonSchemas } from '../utils/json-schemas/common-groups-json-schemas.js'
+import {
+ EXTRA_SPACING_ERROR,
+ GROUP_ORDER_ERROR,
+ MISSED_SPACING_ERROR,
+ ORDER_ERROR,
+} from '../utils/report-errors.js'
+import {
+ partitionByCommentJsonSchema,
+ partitionByNewlineJsonSchema,
+} from '../utils/json-schemas/common-partition-json-schemas.js'
+import { buildAstListeners } from '../utils/build-ast-listeners.js'
+import { createEslintRule } from '../utils/create-eslint-rule.js'
+import { additionalCustomGroupMatchOptionsJsonSchema } from './sort-arrays/types.js'
+import { sortArray } from './sort-arrays/sort-array.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Cache computed groups by modifiers and selectors for performance.
+ */
+var cachedGroupsByModifiersAndSelectors = /* @__PURE__ */ new Map()
+var ORDER_ERROR_ID = 'unexpectedArrayIncludesOrder'
+var GROUP_ORDER_ERROR_ID = 'unexpectedArrayIncludesGroupOrder'
+var EXTRA_SPACING_ERROR_ID = 'extraSpacingBetweenArrayIncludesMembers'
+var MISSED_SPACING_ERROR_ID = 'missedSpacingBetweenArrayIncludesMembers'
+var defaultOptions = {
+ fallbackSort: { type: 'unsorted' },
+ newlinesInside: 'newlinesBetween',
+ specialCharacters: 'keep',
+ partitionByComment: false,
+ partitionByNewLine: false,
+ newlinesBetween: 'ignore',
+ useConfigurationIf: {},
+ type: 'alphabetical',
+ groups: ['literal'],
+ ignoreCase: true,
+ locales: 'en-US',
+ customGroups: [],
+ alphabet: '',
+ order: 'asc',
+}
+var jsonSchema = {
+ items: {
+ properties: {
+ ...buildCommonJsonSchemas(),
+ ...buildCommonGroupsJsonSchemas({
+ additionalCustomGroupMatchProperties:
+ additionalCustomGroupMatchOptionsJsonSchema,
+ }),
+ useConfigurationIf: buildUseConfigIfJsonSchema({
+ additionalProperties: {
+ matchesAstSelector: matchesAstSelectorJsonSchema,
+ },
+ }),
+ partitionByComment: partitionByCommentJsonSchema,
+ partitionByNewLine: partitionByNewlineJsonSchema,
+ },
+ additionalProperties: false,
+ type: 'object',
+ },
+ uniqueItems: true,
+ type: 'array',
+}
+var sort_array_includes_default = createEslintRule({
+ meta: {
+ messages: {
+ [MISSED_SPACING_ERROR_ID]: MISSED_SPACING_ERROR,
+ [EXTRA_SPACING_ERROR_ID]: EXTRA_SPACING_ERROR,
+ [GROUP_ORDER_ERROR_ID]: GROUP_ORDER_ERROR,
+ [ORDER_ERROR_ID]: ORDER_ERROR,
+ },
+ docs: {
+ description: 'Enforce sorted arrays before include method.',
+ url: 'https://perfectionist.dev/rules/sort-array-includes',
+ recommended: true,
+ },
+ schema: jsonSchema,
+ type: 'suggestion',
+ fixable: 'code',
+ },
+ create: context =>
+ buildAstListeners({
+ nodeTypes: [AST_NODE_TYPES.NewExpression, AST_NODE_TYPES.ArrayExpression],
+ sorter: sortPotentiallyValidArray,
+ context,
+ }),
+ defaultOptions: [defaultOptions],
+ name: 'sort-array-includes',
+})
+function sortPotentiallyValidArray({ matchedAstSelectors, context, node }) {
+ if (!isValidArray()) {
+ return
+ }
+ sortArray({
+ availableMessageIds: {
+ missedSpacingBetweenMembers: MISSED_SPACING_ERROR_ID,
+ extraSpacingBetweenMembers: EXTRA_SPACING_ERROR_ID,
+ unexpectedGroupOrder: GROUP_ORDER_ERROR_ID,
+ unexpectedOrder: ORDER_ERROR_ID,
+ },
+ mustHaveMatchedContextOptions: false,
+ cachedGroupsByModifiersAndSelectors,
+ matchedAstSelectors,
+ defaultOptions,
+ context,
+ node,
+ })
+ function isValidArray() {
+ if (node.parent.type !== AST_NODE_TYPES.MemberExpression) {
+ return false
+ }
+ if (node.parent.property.type !== AST_NODE_TYPES.Identifier) {
+ return false
+ }
+ if (node.parent.property.name !== 'includes') {
+ return false
+ }
+ if (node.parent.parent.type !== AST_NODE_TYPES.CallExpression) {
+ return false
+ }
+ return node.parent.parent.callee === node.parent
+ }
+}
+export { sort_array_includes_default as default, defaultOptions, jsonSchema }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-array-includes/types.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-array-includes/types.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..c3335c8c0cd598be851c19c33d5bffb34f1c2c8e
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-array-includes/types.d.ts
@@ -0,0 +1,2 @@
+import { Options as SortArraysOptions } from '../sort-arrays/types.js'
+export type Options = SortArraysOptions
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-arrays.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-arrays.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..0590a52e5e855ffdf8b60bd831287705997cbb0b
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-arrays.d.ts
@@ -0,0 +1,21 @@
+import { Options } from './sort-arrays/types.js'
+declare const ORDER_ERROR_ID = 'unexpectedArraysOrder'
+declare const GROUP_ORDER_ERROR_ID = 'unexpectedArraysGroupOrder'
+declare const EXTRA_SPACING_ERROR_ID = 'extraSpacingBetweenArraysMembers'
+declare const MISSED_SPACING_ERROR_ID = 'missedSpacingBetweenArraysMembers'
+type MessageId =
+ | typeof MISSED_SPACING_ERROR_ID
+ | typeof EXTRA_SPACING_ERROR_ID
+ | typeof GROUP_ORDER_ERROR_ID
+ | typeof ORDER_ERROR_ID
+declare const _default: import('@typescript-eslint/utils/ts-eslint').RuleModule<
+ MessageId,
+ Options,
+ {
+ recommended?: boolean
+ },
+ import('@typescript-eslint/utils/ts-eslint').RuleListener
+> & {
+ name: string
+}
+export default _default
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-arrays.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-arrays.js
new file mode 100644
index 0000000000000000000000000000000000000000..3852050c1648e39dafb48c9499248e45a5a2a233
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-arrays.js
@@ -0,0 +1,112 @@
+import {
+ buildCommonJsonSchemas,
+ buildUseConfigIfJsonSchema,
+ matchesAstSelectorJsonSchema,
+} from '../utils/json-schemas/common-json-schemas.js'
+import { buildCommonGroupsJsonSchemas } from '../utils/json-schemas/common-groups-json-schemas.js'
+import {
+ EXTRA_SPACING_ERROR,
+ GROUP_ORDER_ERROR,
+ MISSED_SPACING_ERROR,
+ ORDER_ERROR,
+} from '../utils/report-errors.js'
+import {
+ partitionByCommentJsonSchema,
+ partitionByNewlineJsonSchema,
+} from '../utils/json-schemas/common-partition-json-schemas.js'
+import { buildAstListeners } from '../utils/build-ast-listeners.js'
+import { createEslintRule } from '../utils/create-eslint-rule.js'
+import { additionalCustomGroupMatchOptionsJsonSchema } from './sort-arrays/types.js'
+import { sortArray } from './sort-arrays/sort-array.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Cache computed groups by modifiers and selectors for performance.
+ */
+var cachedGroupsByModifiersAndSelectors = /* @__PURE__ */ new Map()
+var ORDER_ERROR_ID = 'unexpectedArraysOrder'
+var GROUP_ORDER_ERROR_ID = 'unexpectedArraysGroupOrder'
+var EXTRA_SPACING_ERROR_ID = 'extraSpacingBetweenArraysMembers'
+var MISSED_SPACING_ERROR_ID = 'missedSpacingBetweenArraysMembers'
+var defaultOptions = {
+ fallbackSort: { type: 'unsorted' },
+ newlinesInside: 'newlinesBetween',
+ specialCharacters: 'keep',
+ partitionByComment: false,
+ partitionByNewLine: false,
+ newlinesBetween: 'ignore',
+ useConfigurationIf: {},
+ type: 'alphabetical',
+ groups: ['literal'],
+ ignoreCase: true,
+ locales: 'en-US',
+ customGroups: [],
+ alphabet: '',
+ order: 'asc',
+}
+var jsonSchema = {
+ items: {
+ properties: {
+ ...buildCommonJsonSchemas(),
+ ...buildCommonGroupsJsonSchemas({
+ additionalCustomGroupMatchProperties:
+ additionalCustomGroupMatchOptionsJsonSchema,
+ }),
+ useConfigurationIf: buildUseConfigIfJsonSchema({
+ additionalProperties: {
+ matchesAstSelector: matchesAstSelectorJsonSchema,
+ },
+ }),
+ partitionByComment: partitionByCommentJsonSchema,
+ partitionByNewLine: partitionByNewlineJsonSchema,
+ },
+ required: ['useConfigurationIf'],
+ additionalProperties: false,
+ type: 'object',
+ },
+ uniqueItems: true,
+ type: 'array',
+ minItems: 1,
+}
+var sort_arrays_default = createEslintRule({
+ meta: {
+ messages: {
+ [MISSED_SPACING_ERROR_ID]: MISSED_SPACING_ERROR,
+ [EXTRA_SPACING_ERROR_ID]: EXTRA_SPACING_ERROR,
+ [GROUP_ORDER_ERROR_ID]: GROUP_ORDER_ERROR,
+ [ORDER_ERROR_ID]: ORDER_ERROR,
+ },
+ docs: {
+ url: 'https://perfectionist.dev/rules/sort-arrays',
+ description: 'Enforce sorted arrays.',
+ recommended: false,
+ },
+ schema: jsonSchema,
+ type: 'suggestion',
+ fixable: 'code',
+ },
+ create: context =>
+ buildAstListeners({
+ nodeTypes: [AST_NODE_TYPES.NewExpression, AST_NODE_TYPES.ArrayExpression],
+ context,
+ sorter,
+ }),
+ defaultOptions: [defaultOptions],
+ name: 'sort-arrays',
+})
+function sorter({ matchedAstSelectors, context, node }) {
+ sortArray({
+ availableMessageIds: {
+ missedSpacingBetweenMembers: MISSED_SPACING_ERROR_ID,
+ extraSpacingBetweenMembers: EXTRA_SPACING_ERROR_ID,
+ unexpectedGroupOrder: GROUP_ORDER_ERROR_ID,
+ unexpectedOrder: ORDER_ERROR_ID,
+ },
+ cachedGroupsByModifiersAndSelectors,
+ mustHaveMatchedContextOptions: true,
+ matchedAstSelectors,
+ defaultOptions,
+ context,
+ node,
+ })
+}
+export { sort_arrays_default as default }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-arrays/compute-array-elements.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-arrays/compute-array-elements.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..8b0a9d5bb44e17826a5920f1681a028ede380431
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-arrays/compute-array-elements.d.ts
@@ -0,0 +1,11 @@
+import { TSESTree } from '@typescript-eslint/types'
+/**
+ * Computes array elements for the given expression.
+ *
+ * @param expression - The expression to compute array elements from.
+ * @returns An array of elements if the expression is an array or a new
+ * expression, otherwise null.
+ */
+export declare function computeArrayElements(
+ expression: TSESTree.ArrayExpression | TSESTree.NewExpression,
+): (TSESTree.SpreadElement | TSESTree.Expression | null)[] | null
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-arrays/compute-array-elements.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-arrays/compute-array-elements.js
new file mode 100644
index 0000000000000000000000000000000000000000..9ab801256ae235e887eb8e67a185c2391685ebb1
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-arrays/compute-array-elements.js
@@ -0,0 +1,27 @@
+import { UnreachableCaseError } from '../../utils/unreachable-case-error.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Computes array elements for the given expression.
+ *
+ * @param expression - The expression to compute array elements from.
+ * @returns An array of elements if the expression is an array or a new
+ * expression, otherwise null.
+ */
+function computeArrayElements(expression) {
+ switch (expression.type) {
+ case AST_NODE_TYPES.ArrayExpression:
+ return expression.elements
+ case AST_NODE_TYPES.NewExpression:
+ if (expression.callee.type !== AST_NODE_TYPES.Identifier) {
+ return null
+ }
+ if (expression.callee.name !== 'Array') {
+ return null
+ }
+ return expression.arguments
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(expression)
+ }
+}
+export { computeArrayElements }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-arrays/compute-matched-context-options.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-arrays/compute-matched-context-options.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..c88827ad199a52aa3ef6f6729166c2b1367dda20
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-arrays/compute-matched-context-options.d.ts
@@ -0,0 +1,25 @@
+import { RuleContext } from '@typescript-eslint/utils/ts-eslint'
+import { TSESTree } from '@typescript-eslint/types'
+import { Options } from './types.js'
+/**
+ * Computes the matched context options for a given array node.
+ *
+ * @param params - Parameters.
+ * @param params.matchedAstSelectors - The matched AST selectors for an array
+ * node.
+ * @param params.elements - The array elements to compute the context options
+ * for.
+ * @param params.context - The rule context.
+ * @returns The matched context options or undefined if none match.
+ */
+export declare function computeMatchedContextOptions<
+ MessageIds extends string,
+>({
+ matchedAstSelectors,
+ elements,
+ context,
+}: {
+ elements: (TSESTree.SpreadElement | TSESTree.Expression | null)[]
+ context: Readonly>
+ matchedAstSelectors: ReadonlySet
+}): Options[number] | undefined
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-arrays/compute-matched-context-options.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-arrays/compute-matched-context-options.js
new file mode 100644
index 0000000000000000000000000000000000000000..ddf95b2774e5dc235b4d73f9e8d9f2f3d634bcf9
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-arrays/compute-matched-context-options.js
@@ -0,0 +1,51 @@
+import { passesAllNamesMatchPatternFilter } from '../../utils/context-matching/passes-all-names-match-pattern-filter.js'
+import { passesAstSelectorFilter } from '../../utils/context-matching/passes-ast-selector-filter.js'
+import { computeNodeName } from './compute-node-name.js'
+/**
+ * Computes the matched context options for a given array node.
+ *
+ * @param params - Parameters.
+ * @param params.matchedAstSelectors - The matched AST selectors for an array
+ * node.
+ * @param params.elements - The array elements to compute the context options
+ * for.
+ * @param params.context - The rule context.
+ * @returns The matched context options or undefined if none match.
+ */
+function computeMatchedContextOptions({
+ matchedAstSelectors,
+ elements,
+ context,
+}) {
+ let nodeNames = elements
+ .filter(element => element !== null)
+ .map(element =>
+ computeNodeName({
+ sourceCode: context.sourceCode,
+ node: element,
+ }),
+ )
+ return context.options.find(options =>
+ isContextOptionMatching({
+ matchedAstSelectors,
+ nodeNames,
+ options,
+ }),
+ )
+}
+function isContextOptionMatching({ matchedAstSelectors, nodeNames, options }) {
+ if (!options.useConfigurationIf) {
+ return true
+ }
+ return (
+ passesAllNamesMatchPatternFilter({
+ allNamesMatchPattern: options.useConfigurationIf.allNamesMatchPattern,
+ nodeNames,
+ }) &&
+ passesAstSelectorFilter({
+ matchesAstSelector: options.useConfigurationIf.matchesAstSelector,
+ matchedAstSelectors,
+ })
+ )
+}
+export { computeMatchedContextOptions }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-arrays/compute-node-name.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-arrays/compute-node-name.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..69fefe83bd665f57b4017859cf945c51d7bc5597
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-arrays/compute-node-name.d.ts
@@ -0,0 +1,17 @@
+import { TSESTree } from '@typescript-eslint/types'
+import { TSESLint } from '@typescript-eslint/utils'
+/**
+ * Computes the name of an array member.
+ *
+ * @param props - The parameters object.
+ * @param props.sourceCode - ESLint source code object for text extraction.
+ * @param props.node - The AST node representing an array member.
+ * @returns The name of the array member.
+ */
+export declare function computeNodeName({
+ sourceCode,
+ node,
+}: {
+ node: TSESTree.SpreadElement | TSESTree.Expression
+ sourceCode: TSESLint.SourceCode
+}): string
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-arrays/compute-node-name.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-arrays/compute-node-name.js
new file mode 100644
index 0000000000000000000000000000000000000000..592c8740bca9d7fe7ea9f0cdf276754367af6a8c
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-arrays/compute-node-name.js
@@ -0,0 +1,15 @@
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Computes the name of an array member.
+ *
+ * @param props - The parameters object.
+ * @param props.sourceCode - ESLint source code object for text extraction.
+ * @param props.node - The AST node representing an array member.
+ * @returns The name of the array member.
+ */
+function computeNodeName({ sourceCode, node }) {
+ return node.type === AST_NODE_TYPES.Literal ?
+ String(node.value)
+ : sourceCode.getText(node)
+}
+export { computeNodeName }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-arrays/sort-array.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-arrays/sort-array.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..3de0c4d4ca09ce02e1b850cca4e60ddfc3c4c38a
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-arrays/sort-array.d.ts
@@ -0,0 +1,25 @@
+import { RuleContext } from '@typescript-eslint/utils/ts-eslint'
+import { TSESTree } from '@typescript-eslint/types'
+import { Options } from './types.js'
+export declare function sortArray({
+ cachedGroupsByModifiersAndSelectors,
+ mustHaveMatchedContextOptions,
+ availableMessageIds,
+ matchedAstSelectors,
+ defaultOptions,
+ context,
+ node,
+}: {
+ availableMessageIds: {
+ missedSpacingBetweenMembers: MessageIds
+ extraSpacingBetweenMembers: MessageIds
+ unexpectedGroupOrder: MessageIds
+ unexpectedOrder: MessageIds
+ }
+ cachedGroupsByModifiersAndSelectors: Map
+ node: TSESTree.ArrayExpression | TSESTree.NewExpression
+ context: Readonly>
+ defaultOptions: Required
+ matchedAstSelectors: ReadonlySet
+ mustHaveMatchedContextOptions: boolean
+}): void
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-arrays/sort-array.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-arrays/sort-array.js
new file mode 100644
index 0000000000000000000000000000000000000000..e063c8f44d8451538358ddfbfc346fccb523ec30
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-arrays/sort-array.js
@@ -0,0 +1,138 @@
+import { defaultComparatorByOptionsComputer } from '../../utils/compare/default-comparator-by-options-computer.js'
+import { validateNewlinesAndPartitionConfig } from '../../utils/validate-newlines-and-partition-config.js'
+import { buildOptionsByGroupIndexComputer } from '../../utils/build-options-by-group-index-computer.js'
+import { validateCustomSortConfig } from '../../utils/validate-custom-sort-config.js'
+import { generatePredefinedGroups } from '../../utils/generate-predefined-groups.js'
+import { getEslintDisabledLines } from '../../utils/get-eslint-disabled-lines.js'
+import { doesCustomGroupMatch } from '../../utils/does-custom-group-match.js'
+import { isNodeEslintDisabled } from '../../utils/is-node-eslint-disabled.js'
+import { validateGroupsConfig } from '../../utils/validate-groups-config.js'
+import { sortNodesByGroups } from '../../utils/sort-nodes-by-groups.js'
+import { reportAllErrors } from '../../utils/report-all-errors.js'
+import { shouldPartition } from '../../utils/should-partition.js'
+import { computeGroup } from '../../utils/compute-group.js'
+import { rangeToDiff } from '../../utils/range-to-diff.js'
+import { getSettings } from '../../utils/get-settings.js'
+import { isSortable } from '../../utils/is-sortable.js'
+import { complete } from '../../utils/complete.js'
+import { allSelectors } from './types.js'
+import { computeNodeName } from './compute-node-name.js'
+import { computeMatchedContextOptions } from './compute-matched-context-options.js'
+import { computeArrayElements } from './compute-array-elements.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+function sortArray({
+ cachedGroupsByModifiersAndSelectors,
+ mustHaveMatchedContextOptions,
+ availableMessageIds,
+ matchedAstSelectors,
+ defaultOptions,
+ context,
+ node,
+}) {
+ let elements = computeArrayElements(node)
+ if (!elements) {
+ return
+ }
+ if (!isSortable(elements)) {
+ return
+ }
+ let { sourceCode, id } = context
+ let settings = getSettings(context.settings)
+ let matchedContextOptions = computeMatchedContextOptions({
+ matchedAstSelectors,
+ elements,
+ context,
+ })
+ if (mustHaveMatchedContextOptions && !matchedContextOptions) {
+ return
+ }
+ let options = complete(matchedContextOptions, settings, defaultOptions)
+ validateCustomSortConfig(options)
+ validateGroupsConfig({
+ selectors: allSelectors,
+ modifiers: [],
+ options,
+ })
+ validateNewlinesAndPartitionConfig(options)
+ let eslintDisabledLines = getEslintDisabledLines({
+ ruleName: id,
+ sourceCode,
+ })
+ let optionsByGroupIndexComputer = buildOptionsByGroupIndexComputer(options)
+ let formattedMembers = elements.reduce(
+ (accumulator, element) => {
+ if (element === null) {
+ return accumulator
+ }
+ if (element.type === AST_NODE_TYPES.SpreadElement) {
+ accumulator.push([])
+ return accumulator
+ }
+ let name = computeNodeName({
+ node: element,
+ sourceCode,
+ })
+ let selector = 'literal'
+ let predefinedGroups = generatePredefinedGroups({
+ cache: cachedGroupsByModifiersAndSelectors,
+ selectors: [selector],
+ modifiers: [],
+ })
+ let group = computeGroup({
+ customGroupMatcher: customGroup =>
+ doesCustomGroupMatch({
+ selectors: [selector],
+ elementName: name,
+ modifiers: [],
+ customGroup,
+ }),
+ predefinedGroups,
+ options,
+ })
+ let sortingNode = {
+ isEslintDisabled: isNodeEslintDisabled(element, eslintDisabledLines),
+ size: rangeToDiff(element, sourceCode),
+ node: element,
+ group,
+ name,
+ }
+ let lastSortingNode = accumulator.at(-1)?.at(-1)
+ if (
+ shouldPartition({
+ lastSortingNode,
+ sortingNode,
+ sourceCode,
+ options,
+ })
+ ) {
+ accumulator.push([])
+ }
+ accumulator.at(-1).push({
+ ...sortingNode,
+ partitionId: accumulator.length,
+ })
+ return accumulator
+ },
+ [[]],
+ )
+ function sortNodesExcludingEslintDisabled(ignoreEslintDisabledNodes) {
+ return formattedMembers.flatMap(nodes =>
+ sortNodesByGroups({
+ comparatorByOptionsComputer: defaultComparatorByOptionsComputer,
+ optionsByGroupIndexComputer,
+ ignoreEslintDisabledNodes,
+ groups: options.groups,
+ nodes,
+ }),
+ )
+ }
+ let nodes = formattedMembers.flat()
+ reportAllErrors({
+ sortNodesExcludingEslintDisabled,
+ availableMessageIds,
+ options,
+ context,
+ nodes,
+ })
+}
+export { sortArray }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-arrays/types.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-arrays/types.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..5169b0e4ec1d68144edb67b31402ff0f1fba55c0
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-arrays/types.d.ts
@@ -0,0 +1,74 @@
+import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'
+import { RegexOption, TypeOption } from '../../types/common-options.js'
+import { AllCommonOptions } from '../../types/all-common-options.js'
+/**
+ * Configuration options for the sort-array-includes rule.
+ *
+ * This rule enforces the sorting of arrays passed to the `.includes()` method,
+ * ensuring consistent ordering of array elements for better readability and
+ * maintainability.
+ */
+export type Options = Partial<
+ {
+ /**
+ * Conditional configuration based on pattern matching.
+ */
+ useConfigurationIf: {
+ /**
+ * Regular expression pattern to match against all array element names.
+ * The rule is only applied when all names match this pattern.
+ */
+ allNamesMatchPattern?: RegexOption
+ /**
+ * AST selector to match against ArrayExpression nodes.
+ */
+ matchesAstSelector?: string
+ }
+ } & AllCommonOptions<
+ TypeOption,
+ AdditionalSortOptions,
+ CustomGroupMatchOptions
+ >
+>[]
+/**
+ * Represents the type of array element selector. Note: Spread elements are not
+ * sorted and act as partition boundaries.
+ */
+export type Selector = (typeof allSelectors)[number]
+/**
+ * Additional configuration for a single custom group.
+ *
+ * Custom groups allow fine-grained control over how array elements are grouped
+ * and sorted based on their names and types.
+ *
+ * @example
+ *
+ * ```ts
+ * {
+ * "selector": "literal"
+ * }
+ * ```
+ */
+interface CustomGroupMatchOptions {
+ /**
+ * Specifies the type of array elements to include in this group. Only
+ * 'literal' is available since spread elements create partition boundaries
+ * and are not sorted.
+ */
+ selector?: Selector
+}
+type AdditionalSortOptions = object
+/**
+ * Complete list of available selectors for array elements. Used for validation
+ * and JSON schema generation.
+ */
+export declare let allSelectors: readonly ['literal']
+/**
+ * Additional custom group match options JSON schema. Used by ESLint to validate
+ * rule options at configuration time.
+ */
+export declare let additionalCustomGroupMatchOptionsJsonSchema: Record<
+ string,
+ JSONSchema4
+>
+export {}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-arrays/types.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-arrays/types.js
new file mode 100644
index 0000000000000000000000000000000000000000..a9830c524c6e863479c07aa677a3a314da752086
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-arrays/types.js
@@ -0,0 +1,14 @@
+import { buildCustomGroupSelectorJsonSchema } from '../../utils/json-schemas/common-groups-json-schemas.js'
+/**
+ * Complete list of available selectors for array elements. Used for validation
+ * and JSON schema generation.
+ */
+var allSelectors = ['literal']
+/**
+ * Additional custom group match options JSON schema. Used by ESLint to validate
+ * rule options at configuration time.
+ */
+var additionalCustomGroupMatchOptionsJsonSchema = {
+ selector: buildCustomGroupSelectorJsonSchema(allSelectors),
+}
+export { additionalCustomGroupMatchOptionsJsonSchema, allSelectors }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..a3d6b0d7297e348082ebc97283c0a3e05a44b6e1
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes.d.ts
@@ -0,0 +1,12 @@
+import { MessageId, Options } from './sort-classes/types.js'
+declare const _default: import('@typescript-eslint/utils/ts-eslint').RuleModule<
+ MessageId,
+ Options,
+ {
+ recommended?: boolean
+ },
+ import('@typescript-eslint/utils/ts-eslint').RuleListener
+> & {
+ name: string
+}
+export default _default
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes.js
new file mode 100644
index 0000000000000000000000000000000000000000..831f893a16675dae3e0aa4bebb2f5a1023adf526
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes.js
@@ -0,0 +1,87 @@
+import {
+ buildCommonJsonSchemas,
+ buildRegexJsonSchema,
+ buildUseConfigIfJsonSchema,
+ matchesAstSelectorJsonSchema,
+ useExperimentalDependencyDetectionJsonSchema,
+} from '../utils/json-schemas/common-json-schemas.js'
+import {
+ buildCommonGroupsJsonSchemas,
+ newlinesBetweenJsonSchema,
+} from '../utils/json-schemas/common-groups-json-schemas.js'
+import {
+ DEPENDENCY_ORDER_ERROR,
+ EXTRA_SPACING_ERROR,
+ GROUP_ORDER_ERROR,
+ MISSED_SPACING_ERROR,
+ ORDER_ERROR,
+} from '../utils/report-errors.js'
+import {
+ partitionByCommentJsonSchema,
+ partitionByNewlineJsonSchema,
+} from '../utils/json-schemas/common-partition-json-schemas.js'
+import { buildAstListeners } from '../utils/build-ast-listeners.js'
+import { createEslintRule } from '../utils/create-eslint-rule.js'
+import {
+ DEPENDENCY_ORDER_ERROR_ID,
+ EXTRA_SPACING_ERROR_ID,
+ GROUP_ORDER_ERROR_ID,
+ MISSED_SPACING_ERROR_ID,
+ ORDER_ERROR_ID,
+ additionalCustomGroupMatchOptionsJsonSchema,
+} from './sort-classes/types.js'
+import { defaultOptions, sortClass } from './sort-classes/sort-class.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+var sort_classes_default = createEslintRule({
+ meta: {
+ schema: {
+ items: {
+ properties: {
+ ...buildCommonJsonSchemas(),
+ ...buildCommonGroupsJsonSchemas({
+ additionalCustomGroupMatchProperties:
+ additionalCustomGroupMatchOptionsJsonSchema,
+ }),
+ useConfigurationIf: buildUseConfigIfJsonSchema({
+ additionalProperties: {
+ matchesAstSelector: matchesAstSelectorJsonSchema,
+ },
+ }),
+ useExperimentalDependencyDetection:
+ useExperimentalDependencyDetectionJsonSchema,
+ newlinesBetweenOverloadSignatures: newlinesBetweenJsonSchema,
+ ignoreCallbackDependenciesPatterns: buildRegexJsonSchema(),
+ partitionByComment: partitionByCommentJsonSchema,
+ partitionByNewLine: partitionByNewlineJsonSchema,
+ },
+ additionalProperties: false,
+ type: 'object',
+ },
+ uniqueItems: true,
+ type: 'array',
+ },
+ messages: {
+ [DEPENDENCY_ORDER_ERROR_ID]: DEPENDENCY_ORDER_ERROR,
+ [MISSED_SPACING_ERROR_ID]: MISSED_SPACING_ERROR,
+ [EXTRA_SPACING_ERROR_ID]: EXTRA_SPACING_ERROR,
+ [GROUP_ORDER_ERROR_ID]: GROUP_ORDER_ERROR,
+ [ORDER_ERROR_ID]: ORDER_ERROR,
+ },
+ docs: {
+ url: 'https://perfectionist.dev/rules/sort-classes',
+ description: 'Enforce sorted classes.',
+ recommended: true,
+ },
+ type: 'suggestion',
+ fixable: 'code',
+ },
+ create: context =>
+ buildAstListeners({
+ nodeTypes: [AST_NODE_TYPES.ClassBody],
+ sorter: sortClass,
+ context,
+ }),
+ defaultOptions: [defaultOptions],
+ name: 'sort-classes',
+})
+export { sort_classes_default as default }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/compute-dependencies-by-sorting-node.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/compute-dependencies-by-sorting-node.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..15213eb447dbbaaa9d272232bafd26007ac2c83e
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/compute-dependencies-by-sorting-node.d.ts
@@ -0,0 +1,20 @@
+import { TSESTree } from '@typescript-eslint/types'
+import { TSESLint } from '@typescript-eslint/utils'
+import { SortClassesSortingNode } from './types.js'
+import { RegexOption } from '../../types/common-options.js'
+type SortingNodeWithoutDependencies = Omit<
+ SortClassesSortingNode,
+ 'dependencies'
+>
+export declare function computeDependenciesBySortingNode({
+ ignoreCallbackDependenciesPatterns,
+ sortingNodes,
+ sourceCode,
+ classBody,
+}: {
+ ignoreCallbackDependenciesPatterns: RegexOption
+ sortingNodes: SortingNodeWithoutDependencies[]
+ sourceCode: TSESLint.SourceCode
+ classBody: TSESTree.ClassBody
+}): Map
+export {}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/compute-dependencies-by-sorting-node.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/compute-dependencies-by-sorting-node.js
new file mode 100644
index 0000000000000000000000000000000000000000..4340686505f2122a5aefdd376b54f8c79e5c53e8
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/compute-dependencies-by-sorting-node.js
@@ -0,0 +1,186 @@
+import { UnreachableCaseError } from '../../utils/unreachable-case-error.js'
+import { matches } from '../../utils/matches.js'
+import { computeDependenciesBySortingNode as computeDependenciesBySortingNode$1 } from '../../utils/compute-dependencies-by-sorting-node.js'
+import { computeParentNodesWithTypes } from '../../utils/compute-parent-nodes-with-types.js'
+import { computeIdentifierNameDetails } from './compute-identifier-name-details.js'
+import { AST_NODE_TYPES, AST_TOKEN_TYPES } from '@typescript-eslint/utils'
+function computeDependenciesBySortingNode({
+ ignoreCallbackDependenciesPatterns,
+ sortingNodes,
+ sourceCode,
+ classBody,
+}) {
+ let staticSortingNodes = sortingNodes.filter(node => node.isStatic)
+ let dependenciesBySortingNode = computeDependenciesBySortingNode$1({
+ additionalIdentifierDependenciesComputer:
+ buildAdditionalIdentifierDependenciesComputer({
+ ignoreCallbackDependenciesPatterns,
+ staticSortingNodes,
+ classBody,
+ }),
+ shouldIgnoreSortingNodeComputer: sortingNode =>
+ shouldIgnoreDependencyComputation(sortingNode.node),
+ sortingNodes,
+ sourceCode,
+ })
+ let thisDependenciesBySortingNode =
+ computeThisExpressionDependenciesBySortingNode({
+ ignoreCallbackDependenciesPatterns,
+ sortingNodes,
+ sourceCode,
+ })
+ for (let [sortingNode, dependencies] of thisDependenciesBySortingNode) {
+ let existingDependencies = dependenciesBySortingNode.get(sortingNode) ?? []
+ dependenciesBySortingNode.set(sortingNode, [
+ ...existingDependencies,
+ ...dependencies,
+ ])
+ }
+ return dependenciesBySortingNode
+}
+function computeIdentifierOrThisExpressionDependency({
+ ignoreCallbackDependenciesPatterns,
+ sortingNodes,
+ classElement,
+ node,
+}) {
+ if (shouldIgnoreCallbackDependency()) {
+ return null
+ }
+ let { parent } = node
+ /* v8 ignore if -- @preserve Unsure how we can reach that case */
+ if (parent.type !== AST_NODE_TYPES.MemberExpression) {
+ return null
+ }
+ let dependencyName = computeDependencyNameFromMemberExpression(parent)
+ /* v8 ignore if -- @preserve Unsure how we can reach that case */
+ if (!dependencyName) {
+ return null
+ }
+ return (
+ sortingNodes.find(
+ currentSortingNode => currentSortingNode.name === dependencyName.name,
+ ) ?? null
+ )
+ function computeDependencyNameFromMemberExpression(memberExpression) {
+ switch (memberExpression.property.type) {
+ case AST_NODE_TYPES.PrivateIdentifier:
+ case AST_NODE_TYPES.Identifier:
+ case AST_NODE_TYPES.Literal:
+ return computeIdentifierNameDetails(memberExpression.property)
+ /* v8 ignore next 2 -- @preserve Unhandled cases */
+ default:
+ return null
+ }
+ }
+ function shouldIgnoreCallbackDependency() {
+ return computeParentNodesWithTypes({
+ allowedTypes: [AST_NODE_TYPES.CallExpression],
+ maxParent: classElement,
+ consecutiveOnly: false,
+ node,
+ }).some(shouldIgnoreCallExpression)
+ function shouldIgnoreCallExpression(callExpressionParent) {
+ return (
+ 'name' in callExpressionParent.callee &&
+ matches(
+ callExpressionParent.callee.name,
+ ignoreCallbackDependenciesPatterns,
+ )
+ )
+ }
+ }
+}
+function computeThisExpressionDependenciesBySortingNode({
+ ignoreCallbackDependenciesPatterns,
+ sortingNodes,
+ sourceCode,
+}) {
+ let dependenciesBySortingNode = /* @__PURE__ */ new Map()
+ let staticSortingNodes = sortingNodes.filter(node => node.isStatic)
+ let nonStaticSortingNodes = sortingNodes.filter(node => !node.isStatic)
+ let relevantSortingNodes = sortingNodes.filter(
+ sortingNode => !shouldIgnoreDependencyComputation(sortingNode.node),
+ )
+ for (let sortingNode of relevantSortingNodes) {
+ let dependencies = computeThisExpressionsInsideClassElement({
+ classElement: sortingNode.node,
+ sourceCode,
+ })
+ .map(thisExpression =>
+ computeIdentifierOrThisExpressionDependency({
+ sortingNodes:
+ sortingNode.isStatic ? staticSortingNodes : nonStaticSortingNodes,
+ ignoreCallbackDependenciesPatterns,
+ classElement: sortingNode.node,
+ node: thisExpression,
+ }),
+ )
+ .filter(dependency => dependency !== null)
+ if (dependencies.length === 0) {
+ continue
+ }
+ dependenciesBySortingNode.set(sortingNode, dependencies)
+ }
+ return dependenciesBySortingNode
+}
+function buildAdditionalIdentifierDependenciesComputer({
+ ignoreCallbackDependenciesPatterns,
+ staticSortingNodes,
+ classBody,
+}) {
+ return ({ referencingSortingNode, reference }) => {
+ if (!reference.resolved?.identifiers[0]) {
+ return []
+ }
+ let classIdentifier = classBody.parent.id
+ if (reference.resolved?.identifiers[0] !== classIdentifier) {
+ return []
+ }
+ let dependency = computeIdentifierOrThisExpressionDependency({
+ classElement: referencingSortingNode.node,
+ ignoreCallbackDependenciesPatterns,
+ sortingNodes: staticSortingNodes,
+ node: reference.identifier,
+ })
+ return dependency ? [dependency] : []
+ }
+}
+function shouldIgnoreDependencyComputation(node) {
+ switch (node.type) {
+ case AST_NODE_TYPES.TSAbstractPropertyDefinition:
+ case AST_NODE_TYPES.TSAbstractMethodDefinition:
+ case AST_NODE_TYPES.StaticBlock:
+ return false
+ case AST_NODE_TYPES.TSAbstractAccessorProperty:
+ case AST_NODE_TYPES.PropertyDefinition:
+ case AST_NODE_TYPES.AccessorProperty:
+ return (
+ node.value?.type === AST_NODE_TYPES.ArrowFunctionExpression ||
+ node.value?.type === AST_NODE_TYPES.FunctionExpression
+ )
+ case AST_NODE_TYPES.MethodDefinition:
+ case AST_NODE_TYPES.TSIndexSignature:
+ return true
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(node)
+ }
+}
+function computeThisExpressionsInsideClassElement({
+ classElement,
+ sourceCode,
+}) {
+ return sourceCode
+ .getTokens(classElement)
+ .filter(isThisToken)
+ .map(computeTokenNode)
+ .filter(node => node?.type === AST_NODE_TYPES.ThisExpression)
+ function computeTokenNode(token) {
+ return sourceCode.getNodeByRangeIndex(token.range[0])
+ }
+ function isThisToken(token) {
+ return token.type === AST_TOKEN_TYPES.Keyword && token.value === 'this'
+ }
+}
+export { computeDependenciesBySortingNode }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/compute-dependencies.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/compute-dependencies.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..e21d1db475b21e790218d8938008837faf874df7
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/compute-dependencies.d.ts
@@ -0,0 +1,29 @@
+import { TSESTree } from '@typescript-eslint/types'
+import { RegexOption } from '../../types/common-options.js'
+/**
+ * Computes the dependencies of a class member AST node.
+ *
+ * @deprecated - To remove when experimental dependency detection is the only.
+ * @param params - Parameters object.
+ * @param params.ignoreCallbackDependenciesPatterns - Patterns to ignore
+ * callback dependencies.
+ * @param params.useExperimentalDependencyDetection - Whether to use
+ * experimental dependency detection.
+ * @param params.isMemberStatic - Indicates if the member is static.
+ * @param params.expression - The AST node expression to analyze.
+ * @param params.className - The name of the class, if available.
+ * @returns The names of the dependencies.
+ */
+export declare function computeDependencies({
+ ignoreCallbackDependenciesPatterns,
+ useExperimentalDependencyDetection,
+ isMemberStatic,
+ expression,
+ className,
+}: {
+ expression: TSESTree.StaticBlock | TSESTree.Expression
+ ignoreCallbackDependenciesPatterns: RegexOption
+ useExperimentalDependencyDetection: boolean
+ className: undefined | string
+ isMemberStatic: boolean
+}): string[]
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/compute-dependencies.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/compute-dependencies.js
new file mode 100644
index 0000000000000000000000000000000000000000..3e000595fb670e1fbbf89eb8bd3dd7b34bb4ff8b
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/compute-dependencies.js
@@ -0,0 +1,163 @@
+import { matches } from '../../utils/matches.js'
+import { computeIdentifierNameDetails } from './compute-identifier-name-details.js'
+import { computeDependencyName } from './compute-dependency-name.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Computes the dependencies of a class member AST node.
+ *
+ * @deprecated - To remove when experimental dependency detection is the only.
+ * @param params - Parameters object.
+ * @param params.ignoreCallbackDependenciesPatterns - Patterns to ignore
+ * callback dependencies.
+ * @param params.useExperimentalDependencyDetection - Whether to use
+ * experimental dependency detection.
+ * @param params.isMemberStatic - Indicates if the member is static.
+ * @param params.expression - The AST node expression to analyze.
+ * @param params.className - The name of the class, if available.
+ * @returns The names of the dependencies.
+ */
+function computeDependencies({
+ ignoreCallbackDependenciesPatterns,
+ useExperimentalDependencyDetection,
+ isMemberStatic,
+ expression,
+ className,
+}) {
+ if (useExperimentalDependencyDetection) {
+ return []
+ }
+ let dependencies = []
+ traverseNode(expression)
+ return dependencies
+ function checkNode(nodeValue) {
+ switch (nodeValue.type) {
+ case AST_NODE_TYPES.ConditionalExpression:
+ traverseNode(nodeValue.test)
+ traverseNode(nodeValue.consequent)
+ traverseNode(nodeValue.alternate)
+ break
+ case AST_NODE_TYPES.MemberExpression:
+ dependencies.push(
+ ...computeMemberExpressionDependencies({
+ memberExpression: nodeValue,
+ isMemberStatic,
+ className,
+ }),
+ )
+ break
+ case AST_NODE_TYPES.CallExpression:
+ if (!('name' in nodeValue.callee)) {
+ traverseNode(nodeValue.arguments)
+ break
+ }
+ if (
+ matches(nodeValue.callee.name, ignoreCallbackDependenciesPatterns)
+ ) {
+ break
+ }
+ traverseNode(nodeValue.arguments)
+ break
+ case AST_NODE_TYPES.NewExpression:
+ traverseNode(nodeValue.arguments)
+ break
+ case AST_NODE_TYPES.Property:
+ traverseNode(nodeValue.key)
+ traverseNode(nodeValue.value)
+ }
+ if ('argument' in nodeValue && nodeValue.argument) {
+ traverseNode(nodeValue.argument)
+ }
+ if ('body' in nodeValue && nodeValue.body) {
+ traverseNode(nodeValue.body)
+ }
+ if ('callee' in nodeValue) {
+ traverseNode(nodeValue.callee)
+ }
+ if ('declarations' in nodeValue) {
+ traverseNode(nodeValue.declarations)
+ }
+ if ('elements' in nodeValue) {
+ traverseNode(
+ nodeValue.elements.filter(currentNode => currentNode !== null),
+ )
+ }
+ if (
+ 'expression' in nodeValue &&
+ typeof nodeValue.expression !== 'boolean'
+ ) {
+ traverseNode(nodeValue.expression)
+ }
+ if ('expressions' in nodeValue) {
+ traverseNode(nodeValue.expressions)
+ }
+ if ('init' in nodeValue && nodeValue.init) {
+ traverseNode(nodeValue.init)
+ }
+ if ('left' in nodeValue) {
+ traverseNode(nodeValue.left)
+ }
+ if ('object' in nodeValue) {
+ traverseNode(nodeValue.object)
+ }
+ if ('properties' in nodeValue) {
+ traverseNode(nodeValue.properties)
+ }
+ if ('right' in nodeValue) {
+ traverseNode(nodeValue.right)
+ }
+ }
+ function traverseNode(nodeValue) {
+ if (Array.isArray(nodeValue)) {
+ for (let nodeItem of nodeValue) {
+ traverseNode(nodeItem)
+ }
+ } else {
+ checkNode(nodeValue)
+ }
+ }
+}
+function computeMemberExpressionDependencies({
+ memberExpression,
+ isMemberStatic,
+ className,
+}) {
+ switch (memberExpression.object.type) {
+ case AST_NODE_TYPES.ThisExpression:
+ return computeIdentifierOrThisExpressionDependencies()
+ case AST_NODE_TYPES.Identifier:
+ return memberExpression.object.name === className ?
+ computeIdentifierOrThisExpressionDependencies()
+ : []
+ default:
+ return []
+ }
+ function computeIdentifierOrThisExpressionDependencies() {
+ let dependency = computeDependencyFromProperty()
+ /* v8 ignore next 2 -- @preserve Unhandled cases */
+ if (!dependency) {
+ return []
+ }
+ return [dependency]
+ }
+ function computeDependencyFromProperty() {
+ switch (memberExpression.property.type) {
+ case AST_NODE_TYPES.PrivateIdentifier:
+ case AST_NODE_TYPES.Identifier:
+ case AST_NODE_TYPES.Literal: {
+ let { nameWithoutStartingHash, hasPrivateHash } =
+ computeIdentifierNameDetails(memberExpression.property)
+ return computeDependencyName({
+ isStatic:
+ isMemberStatic ||
+ memberExpression.object.type === AST_NODE_TYPES.Identifier,
+ nodeNameWithoutStartingHash: nameWithoutStartingHash,
+ hasPrivateHash,
+ })
+ }
+ /* v8 ignore next 2 -- @preserve Unhandled cases */
+ default:
+ return null
+ }
+ }
+}
+export { computeDependencies }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/compute-dependency-name.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/compute-dependency-name.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..fb9f72896a376fff416fbff73b51eac98f021157
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/compute-dependency-name.d.ts
@@ -0,0 +1,9 @@
+export declare function computeDependencyName({
+ nodeNameWithoutStartingHash,
+ hasPrivateHash,
+ isStatic,
+}: {
+ nodeNameWithoutStartingHash: string
+ hasPrivateHash: boolean
+ isStatic: boolean
+}): string
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/compute-dependency-name.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/compute-dependency-name.js
new file mode 100644
index 0000000000000000000000000000000000000000..8d5685d1ce1b22dc08fc2d230ea929123adebe6e
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/compute-dependency-name.js
@@ -0,0 +1,8 @@
+function computeDependencyName({
+ nodeNameWithoutStartingHash,
+ hasPrivateHash,
+ isStatic,
+}) {
+ return `${isStatic ? 'static ' : ''}${hasPrivateHash ? '#' : ''}${nodeNameWithoutStartingHash}`
+}
+export { computeDependencyName }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/compute-identifier-name-details.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/compute-identifier-name-details.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..b2b10b63256ecec3f3aa44718cfc57c10f04d2f1
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/compute-identifier-name-details.d.ts
@@ -0,0 +1,12 @@
+import { TSESTree } from '@typescript-eslint/types'
+import { NodeNameDetails } from './types.js'
+/**
+ * Computes the name details of an identifier.
+ *
+ * @param node - The node to compute the name details for.
+ * @returns An object containing the name, whether it has a private hash, and
+ * the name without the starting hash.
+ */
+export declare function computeIdentifierNameDetails(
+ node: TSESTree.PrivateIdentifier | TSESTree.Identifier | TSESTree.Literal,
+): NodeNameDetails
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/compute-identifier-name-details.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/compute-identifier-name-details.js
new file mode 100644
index 0000000000000000000000000000000000000000..91b71a1476b6bf8b4521bf6a6ed634ecd4c20898
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/compute-identifier-name-details.js
@@ -0,0 +1,34 @@
+import { UnreachableCaseError } from '../../utils/unreachable-case-error.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Computes the name details of an identifier.
+ *
+ * @param node - The node to compute the name details for.
+ * @returns An object containing the name, whether it has a private hash, and
+ * the name without the starting hash.
+ */
+function computeIdentifierNameDetails(node) {
+ switch (node.type) {
+ case AST_NODE_TYPES.PrivateIdentifier:
+ return {
+ nameWithoutStartingHash: node.name,
+ name: `#${node.name}`,
+ hasPrivateHash: true,
+ }
+ case AST_NODE_TYPES.Identifier:
+ return buildNonPrivateHashDetails(node.name)
+ case AST_NODE_TYPES.Literal:
+ return buildNonPrivateHashDetails(String(node.value))
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(node)
+ }
+}
+function buildNonPrivateHashDetails(name) {
+ return {
+ nameWithoutStartingHash: name,
+ hasPrivateHash: false,
+ name,
+ }
+}
+export { computeIdentifierNameDetails }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/compute-matched-context-options.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/compute-matched-context-options.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..6e1ae8fe2baab3cd8412e5d7e50521e9160eab11
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/compute-matched-context-options.d.ts
@@ -0,0 +1,21 @@
+import { RuleContext } from '@typescript-eslint/utils/ts-eslint'
+import { TSESTree } from '@typescript-eslint/types'
+import { MessageId, Options } from './types.js'
+/**
+ * Computes the matched context options for a given class node.
+ *
+ * @param params - Parameters.
+ * @param params.matchedAstSelectors - The matched AST selectors for a class
+ * node.
+ * @param params.context - The rule context.
+ * @returns The matched context options or undefined if none match.
+ */
+export declare function computeMatchedContextOptions({
+ matchedAstSelectors,
+ classElements,
+ context,
+}: {
+ context: Readonly>
+ matchedAstSelectors: ReadonlySet
+ classElements: TSESTree.ClassElement[]
+}): Options[number] | undefined
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/compute-matched-context-options.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/compute-matched-context-options.js
new file mode 100644
index 0000000000000000000000000000000000000000..64e9f7ee251e7e46ddba9943648bba3ee1323235
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/compute-matched-context-options.js
@@ -0,0 +1,52 @@
+import { passesAllNamesMatchPatternFilter } from '../../utils/context-matching/passes-all-names-match-pattern-filter.js'
+import { passesAstSelectorFilter } from '../../utils/context-matching/passes-ast-selector-filter.js'
+import { computeMethodOrPropertyNameDetails } from './node-info/compute-method-or-property-name-details.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Computes the matched context options for a given class node.
+ *
+ * @param params - Parameters.
+ * @param params.matchedAstSelectors - The matched AST selectors for a class
+ * node.
+ * @param params.context - The rule context.
+ * @returns The matched context options or undefined if none match.
+ */
+function computeMatchedContextOptions({
+ matchedAstSelectors,
+ classElements,
+ context,
+}) {
+ let nodeNames = classElements
+ .filter(
+ element =>
+ element.type !== AST_NODE_TYPES.StaticBlock &&
+ element.type !== AST_NODE_TYPES.TSIndexSignature,
+ )
+ .map(
+ element =>
+ computeMethodOrPropertyNameDetails(element, context.sourceCode).name,
+ )
+ return context.options.find(options =>
+ isContextOptionMatching({
+ matchedAstSelectors,
+ nodeNames,
+ options,
+ }),
+ )
+}
+function isContextOptionMatching({ matchedAstSelectors, nodeNames, options }) {
+ if (!options.useConfigurationIf) {
+ return true
+ }
+ return (
+ passesAllNamesMatchPatternFilter({
+ allNamesMatchPattern: options.useConfigurationIf.allNamesMatchPattern,
+ nodeNames,
+ }) &&
+ passesAstSelectorFilter({
+ matchesAstSelector: options.useConfigurationIf.matchesAstSelector,
+ matchedAstSelectors,
+ })
+ )
+}
+export { computeMatchedContextOptions }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/compute-overload-signature-groups.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/compute-overload-signature-groups.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..b6cf2794fb1d21b3db7418a224d5918e0778cf1e
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/compute-overload-signature-groups.d.ts
@@ -0,0 +1,13 @@
+import { TSESTree } from '@typescript-eslint/utils'
+import { OverloadSignatureGroup } from '../../utils/overload-signature/overload-signature-group.js'
+type Method = TSESTree.TSAbstractMethodDefinition | TSESTree.MethodDefinition
+/**
+ * Returns a list of groups of overload signatures.
+ *
+ * @param classElements - The class elements to process.
+ * @returns A list of overload signature groups.
+ */
+export declare function computeOverloadSignatureGroups(
+ classElements: TSESTree.ClassElement[],
+): OverloadSignatureGroup[]
+export {}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/compute-overload-signature-groups.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/compute-overload-signature-groups.js
new file mode 100644
index 0000000000000000000000000000000000000000..8824b0a12f70f3afcdd1fc2285ef56a88d56b641
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/compute-overload-signature-groups.js
@@ -0,0 +1,63 @@
+import { UnreachableCaseError } from '../../utils/unreachable-case-error.js'
+import { isSortable } from '../../utils/is-sortable.js'
+import { OverloadSignatureGroup } from '../../utils/overload-signature/overload-signature-group.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Returns a list of groups of overload signatures.
+ *
+ * @param classElements - The class elements to process.
+ * @returns A list of overload signature groups.
+ */
+function computeOverloadSignatureGroups(classElements) {
+ let methods = classElements
+ .filter(
+ classElement =>
+ classElement.type === AST_NODE_TYPES.MethodDefinition ||
+ classElement.type === AST_NODE_TYPES.TSAbstractMethodDefinition,
+ )
+ .filter(classElement => classElement.kind === 'method')
+ let staticOverloadSignaturesByName = /* @__PURE__ */ new Map()
+ let overloadSignaturesByName = /* @__PURE__ */ new Map()
+ for (let method of methods) {
+ if (method.key.type !== AST_NODE_TYPES.Identifier) {
+ continue
+ }
+ let { name } = method.key
+ let mapToUse =
+ method.static ? staticOverloadSignaturesByName : overloadSignaturesByName
+ let overloadSignaturesArray = mapToUse.get(name)
+ if (!overloadSignaturesArray) {
+ overloadSignaturesArray = []
+ mapToUse.set(name, overloadSignaturesArray)
+ }
+ overloadSignaturesArray.push(method)
+ }
+ return [
+ ...overloadSignaturesByName.values(),
+ ...staticOverloadSignaturesByName.values(),
+ ]
+ .filter(isSortable)
+ .map(buildOverloadSignatureGroup)
+}
+function buildOverloadSignatureGroup(methods) {
+ let implementation = methods.find(isMethodImplementation) ?? methods.at(-1)
+ let overloadSignatures = methods.filter(
+ method => !isMethodImplementation(method),
+ )
+ return new OverloadSignatureGroup({
+ overloadSignatures,
+ implementation,
+ })
+ function isMethodImplementation(method) {
+ switch (method.value.type) {
+ case AST_NODE_TYPES.TSEmptyBodyFunctionExpression:
+ return false
+ case AST_NODE_TYPES.FunctionExpression:
+ return true
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(method.value)
+ }
+ }
+}
+export { computeOverloadSignatureGroups }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/is-known-class-element.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/is-known-class-element.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..dd9c9a6e3a64a87b1e9886d137b4196ff1a910c6
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/is-known-class-element.d.ts
@@ -0,0 +1,13 @@
+import { TSESTree } from '@typescript-eslint/types'
+/**
+ * Checks whether a class element is supported by the sort-classes rule.
+ *
+ * Unknown elements should be ignored to avoid crashes with non-standard parsers
+ * while letting known elements keep their ordering behavior.
+ *
+ * @param member - The class element to check.
+ * @returns True when the element is a known, supported class member.
+ */
+export declare function isKnownClassElement(
+ member: TSESTree.ClassElement,
+): boolean
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/is-known-class-element.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/is-known-class-element.js
new file mode 100644
index 0000000000000000000000000000000000000000..8105ef40fe2ef15de1dc59a24cd192434d86a8d4
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/is-known-class-element.js
@@ -0,0 +1,27 @@
+import '../../utils/assert-is-never.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Checks whether a class element is supported by the sort-classes rule.
+ *
+ * Unknown elements should be ignored to avoid crashes with non-standard parsers
+ * while letting known elements keep their ordering behavior.
+ *
+ * @param member - The class element to check.
+ * @returns True when the element is a known, supported class member.
+ */
+function isKnownClassElement(member) {
+ switch (member.type) {
+ case AST_NODE_TYPES.TSAbstractPropertyDefinition:
+ case AST_NODE_TYPES.TSAbstractMethodDefinition:
+ case AST_NODE_TYPES.TSAbstractAccessorProperty:
+ case AST_NODE_TYPES.PropertyDefinition:
+ case AST_NODE_TYPES.MethodDefinition:
+ case AST_NODE_TYPES.AccessorProperty:
+ case AST_NODE_TYPES.TSIndexSignature:
+ case AST_NODE_TYPES.StaticBlock:
+ return true
+ default:
+ return false
+ }
+}
+export { isKnownClassElement }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/node-info/common-modifiers.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/node-info/common-modifiers.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..37f06af72ee67944674fb7ef496403170b8806c8
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/node-info/common-modifiers.d.ts
@@ -0,0 +1,38 @@
+import { TSESTree } from '@typescript-eslint/types'
+import { Modifier } from '../types.js'
+type Property =
+ TSESTree.TSAbstractPropertyDefinition | TSESTree.PropertyDefinition
+type Accessor = TSESTree.TSAbstractAccessorProperty | TSESTree.AccessorProperty
+type Method = TSESTree.TSAbstractMethodDefinition | TSESTree.MethodDefinition
+export declare function computeAccessibilityModifier({
+ hasPrivateHash,
+ node,
+}: {
+ node: Accessor | Property | Method
+ hasPrivateHash: boolean
+}): Modifier[]
+export declare function computeAbstractModifier(
+ node: Accessor | Property | Method,
+): Modifier[]
+export declare function computeAsyncModifier(
+ node:
+ | TSESTree.TSEmptyBodyFunctionExpression
+ | TSESTree.ArrowFunctionExpression
+ | TSESTree.FunctionExpression,
+): Modifier[]
+export declare function computeStaticModifier(
+ node: TSESTree.TSIndexSignature | Accessor | Property | Method,
+): Modifier[]
+export declare function computeReadonlyModifier(
+ node: TSESTree.TSIndexSignature | Property,
+): Modifier[]
+export declare function computeOverrideModifier(
+ node: Accessor | Property | Method,
+): Modifier[]
+export declare function computeOptionalModifier(
+ node: Property | Method,
+): Modifier[]
+export declare function computeDecoratedModifier(
+ isDecorated: boolean,
+): Modifier[]
+export {}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/node-info/common-modifiers.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/node-info/common-modifiers.js
new file mode 100644
index 0000000000000000000000000000000000000000..c5504f4ebd4a164cb1f0705ace82517f30985927
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/node-info/common-modifiers.js
@@ -0,0 +1,71 @@
+import { UnreachableCaseError } from '../../../utils/unreachable-case-error.js'
+import '../../../utils/assert-is-never.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+function computeAccessibilityModifier({ hasPrivateHash, node }) {
+ if (hasPrivateHash) {
+ return ['private']
+ }
+ switch (node.accessibility) {
+ case 'protected':
+ return ['protected']
+ case 'private':
+ return ['private']
+ case void 0:
+ case 'public':
+ return ['public']
+ default:
+ node.accessibility
+ return computeUnhandledAccessibilityModifier(node.accessibility)
+ }
+ function computeUnhandledAccessibilityModifier(modifier) {
+ /* v8 ignore else -- @preserve Unhandled case */
+ if (modifier === null) {
+ return ['public']
+ }
+ /* v8 ignore next -- @preserve Unhandled case */
+ throw new Error('Unhandled accessibility modifier')
+ }
+}
+function computeAbstractModifier(node) {
+ switch (node.type) {
+ case AST_NODE_TYPES.TSAbstractPropertyDefinition:
+ case AST_NODE_TYPES.TSAbstractMethodDefinition:
+ case AST_NODE_TYPES.TSAbstractAccessorProperty:
+ return ['abstract']
+ case AST_NODE_TYPES.PropertyDefinition:
+ case AST_NODE_TYPES.MethodDefinition:
+ case AST_NODE_TYPES.AccessorProperty:
+ return []
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(node)
+ }
+}
+function computeAsyncModifier(node) {
+ return node.async ? ['async'] : []
+}
+function computeStaticModifier(node) {
+ return node.static ? ['static'] : []
+}
+function computeReadonlyModifier(node) {
+ return node.readonly ? ['readonly'] : []
+}
+function computeOverrideModifier(node) {
+ return node.override ? ['override'] : []
+}
+function computeOptionalModifier(node) {
+ return node.optional ? ['optional'] : []
+}
+function computeDecoratedModifier(isDecorated) {
+ return isDecorated ? ['decorated'] : []
+}
+export {
+ computeAbstractModifier,
+ computeAccessibilityModifier,
+ computeAsyncModifier,
+ computeDecoratedModifier,
+ computeOptionalModifier,
+ computeOverrideModifier,
+ computeReadonlyModifier,
+ computeStaticModifier,
+}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/node-info/compute-accessor-details.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/node-info/compute-accessor-details.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..dcd6f2218fd3dd01ca69fd7bc2c0ec9ff7ddfbf3
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/node-info/compute-accessor-details.d.ts
@@ -0,0 +1,40 @@
+import { TSESTree } from '@typescript-eslint/types'
+import { TSESLint } from '@typescript-eslint/utils'
+import { NodeNameDetails, Modifier, Selector } from '../types.js'
+import { RegexOption } from '../../../types/common-options.js'
+/**
+ * Computes details related to an accessor property.
+ *
+ * @param params - Parameters object.
+ * @param params.isDecorated - Whether the accessor is decorated.
+ * @param params.ignoreCallbackDependenciesPatterns - Patterns to ignore when
+ * computing dependencies.
+ * @param params.useExperimentalDependencyDetection - Whether to use
+ * experimental dependency detection.
+ * @param params.sourceCode - The source code object.
+ * @param params.className - The name of the class containing the accessor.
+ * @param params.accessor - The accessor node to compute information for.
+ * @returns An object containing various details about the accessor.
+ */
+export declare function computeAccessorDetails({
+ ignoreCallbackDependenciesPatterns,
+ useExperimentalDependencyDetection,
+ isDecorated,
+ sourceCode,
+ className,
+ accessor,
+}: {
+ accessor: TSESTree.TSAbstractAccessorProperty | TSESTree.AccessorProperty
+ ignoreCallbackDependenciesPatterns: RegexOption
+ useExperimentalDependencyDetection: boolean
+ sourceCode: TSESLint.SourceCode
+ className: undefined | string
+ isDecorated: boolean
+}): {
+ nameDetails: NodeNameDetails
+ dependencyNames: string[]
+ dependencies: string[]
+ modifiers: Modifier[]
+ selectors: Selector[]
+ isStatic: boolean
+}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/node-info/compute-accessor-details.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/node-info/compute-accessor-details.js
new file mode 100644
index 0000000000000000000000000000000000000000..1fe01c43def3b562efb7478dbf4270b81adac2b1
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/node-info/compute-accessor-details.js
@@ -0,0 +1,92 @@
+import {
+ computeAbstractModifier,
+ computeAccessibilityModifier,
+ computeDecoratedModifier,
+ computeOverrideModifier,
+ computeStaticModifier,
+} from './common-modifiers.js'
+import { computeDependencyName } from '../compute-dependency-name.js'
+import { computeDependencies } from '../compute-dependencies.js'
+import { computeMethodOrPropertyNameDetails } from './compute-method-or-property-name-details.js'
+import { isFunctionExpression } from './is-function-expression.js'
+/**
+ * Computes details related to an accessor property.
+ *
+ * @param params - Parameters object.
+ * @param params.isDecorated - Whether the accessor is decorated.
+ * @param params.ignoreCallbackDependenciesPatterns - Patterns to ignore when
+ * computing dependencies.
+ * @param params.useExperimentalDependencyDetection - Whether to use
+ * experimental dependency detection.
+ * @param params.sourceCode - The source code object.
+ * @param params.className - The name of the class containing the accessor.
+ * @param params.accessor - The accessor node to compute information for.
+ * @returns An object containing various details about the accessor.
+ */
+function computeAccessorDetails({
+ ignoreCallbackDependenciesPatterns,
+ useExperimentalDependencyDetection,
+ isDecorated,
+ sourceCode,
+ className,
+ accessor,
+}) {
+ let nameDetails = computeMethodOrPropertyNameDetails(accessor, sourceCode)
+ let modifiers = computeModifiers({
+ hasPrivateHash: nameDetails.hasPrivateHash,
+ isDecorated,
+ accessor,
+ })
+ return {
+ dependencyNames: [
+ computeDependencyName({
+ nodeNameWithoutStartingHash: nameDetails.nameWithoutStartingHash,
+ hasPrivateHash: nameDetails.hasPrivateHash,
+ isStatic: modifiers.includes('static'),
+ }),
+ ],
+ dependencies: computeAccessorDependencies({
+ ignoreCallbackDependenciesPatterns,
+ useExperimentalDependencyDetection,
+ className,
+ accessor,
+ }),
+ selectors: ['accessor-property'],
+ isStatic: accessor.static,
+ nameDetails,
+ modifiers,
+ }
+}
+function computeAccessorDependencies({
+ ignoreCallbackDependenciesPatterns,
+ useExperimentalDependencyDetection,
+ className,
+ accessor,
+}) {
+ if (isFunctionExpression(accessor.value)) {
+ return []
+ }
+ if (!accessor.value) {
+ return []
+ }
+ return computeDependencies({
+ ignoreCallbackDependenciesPatterns,
+ useExperimentalDependencyDetection,
+ isMemberStatic: accessor.static,
+ expression: accessor.value,
+ className,
+ })
+}
+function computeModifiers({ hasPrivateHash, isDecorated, accessor }) {
+ return [
+ ...computeStaticModifier(accessor),
+ ...computeAbstractModifier(accessor),
+ ...computeDecoratedModifier(isDecorated),
+ ...computeOverrideModifier(accessor),
+ ...computeAccessibilityModifier({
+ hasPrivateHash,
+ node: accessor,
+ }),
+ ]
+}
+export { computeAccessorDetails }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/node-info/compute-index-signature-details.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/node-info/compute-index-signature-details.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..4846cf307eac5abf265b96dc82bb6a5a4e3c7824
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/node-info/compute-index-signature-details.d.ts
@@ -0,0 +1,23 @@
+import { TSESTree } from '@typescript-eslint/types'
+import { TSESLint } from '@typescript-eslint/utils'
+import { Modifier, Selector } from '../types.js'
+/**
+ * Computes details related to an index-signature.
+ *
+ * @param params - Parameters object.
+ * @param params.indexSignature - The index signature node to compute
+ * information for.
+ * @param params.sourceCode - The source code object.
+ * @returns An object containing various details about the index-signature.
+ */
+export declare function computeIndexSignatureDetails({
+ indexSignature,
+ sourceCode,
+}: {
+ indexSignature: TSESTree.TSIndexSignature
+ sourceCode: TSESLint.SourceCode
+}): {
+ modifiers: Modifier[]
+ selectors: Selector[]
+ name: string
+}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/node-info/compute-index-signature-details.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/node-info/compute-index-signature-details.js
new file mode 100644
index 0000000000000000000000000000000000000000..771ceb878ca953726ea59a6c121524ea17f90ea8
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/node-info/compute-index-signature-details.js
@@ -0,0 +1,30 @@
+import {
+ computeReadonlyModifier,
+ computeStaticModifier,
+} from './common-modifiers.js'
+/**
+ * Computes details related to an index-signature.
+ *
+ * @param params - Parameters object.
+ * @param params.indexSignature - The index signature node to compute
+ * information for.
+ * @param params.sourceCode - The source code object.
+ * @returns An object containing various details about the index-signature.
+ */
+function computeIndexSignatureDetails({ indexSignature, sourceCode }) {
+ return {
+ name: sourceCode.text.slice(
+ indexSignature.range.at(0),
+ indexSignature.typeAnnotation?.range.at(0) ?? indexSignature.range.at(1),
+ ),
+ modifiers: computeModifiers(indexSignature),
+ selectors: ['index-signature'],
+ }
+}
+function computeModifiers(indexSignature) {
+ return [
+ ...computeStaticModifier(indexSignature),
+ ...computeReadonlyModifier(indexSignature),
+ ]
+}
+export { computeIndexSignatureDetails }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/node-info/compute-method-details.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/node-info/compute-method-details.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..bd23fe558c65981ac7a66406925a5520c363ed8b
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/node-info/compute-method-details.d.ts
@@ -0,0 +1,30 @@
+import { TSESTree } from '@typescript-eslint/types'
+import { TSESLint } from '@typescript-eslint/utils'
+import { NodeNameDetails, Modifier, Selector } from '../types.js'
+/**
+ * Computes details related to a method.
+ *
+ * @param params - Parameters object.
+ * @param params.isDecorated - Whether the accessor is decorated.
+ * @param params.method - The method node to compute information for.
+ * @param params.sourceCode - The source code object.
+ * @param params.hasParentDeclare - Whether the parent class is a declare class.
+ * @returns An object containing various details about the method.
+ */
+export declare function computeMethodDetails({
+ hasParentDeclare,
+ isDecorated,
+ sourceCode,
+ method,
+}: {
+ method: TSESTree.TSAbstractMethodDefinition | TSESTree.MethodDefinition
+ sourceCode: TSESLint.SourceCode
+ hasParentDeclare: boolean
+ isDecorated: boolean
+}): {
+ addSafetySemicolonWhenInline: boolean
+ nameDetails: NodeNameDetails
+ modifiers: Modifier[]
+ selectors: Selector[]
+ isStatic: boolean
+}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/node-info/compute-method-details.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/node-info/compute-method-details.js
new file mode 100644
index 0000000000000000000000000000000000000000..af38f82777c3e1eed0e5a2ca1bb46b21566cc169
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/node-info/compute-method-details.js
@@ -0,0 +1,88 @@
+import { UnreachableCaseError } from '../../../utils/unreachable-case-error.js'
+import {
+ computeAbstractModifier,
+ computeAccessibilityModifier,
+ computeAsyncModifier,
+ computeDecoratedModifier,
+ computeOptionalModifier,
+ computeOverrideModifier,
+ computeStaticModifier,
+} from './common-modifiers.js'
+import { computeMethodOrPropertyNameDetails } from './compute-method-or-property-name-details.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Computes details related to a method.
+ *
+ * @param params - Parameters object.
+ * @param params.isDecorated - Whether the accessor is decorated.
+ * @param params.method - The method node to compute information for.
+ * @param params.sourceCode - The source code object.
+ * @param params.hasParentDeclare - Whether the parent class is a declare class.
+ * @returns An object containing various details about the method.
+ */
+function computeMethodDetails({
+ hasParentDeclare,
+ isDecorated,
+ sourceCode,
+ method,
+}) {
+ let nameDetails = computeMethodOrPropertyNameDetails(method, sourceCode)
+ return {
+ modifiers: computeModifiers({
+ hasPrivateHash: nameDetails.hasPrivateHash,
+ isDecorated,
+ method,
+ }),
+ addSafetySemicolonWhenInline: shouldAddSafetySemicolonWhenInline({
+ hasParentDeclare,
+ method,
+ }),
+ selectors: computeSelectors(method),
+ isStatic: method.static,
+ nameDetails,
+ }
+}
+function computeSelectors(method) {
+ return [...computeSetterOrConstructorSelector(), 'method']
+ function computeSetterOrConstructorSelector() {
+ switch (method.kind) {
+ case 'constructor':
+ return ['constructor']
+ case 'method':
+ return []
+ case 'set':
+ return ['set-method']
+ case 'get':
+ return ['get-method']
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(method.kind)
+ }
+ }
+}
+function computeModifiers({ hasPrivateHash, isDecorated, method }) {
+ return [
+ ...computeStaticModifier(method),
+ ...computeAbstractModifier(method),
+ ...computeDecoratedModifier(isDecorated),
+ ...computeOverrideModifier(method),
+ ...computeAccessibilityModifier({
+ hasPrivateHash,
+ node: method,
+ }),
+ ...computeOptionalModifier(method),
+ ...computeAsyncModifier(method.value),
+ ]
+}
+function shouldAddSafetySemicolonWhenInline({ hasParentDeclare, method }) {
+ switch (method.type) {
+ case AST_NODE_TYPES.TSAbstractMethodDefinition:
+ return true
+ case AST_NODE_TYPES.MethodDefinition:
+ return hasParentDeclare
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(method)
+ }
+}
+export { computeMethodDetails }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/node-info/compute-method-or-property-name-details.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/node-info/compute-method-or-property-name-details.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..7ada59d913f73935005f65efc7e3c10df41ebadc
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/node-info/compute-method-or-property-name-details.d.ts
@@ -0,0 +1,21 @@
+import { TSESTree } from '@typescript-eslint/types'
+import { TSESLint } from '@typescript-eslint/utils'
+import { NodeNameDetails } from '../types.js'
+/**
+ * Computes the name details of a method or property node.
+ *
+ * @param node - The method or property node to compute the name for.
+ * @param sourceCode - The ESLint source code object.
+ * @returns An object containing the name, whether it has a private hash, and
+ * the name without the starting hash.
+ */
+export declare function computeMethodOrPropertyNameDetails(
+ node:
+ | TSESTree.TSAbstractPropertyDefinition
+ | TSESTree.TSAbstractMethodDefinition
+ | TSESTree.TSAbstractAccessorProperty
+ | TSESTree.PropertyDefinition
+ | TSESTree.MethodDefinition
+ | TSESTree.AccessorProperty,
+ sourceCode: TSESLint.SourceCode,
+): NodeNameDetails
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/node-info/compute-method-or-property-name-details.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/node-info/compute-method-or-property-name-details.js
new file mode 100644
index 0000000000000000000000000000000000000000..599c80cd2539576c09b8f1ce4f672692d169c1db
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/node-info/compute-method-or-property-name-details.js
@@ -0,0 +1,25 @@
+import { computeIdentifierNameDetails } from '../compute-identifier-name-details.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Computes the name details of a method or property node.
+ *
+ * @param node - The method or property node to compute the name for.
+ * @param sourceCode - The ESLint source code object.
+ * @returns An object containing the name, whether it has a private hash, and
+ * the name without the starting hash.
+ */
+function computeMethodOrPropertyNameDetails(node, sourceCode) {
+ switch (node.key.type) {
+ case AST_NODE_TYPES.PrivateIdentifier:
+ case AST_NODE_TYPES.Identifier:
+ case AST_NODE_TYPES.Literal:
+ return computeIdentifierNameDetails(node.key)
+ default:
+ return {
+ nameWithoutStartingHash: sourceCode.getText(node.key),
+ name: sourceCode.getText(node.key),
+ hasPrivateHash: false,
+ }
+ }
+}
+export { computeMethodOrPropertyNameDetails }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/node-info/compute-property-details.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/node-info/compute-property-details.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..1a42c5dd424328665d4400228f73626ace68dffb
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/node-info/compute-property-details.d.ts
@@ -0,0 +1,41 @@
+import { TSESTree } from '@typescript-eslint/types'
+import { TSESLint } from '@typescript-eslint/utils'
+import { NodeNameDetails, Modifier, Selector } from '../types.js'
+import { RegexOption } from '../../../types/common-options.js'
+/**
+ * Computes details related to a property.
+ *
+ * @param params - Parameters object.
+ * @param params.isDecorated - Whether the accessor is decorated.
+ * @param params.property - The property node to compute information for.
+ * @param params.ignoreCallbackDependenciesPatterns - Patterns to ignore when
+ * computing dependencies.
+ * @param params.useExperimentalDependencyDetection - Whether to use
+ * experimental dependency detection.
+ * @param params.sourceCode - The source code object.
+ * @param params.className - The name of the class containing the property.
+ * @returns An object containing various details about the property.
+ */
+export declare function computePropertyDetails({
+ ignoreCallbackDependenciesPatterns,
+ useExperimentalDependencyDetection,
+ isDecorated,
+ sourceCode,
+ className,
+ property,
+}: {
+ property: TSESTree.TSAbstractPropertyDefinition | TSESTree.PropertyDefinition
+ ignoreCallbackDependenciesPatterns: RegexOption
+ useExperimentalDependencyDetection: boolean
+ sourceCode: TSESLint.SourceCode
+ className: undefined | string
+ isDecorated: boolean
+}): {
+ memberValue: undefined | string
+ nameDetails: NodeNameDetails
+ dependencyNames: string[]
+ dependencies: string[]
+ modifiers: Modifier[]
+ selectors: Selector[]
+ isStatic: boolean
+}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/node-info/compute-property-details.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/node-info/compute-property-details.js
new file mode 100644
index 0000000000000000000000000000000000000000..405e1f080b7eaec184aad8861e442bdc75b82550
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/node-info/compute-property-details.js
@@ -0,0 +1,118 @@
+import {
+ computeAbstractModifier,
+ computeAccessibilityModifier,
+ computeAsyncModifier,
+ computeDecoratedModifier,
+ computeOptionalModifier,
+ computeOverrideModifier,
+ computeReadonlyModifier,
+ computeStaticModifier,
+} from './common-modifiers.js'
+import { computeDependencyName } from '../compute-dependency-name.js'
+import { computeDependencies } from '../compute-dependencies.js'
+import { computeMethodOrPropertyNameDetails } from './compute-method-or-property-name-details.js'
+import { isFunctionExpression } from './is-function-expression.js'
+/**
+ * Computes details related to a property.
+ *
+ * @param params - Parameters object.
+ * @param params.isDecorated - Whether the accessor is decorated.
+ * @param params.property - The property node to compute information for.
+ * @param params.ignoreCallbackDependenciesPatterns - Patterns to ignore when
+ * computing dependencies.
+ * @param params.useExperimentalDependencyDetection - Whether to use
+ * experimental dependency detection.
+ * @param params.sourceCode - The source code object.
+ * @param params.className - The name of the class containing the property.
+ * @returns An object containing various details about the property.
+ */
+function computePropertyDetails({
+ ignoreCallbackDependenciesPatterns,
+ useExperimentalDependencyDetection,
+ isDecorated,
+ sourceCode,
+ className,
+ property,
+}) {
+ let nameDetails = computeMethodOrPropertyNameDetails(property, sourceCode)
+ let modifiers = computeModifiers({
+ hasPrivateHash: nameDetails.hasPrivateHash,
+ isDecorated,
+ property,
+ })
+ return {
+ dependencyNames: [
+ computeDependencyName({
+ nodeNameWithoutStartingHash: nameDetails.nameWithoutStartingHash,
+ hasPrivateHash: nameDetails.hasPrivateHash,
+ isStatic: modifiers.includes('static'),
+ }),
+ ],
+ dependencies: computePropertyDependencies({
+ ignoreCallbackDependenciesPatterns,
+ useExperimentalDependencyDetection,
+ className,
+ property,
+ }),
+ memberValue:
+ !isFunctionExpression(property.value) && property.value ?
+ sourceCode.getText(property.value)
+ : void 0,
+ selectors: computeSelectors(property),
+ isStatic: property.static,
+ nameDetails,
+ modifiers,
+ }
+}
+function computeModifiers({ hasPrivateHash, isDecorated, property }) {
+ return [
+ ...computeStaticModifier(property),
+ ...computeDeclareModifier(),
+ ...computeAbstractModifier(property),
+ ...computeDecoratedModifier(isDecorated),
+ ...computeOverrideModifier(property),
+ ...computeReadonlyModifier(property),
+ ...computeAccessibilityModifier({
+ hasPrivateHash,
+ node: property,
+ }),
+ ...computeOptionalModifier(property),
+ ...computeAsyncModifierIfFunctionProperty(),
+ ]
+ function computeDeclareModifier() {
+ return property.declare ? ['declare'] : []
+ }
+ function computeAsyncModifierIfFunctionProperty() {
+ if (!isFunctionExpression(property.value)) {
+ return []
+ }
+ return computeAsyncModifier(property.value)
+ }
+}
+function computePropertyDependencies({
+ ignoreCallbackDependenciesPatterns,
+ useExperimentalDependencyDetection,
+ className,
+ property,
+}) {
+ if (isFunctionExpression(property.value)) {
+ return []
+ }
+ if (!property.value) {
+ return []
+ }
+ return computeDependencies({
+ ignoreCallbackDependenciesPatterns,
+ useExperimentalDependencyDetection,
+ isMemberStatic: property.static,
+ expression: property.value,
+ className,
+ })
+}
+function computeSelectors(property) {
+ return [...computeFunctionPropertySelector(), 'property']
+ function computeFunctionPropertySelector() {
+ return isFunctionExpression(property.value) ? ['function-property'] : []
+ }
+}
+export { computePropertyDetails }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/node-info/compute-static-block-details.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/node-info/compute-static-block-details.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..51f192ae4910df73faac39abe752c8493db602d3
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/node-info/compute-static-block-details.d.ts
@@ -0,0 +1,30 @@
+import { TSESTree } from '@typescript-eslint/types'
+import { RegexOption } from '../../../types/common-options.js'
+import { Modifier, Selector } from '../types.js'
+/**
+ * Computes details related to a static block.
+ *
+ * @param params - Parameters object.
+ * @param params.staticBlock - The static block node to compute information for.
+ * @param params.ignoreCallbackDependenciesPatterns - Patterns to ignore when
+ * computing dependencies.
+ * @param params.useExperimentalDependencyDetection - Whether to use
+ * experimental dependency detection.
+ * @param params.className - The name of the class containing the property.
+ * @returns An object containing various details about the static block.
+ */
+export declare function computeStaticBlockDetails({
+ ignoreCallbackDependenciesPatterns,
+ useExperimentalDependencyDetection,
+ staticBlock,
+ className,
+}: {
+ ignoreCallbackDependenciesPatterns: RegexOption
+ useExperimentalDependencyDetection: boolean
+ staticBlock: TSESTree.StaticBlock
+ className: undefined | string
+}): {
+ dependencies: string[]
+ selectors: Selector[]
+ modifiers: Modifier[]
+}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/node-info/compute-static-block-details.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/node-info/compute-static-block-details.js
new file mode 100644
index 0000000000000000000000000000000000000000..a4aea38d74b789a2258c15cce21e9273a9a62d49
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/node-info/compute-static-block-details.js
@@ -0,0 +1,32 @@
+import { computeDependencies } from '../compute-dependencies.js'
+/**
+ * Computes details related to a static block.
+ *
+ * @param params - Parameters object.
+ * @param params.staticBlock - The static block node to compute information for.
+ * @param params.ignoreCallbackDependenciesPatterns - Patterns to ignore when
+ * computing dependencies.
+ * @param params.useExperimentalDependencyDetection - Whether to use
+ * experimental dependency detection.
+ * @param params.className - The name of the class containing the property.
+ * @returns An object containing various details about the static block.
+ */
+function computeStaticBlockDetails({
+ ignoreCallbackDependenciesPatterns,
+ useExperimentalDependencyDetection,
+ staticBlock,
+ className,
+}) {
+ return {
+ dependencies: computeDependencies({
+ ignoreCallbackDependenciesPatterns,
+ useExperimentalDependencyDetection,
+ expression: staticBlock,
+ isMemberStatic: true,
+ className,
+ }),
+ selectors: ['static-block'],
+ modifiers: [],
+ }
+}
+export { computeStaticBlockDetails }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/node-info/is-function-expression.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/node-info/is-function-expression.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..42a141ce43d87861efcf496393dea826253756f0
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/node-info/is-function-expression.d.ts
@@ -0,0 +1,11 @@
+import { TSESTree } from '@typescript-eslint/types'
+/**
+ * Checks whether a node is a function expression or an arrow function
+ * expression.
+ *
+ * @param node - The AST node to check.
+ * @returns Whether the node is a function expression.
+ */
+export declare function isFunctionExpression(
+ node: TSESTree.Node | null,
+): node is TSESTree.ArrowFunctionExpression | TSESTree.FunctionExpression
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/node-info/is-function-expression.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/node-info/is-function-expression.js
new file mode 100644
index 0000000000000000000000000000000000000000..c8eb4f405e2f166bc9fb0d809935b65d5f8ce20d
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/node-info/is-function-expression.js
@@ -0,0 +1,18 @@
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Checks whether a node is a function expression or an arrow function
+ * expression.
+ *
+ * @param node - The AST node to check.
+ * @returns Whether the node is a function expression.
+ */
+function isFunctionExpression(node) {
+ if (!node) {
+ return false
+ }
+ return (
+ node.type === AST_NODE_TYPES.ArrowFunctionExpression ||
+ node.type === AST_NODE_TYPES.FunctionExpression
+ )
+}
+export { isFunctionExpression }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/sort-class.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/sort-class.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..a27b226e92280084fb7655296aed737f35e70166
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/sort-class.d.ts
@@ -0,0 +1,13 @@
+import { TSESTree } from '@typescript-eslint/types'
+import { TSESLint } from '@typescript-eslint/utils'
+import { MessageId, Options } from './types.js'
+export declare let defaultOptions: Required
+export declare function sortClass({
+ matchedAstSelectors,
+ context,
+ node,
+}: {
+ context: Readonly>
+ matchedAstSelectors: ReadonlySet
+ node: TSESTree.ClassBody
+}): void
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/sort-class.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/sort-class.js
new file mode 100644
index 0000000000000000000000000000000000000000..ab75d2090785fcb65178f52b632290d04b6b3d77
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/sort-class.js
@@ -0,0 +1,333 @@
+import { UnreachableCaseError } from '../../utils/unreachable-case-error.js'
+import { getGroupIndex } from '../../utils/get-group-index.js'
+import { populateSortingNodeGroupsWithDependencies } from '../../utils/populate-sorting-node-groups-with-dependencies.js'
+import { defaultComparatorByOptionsComputer } from '../../utils/compare/default-comparator-by-options-computer.js'
+import { validateNewlinesAndPartitionConfig } from '../../utils/validate-newlines-and-partition-config.js'
+import { buildOptionsByGroupIndexComputer } from '../../utils/build-options-by-group-index-computer.js'
+import { validateCustomSortConfig } from '../../utils/validate-custom-sort-config.js'
+import { generatePredefinedGroups } from '../../utils/generate-predefined-groups.js'
+import { sortNodesByDependencies } from '../../utils/sort-nodes-by-dependencies.js'
+import { getEslintDisabledLines } from '../../utils/get-eslint-disabled-lines.js'
+import { doesCustomGroupMatch } from '../../utils/does-custom-group-match.js'
+import { isNodeEslintDisabled } from '../../utils/is-node-eslint-disabled.js'
+import { validateGroupsConfig } from '../../utils/validate-groups-config.js'
+import { sortNodesByGroups } from '../../utils/sort-nodes-by-groups.js'
+import { reportAllErrors } from '../../utils/report-all-errors.js'
+import { shouldPartition } from '../../utils/should-partition.js'
+import { computeGroup } from '../../utils/compute-group.js'
+import { rangeToDiff } from '../../utils/range-to-diff.js'
+import { getSettings } from '../../utils/get-settings.js'
+import { isSortable } from '../../utils/is-sortable.js'
+import { complete } from '../../utils/complete.js'
+import { getNodeDecorators } from '../../utils/get-node-decorators.js'
+import { getDecoratorName } from '../../utils/get-decorator-name.js'
+import {
+ DEPENDENCY_ORDER_ERROR_ID,
+ EXTRA_SPACING_ERROR_ID,
+ GROUP_ORDER_ERROR_ID,
+ MISSED_SPACING_ERROR_ID,
+ ORDER_ERROR_ID,
+ allModifiers,
+ allSelectors,
+} from './types.js'
+import { buildOverloadSignatureNewlinesBetweenValueGetter } from '../../utils/overload-signature/build-overload-signature-newlines-between-value-getter.js'
+import { populateSortingNodeGroupsWithOverloadSignature } from '../../utils/overload-signature/populate-sorting-node-groups-with-overload-signature.js'
+import { computeIndexSignatureDetails } from './node-info/compute-index-signature-details.js'
+import { computeDependenciesBySortingNode } from './compute-dependencies-by-sorting-node.js'
+import { computeStaticBlockDetails } from './node-info/compute-static-block-details.js'
+import { computeOverloadSignatureGroups } from './compute-overload-signature-groups.js'
+import { computeMatchedContextOptions } from './compute-matched-context-options.js'
+import { computePropertyDetails } from './node-info/compute-property-details.js'
+import { computeAccessorDetails } from './node-info/compute-accessor-details.js'
+import { computeMethodDetails } from './node-info/compute-method-details.js'
+import { isKnownClassElement } from './is-known-class-element.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Cache computed groups by modifiers and selectors for performance.
+ */
+var cachedGroupsByModifiersAndSelectors = /* @__PURE__ */ new Map()
+var defaultOptions = {
+ groups: [
+ 'index-signature',
+ ['static-property', 'static-accessor-property'],
+ ['static-get-method', 'static-set-method'],
+ ['protected-static-property', 'protected-static-accessor-property'],
+ ['protected-static-get-method', 'protected-static-set-method'],
+ ['private-static-property', 'private-static-accessor-property'],
+ ['private-static-get-method', 'private-static-set-method'],
+ 'static-block',
+ ['property', 'accessor-property'],
+ ['get-method', 'set-method'],
+ ['protected-property', 'protected-accessor-property'],
+ ['protected-get-method', 'protected-set-method'],
+ ['private-property', 'private-accessor-property'],
+ ['private-get-method', 'private-set-method'],
+ 'constructor',
+ ['static-method', 'static-function-property'],
+ ['protected-static-method', 'protected-static-function-property'],
+ ['private-static-method', 'private-static-function-property'],
+ ['method', 'function-property'],
+ ['protected-method', 'protected-function-property'],
+ ['private-method', 'private-function-property'],
+ 'unknown',
+ ],
+ useExperimentalDependencyDetection: true,
+ ignoreCallbackDependenciesPatterns: [],
+ newlinesBetweenOverloadSignatures: 0,
+ fallbackSort: { type: 'unsorted' },
+ newlinesInside: 'newlinesBetween',
+ partitionByComment: false,
+ partitionByNewLine: false,
+ newlinesBetween: 'ignore',
+ specialCharacters: 'keep',
+ useConfigurationIf: {},
+ type: 'alphabetical',
+ ignoreCase: true,
+ customGroups: [],
+ locales: 'en-US',
+ alphabet: '',
+ order: 'asc',
+}
+function sortClass({ matchedAstSelectors, context, node }) {
+ let classElements = node.body.filter(isKnownClassElement)
+ if (!isSortable(classElements)) {
+ return
+ }
+ let settings = getSettings(context.settings)
+ let matchedContextOptions = computeMatchedContextOptions({
+ matchedAstSelectors,
+ classElements,
+ context,
+ })
+ let options = complete(matchedContextOptions, settings, defaultOptions)
+ validateCustomSortConfig(options)
+ validateGroupsConfig({
+ modifiers: allModifiers,
+ selectors: allSelectors,
+ options,
+ })
+ validateNewlinesAndPartitionConfig(options)
+ let { sourceCode, id } = context
+ let eslintDisabledLines = getEslintDisabledLines({
+ ruleName: id,
+ sourceCode,
+ })
+ let optionsByGroupIndexComputer = buildOptionsByGroupIndexComputer(options)
+ let overloadSignatureNewlinesBetweenValueGetter =
+ buildOverloadSignatureNewlinesBetweenValueGetter(
+ options.newlinesBetweenOverloadSignatures,
+ )
+ let className = node.parent.id?.name
+ let sortingNodeGroupsWithoutOverloadSignature = classElements.reduce(
+ (accumulator, member) => {
+ let dependencies = []
+ let isDecorated = false
+ let decoratorNames = []
+ if ('decorators' in member) {
+ decoratorNames = getNodeDecorators(member).map(decorator =>
+ getDecoratorName({
+ sourceCode,
+ decorator,
+ }),
+ )
+ isDecorated = decoratorNames.length > 0
+ }
+ let addSafetySemicolonWhenInline
+ let dependencyNames
+ let name
+ let nameDetails
+ let memberValue
+ let isStatic
+ let modifiers
+ let selectors
+ switch (member.type) {
+ case AST_NODE_TYPES.TSAbstractPropertyDefinition:
+ case AST_NODE_TYPES.PropertyDefinition:
+ addSafetySemicolonWhenInline = true
+ ;({
+ dependencyNames,
+ dependencies,
+ memberValue,
+ nameDetails,
+ modifiers,
+ selectors,
+ isStatic,
+ } = computePropertyDetails({
+ ignoreCallbackDependenciesPatterns:
+ options.ignoreCallbackDependenciesPatterns,
+ useExperimentalDependencyDetection:
+ options.useExperimentalDependencyDetection,
+ property: member,
+ isDecorated,
+ sourceCode,
+ className,
+ }))
+ ;({ name } = nameDetails)
+ break
+ case AST_NODE_TYPES.TSAbstractMethodDefinition:
+ case AST_NODE_TYPES.MethodDefinition:
+ dependencyNames = []
+ ;({
+ addSafetySemicolonWhenInline,
+ nameDetails,
+ selectors,
+ modifiers,
+ isStatic,
+ } = computeMethodDetails({
+ hasParentDeclare: node.parent.declare,
+ method: member,
+ isDecorated,
+ sourceCode,
+ }))
+ ;({ name } = nameDetails)
+ break
+ case AST_NODE_TYPES.TSAbstractAccessorProperty:
+ case AST_NODE_TYPES.AccessorProperty:
+ addSafetySemicolonWhenInline = true
+ ;({
+ dependencyNames,
+ dependencies,
+ nameDetails,
+ modifiers,
+ selectors,
+ isStatic,
+ } = computeAccessorDetails({
+ ignoreCallbackDependenciesPatterns:
+ options.ignoreCallbackDependenciesPatterns,
+ useExperimentalDependencyDetection:
+ options.useExperimentalDependencyDetection,
+ accessor: member,
+ isDecorated,
+ sourceCode,
+ className,
+ }))
+ ;({ name } = nameDetails)
+ break
+ case AST_NODE_TYPES.TSIndexSignature:
+ addSafetySemicolonWhenInline = true
+ dependencyNames = []
+ nameDetails = null
+ isStatic = false
+ ;({ modifiers, selectors, name } = computeIndexSignatureDetails({
+ indexSignature: member,
+ sourceCode,
+ }))
+ break
+ case AST_NODE_TYPES.StaticBlock:
+ addSafetySemicolonWhenInline = false
+ dependencyNames = []
+ name = 'static'
+ nameDetails = null
+ isStatic = true
+ ;({ dependencies, selectors, modifiers } = computeStaticBlockDetails({
+ useExperimentalDependencyDetection:
+ options.useExperimentalDependencyDetection,
+ ignoreCallbackDependenciesPatterns:
+ options.ignoreCallbackDependenciesPatterns,
+ staticBlock: member,
+ className,
+ }))
+ break
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(member)
+ }
+ let predefinedGroups = generatePredefinedGroups({
+ cache: cachedGroupsByModifiersAndSelectors,
+ selectors,
+ modifiers,
+ })
+ let group = computeGroup({
+ customGroupMatcher: customGroup =>
+ doesCustomGroupMatch({
+ elementValue: memberValue,
+ elementName: name,
+ decoratorNames,
+ customGroup,
+ modifiers,
+ selectors,
+ }),
+ predefinedGroups,
+ options,
+ })
+ let sortingNode = {
+ isEslintDisabled: isNodeEslintDisabled(member, eslintDisabledLines),
+ size: rangeToDiff(member, sourceCode),
+ addSafetySemicolonWhenInline,
+ dependencyNames,
+ node: member,
+ dependencies,
+ nameDetails,
+ isStatic,
+ group,
+ name,
+ }
+ let lastSortingNode = accumulator.at(-1)?.at(-1)
+ if (
+ shouldPartition({
+ lastSortingNode,
+ sortingNode,
+ sourceCode,
+ options,
+ })
+ ) {
+ accumulator.push([])
+ }
+ accumulator.at(-1).push({
+ ...sortingNode,
+ partitionId: accumulator.length,
+ })
+ return accumulator
+ },
+ [[]],
+ )
+ let sortingNodeGroups = populateSortingNodeGroupsWithOverloadSignature({
+ overloadSignatureGroups: computeOverloadSignatureGroups(classElements),
+ sortingNodeGroups: sortingNodeGroupsWithoutOverloadSignature,
+ })
+ if (options.useExperimentalDependencyDetection) {
+ let dependenciesBySortingNode = computeDependenciesBySortingNode({
+ ignoreCallbackDependenciesPatterns:
+ options.ignoreCallbackDependenciesPatterns,
+ sortingNodes: sortingNodeGroups.flat(),
+ classBody: node,
+ sourceCode,
+ })
+ sortingNodeGroups = populateSortingNodeGroupsWithDependencies({
+ dependenciesBySortingNode,
+ sortingNodeGroups,
+ })
+ }
+ let sortingNodes = sortingNodeGroups.flat()
+ reportAllErrors({
+ availableMessageIds: {
+ missedSpacingBetweenMembers: MISSED_SPACING_ERROR_ID,
+ unexpectedDependencyOrder: DEPENDENCY_ORDER_ERROR_ID,
+ extraSpacingBetweenMembers: EXTRA_SPACING_ERROR_ID,
+ unexpectedGroupOrder: GROUP_ORDER_ERROR_ID,
+ unexpectedOrder: ORDER_ERROR_ID,
+ },
+ newlinesBetweenValueGetter: overloadSignatureNewlinesBetweenValueGetter,
+ sortNodesExcludingEslintDisabled,
+ nodes: sortingNodes,
+ options,
+ context,
+ })
+ function sortNodesExcludingEslintDisabled(ignoreEslintDisabledNodes) {
+ let nodesSortedByGroups = sortingNodeGroups.flatMap(sortingNodeGroup =>
+ sortNodesByGroups({
+ isNodeIgnored: sortingNode =>
+ getGroupIndex(options.groups, sortingNode) === options.groups.length,
+ comparatorByOptionsComputer: defaultComparatorByOptionsComputer,
+ optionsByGroupIndexComputer,
+ ignoreEslintDisabledNodes,
+ nodes: sortingNodeGroup,
+ groups: options.groups,
+ }),
+ )
+ return sortNodesByDependencies(nodesSortedByGroups, {
+ ignoreEslintDisabledNodes,
+ })
+ }
+}
+export { defaultOptions, sortClass }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/types.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/types.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..c4014168a339b61deabfbc5c9c03787ac6ef05d7
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/types.d.ts
@@ -0,0 +1,153 @@
+import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'
+import { TSESTree } from '@typescript-eslint/types'
+import { SortingNodeWithDependencies } from '../../utils/sort-nodes-by-dependencies.js'
+import { NewlinesBetweenOption } from '../../types/common-groups-options.js'
+import { RegexOption, TypeOption } from '../../types/common-options.js'
+import { AllCommonOptions } from '../../types/all-common-options.js'
+export type MessageId =
+ | typeof DEPENDENCY_ORDER_ERROR_ID
+ | typeof MISSED_SPACING_ERROR_ID
+ | typeof EXTRA_SPACING_ERROR_ID
+ | typeof GROUP_ORDER_ERROR_ID
+ | typeof ORDER_ERROR_ID
+export declare const ORDER_ERROR_ID = 'unexpectedClassesOrder'
+export declare const GROUP_ORDER_ERROR_ID = 'unexpectedClassesGroupOrder'
+export declare const EXTRA_SPACING_ERROR_ID = 'extraSpacingBetweenClassMembers'
+export declare const MISSED_SPACING_ERROR_ID =
+ 'missedSpacingBetweenClassMembers'
+export declare const DEPENDENCY_ORDER_ERROR_ID =
+ 'unexpectedClassesDependencyOrder'
+/**
+ * Configuration options for the sort-classes rule.
+ *
+ * This rule enforces consistent ordering of class members (properties, methods,
+ * constructors, etc.) to improve code readability and maintainability.
+ */
+export type Options = Partial<
+ {
+ /**
+ * Conditional configuration based on pattern matching.
+ */
+ useConfigurationIf: {
+ /**
+ * Regular expression pattern to match against all class element names.
+ */
+ allNamesMatchPattern?: RegexOption
+ /**
+ * AST selector to match against ClassBody nodes.
+ */
+ matchesAstSelector?: string
+ }
+ /**
+ * Determines how many newlines should be placed between overload signatures
+ * of the same method.
+ */
+ newlinesBetweenOverloadSignatures: NewlinesBetweenOption
+ /**
+ * Regex patterns for function names whose callback argument dependencies
+ * are ignored during class-member sorting. Dependencies inside these
+ * callbacks won't influence the ordering.
+ */
+ ignoreCallbackDependenciesPatterns: RegexOption
+ /**
+ * Enables experimental dependency detection.
+ */
+ useExperimentalDependencyDetection: boolean
+ } & AllCommonOptions<
+ TypeOption,
+ AdditionalSortOptions,
+ CustomGroupMatchOptions
+ >
+>[]
+export interface SortClassesSortingNode extends SortingNodeWithDependencies {
+ overloadSignatureImplementation:
+ TSESTree.TSAbstractMethodDefinition | TSESTree.MethodDefinition | null
+ nameDetails: NodeNameDetails | null
+ isStatic: boolean
+}
+export interface NodeNameDetails {
+ nameWithoutStartingHash: string
+ hasPrivateHash: boolean
+ name: string
+}
+/**
+ * Union type of all available class member selectors. Used to identify and
+ * categorize different types of class members.
+ */
+export type Selector = (typeof allSelectors)[number]
+/**
+ * Union type of all available class member modifiers. Includes access
+ * modifiers, async, static, abstract, and other TypeScript modifiers.
+ */
+export type Modifier = (typeof allModifiers)[number]
+/**
+ * Defines a custom group configuration for class members.
+ *
+ * Allows categorizing class members based on their selector type (method,
+ * property, etc.) and various patterns matching their names, values, or
+ * decorators.
+ */
+interface CustomGroupMatchOptions {
+ /**
+ * Pattern to match decorator names (e.g., '@Component').
+ */
+ decoratorNamePattern?: RegexOption
+ /**
+ * Pattern to match the value of the member (for properties with
+ * initializers).
+ */
+ elementValuePattern?: RegexOption
+ /**
+ * List of modifiers that members must have to be included in this group.
+ */
+ modifiers?: Modifier[]
+ /**
+ * The type of class member this group applies to.
+ */
+ selector?: Selector
+}
+type AdditionalSortOptions = object
+/**
+ * Complete list of available class member selectors. Used for validation and
+ * JSON schema generation.
+ */
+export declare let allSelectors: readonly [
+ 'accessor-property',
+ 'index-signature',
+ 'constructor',
+ 'static-block',
+ 'get-method',
+ 'set-method',
+ 'function-property',
+ 'property',
+ 'method',
+]
+/**
+ * Complete list of available class member modifiers. Used for validation and
+ * JSON schema generation.
+ */
+export declare let allModifiers: readonly [
+ 'async',
+ 'protected',
+ 'private',
+ 'public',
+ 'static',
+ 'abstract',
+ 'override',
+ 'readonly',
+ 'decorated',
+ 'declare',
+ 'optional',
+]
+/**
+ * Additional custom group match options JSON schema. Used by ESLint to validate
+ * rule options at configuration time.
+ *
+ * Note: Ideally, we should generate as many schemas as there are selectors, and
+ * ensure that users do not enter invalid modifiers for a given selector.
+ */
+export declare let additionalCustomGroupMatchOptionsJsonSchema: Record<
+ string,
+ JSONSchema4
+>
+export {}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/types.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/types.js
new file mode 100644
index 0000000000000000000000000000000000000000..48b9f50b35980f883f3f18f240f104c7de16da81
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-classes/types.js
@@ -0,0 +1,65 @@
+import { buildRegexJsonSchema } from '../../utils/json-schemas/common-json-schemas.js'
+import {
+ buildCustomGroupModifiersJsonSchema,
+ buildCustomGroupSelectorJsonSchema,
+} from '../../utils/json-schemas/common-groups-json-schemas.js'
+var ORDER_ERROR_ID = 'unexpectedClassesOrder'
+var GROUP_ORDER_ERROR_ID = 'unexpectedClassesGroupOrder'
+var EXTRA_SPACING_ERROR_ID = 'extraSpacingBetweenClassMembers'
+var MISSED_SPACING_ERROR_ID = 'missedSpacingBetweenClassMembers'
+var DEPENDENCY_ORDER_ERROR_ID = 'unexpectedClassesDependencyOrder'
+/**
+ * Complete list of available class member selectors. Used for validation and
+ * JSON schema generation.
+ */
+var allSelectors = [
+ 'accessor-property',
+ 'index-signature',
+ 'constructor',
+ 'static-block',
+ 'get-method',
+ 'set-method',
+ 'function-property',
+ 'property',
+ 'method',
+]
+/**
+ * Complete list of available class member modifiers. Used for validation and
+ * JSON schema generation.
+ */
+var allModifiers = [
+ 'async',
+ 'protected',
+ 'private',
+ 'public',
+ 'static',
+ 'abstract',
+ 'override',
+ 'readonly',
+ 'decorated',
+ 'declare',
+ 'optional',
+]
+/**
+ * Additional custom group match options JSON schema. Used by ESLint to validate
+ * rule options at configuration time.
+ *
+ * Note: Ideally, we should generate as many schemas as there are selectors, and
+ * ensure that users do not enter invalid modifiers for a given selector.
+ */
+var additionalCustomGroupMatchOptionsJsonSchema = {
+ modifiers: buildCustomGroupModifiersJsonSchema(allModifiers),
+ selector: buildCustomGroupSelectorJsonSchema(allSelectors),
+ decoratorNamePattern: buildRegexJsonSchema(),
+ elementValuePattern: buildRegexJsonSchema(),
+}
+export {
+ DEPENDENCY_ORDER_ERROR_ID,
+ EXTRA_SPACING_ERROR_ID,
+ GROUP_ORDER_ERROR_ID,
+ MISSED_SPACING_ERROR_ID,
+ ORDER_ERROR_ID,
+ additionalCustomGroupMatchOptionsJsonSchema,
+ allModifiers,
+ allSelectors,
+}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-decorators.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-decorators.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..7053c46cf23a5e6d534c4657637c1c0021ff014d
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-decorators.d.ts
@@ -0,0 +1,21 @@
+import { Options } from './sort-decorators/types.js'
+declare const ORDER_ERROR_ID = 'unexpectedDecoratorsOrder'
+declare const GROUP_ORDER_ERROR_ID = 'unexpectedDecoratorsGroupOrder'
+declare const EXTRA_SPACING_ERROR_ID = 'extraSpacingBetweenDecorators'
+declare const MISSED_SPACING_ERROR_ID = 'missedSpacingBetweenDecorators'
+type MessageId =
+ | typeof MISSED_SPACING_ERROR_ID
+ | typeof EXTRA_SPACING_ERROR_ID
+ | typeof GROUP_ORDER_ERROR_ID
+ | typeof ORDER_ERROR_ID
+declare const _default: import('@typescript-eslint/utils/ts-eslint').RuleModule<
+ MessageId,
+ Options,
+ {
+ recommended?: boolean
+ },
+ import('@typescript-eslint/utils/ts-eslint').RuleListener
+> & {
+ name: string
+}
+export default _default
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-decorators.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-decorators.js
new file mode 100644
index 0000000000000000000000000000000000000000..dfcd8e5d3953ce6e1e65320c030f371ee6029ce3
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-decorators.js
@@ -0,0 +1,261 @@
+import { buildCommonJsonSchemas } from '../utils/json-schemas/common-json-schemas.js'
+import { buildCommonGroupsJsonSchemas } from '../utils/json-schemas/common-groups-json-schemas.js'
+import {
+ EXTRA_SPACING_ERROR,
+ GROUP_ORDER_ERROR,
+ MISSED_SPACING_ERROR,
+ ORDER_ERROR,
+} from '../utils/report-errors.js'
+import {
+ partitionByCommentJsonSchema,
+ partitionByNewlineJsonSchema,
+} from '../utils/json-schemas/common-partition-json-schemas.js'
+import { defaultComparatorByOptionsComputer } from '../utils/compare/default-comparator-by-options-computer.js'
+import { validateNewlinesAndPartitionConfig } from '../utils/validate-newlines-and-partition-config.js'
+import { buildOptionsByGroupIndexComputer } from '../utils/build-options-by-group-index-computer.js'
+import { validateCustomSortConfig } from '../utils/validate-custom-sort-config.js'
+import { getEslintDisabledLines } from '../utils/get-eslint-disabled-lines.js'
+import { doesCustomGroupMatch } from '../utils/does-custom-group-match.js'
+import { isNodeEslintDisabled } from '../utils/is-node-eslint-disabled.js'
+import { validateGroupsConfig } from '../utils/validate-groups-config.js'
+import { sortNodesByGroups } from '../utils/sort-nodes-by-groups.js'
+import { reportAllErrors } from '../utils/report-all-errors.js'
+import { shouldPartition } from '../utils/should-partition.js'
+import { computeGroup } from '../utils/compute-group.js'
+import { rangeToDiff } from '../utils/range-to-diff.js'
+import { getSettings } from '../utils/get-settings.js'
+import { isSortable } from '../utils/is-sortable.js'
+import { complete } from '../utils/complete.js'
+import { createEslintRule } from '../utils/create-eslint-rule.js'
+import { getNodeDecorators } from '../utils/get-node-decorators.js'
+import { getDecoratorName } from '../utils/get-decorator-name.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+var ORDER_ERROR_ID = 'unexpectedDecoratorsOrder'
+var GROUP_ORDER_ERROR_ID = 'unexpectedDecoratorsGroupOrder'
+var EXTRA_SPACING_ERROR_ID = 'extraSpacingBetweenDecorators'
+var MISSED_SPACING_ERROR_ID = 'missedSpacingBetweenDecorators'
+var defaultOptions = {
+ fallbackSort: { type: 'unsorted' },
+ newlinesInside: 'newlinesBetween',
+ specialCharacters: 'keep',
+ partitionByComment: false,
+ partitionByNewLine: false,
+ newlinesBetween: 'ignore',
+ sortOnProperties: true,
+ sortOnParameters: true,
+ sortOnAccessors: true,
+ type: 'alphabetical',
+ sortOnClasses: true,
+ sortOnMethods: true,
+ ignoreCase: true,
+ customGroups: [],
+ locales: 'en-US',
+ alphabet: '',
+ order: 'asc',
+ groups: [],
+}
+var sort_decorators_default = createEslintRule({
+ meta: {
+ schema: {
+ items: {
+ properties: {
+ ...buildCommonJsonSchemas(),
+ ...buildCommonGroupsJsonSchemas(),
+ sortOnParameters: {
+ description:
+ 'Controls whether sorting should be enabled for method parameter decorators.',
+ type: 'boolean',
+ },
+ sortOnProperties: {
+ description:
+ 'Controls whether sorting should be enabled for class property decorators.',
+ type: 'boolean',
+ },
+ sortOnAccessors: {
+ description:
+ 'Controls whether sorting should be enabled for class accessor decorators.',
+ type: 'boolean',
+ },
+ sortOnMethods: {
+ description:
+ 'Controls whether sorting should be enabled for class method decorators.',
+ type: 'boolean',
+ },
+ sortOnClasses: {
+ description:
+ 'Controls whether sorting should be enabled for class decorators.',
+ type: 'boolean',
+ },
+ partitionByComment: partitionByCommentJsonSchema,
+ partitionByNewLine: partitionByNewlineJsonSchema,
+ },
+ additionalProperties: false,
+ type: 'object',
+ },
+ uniqueItems: true,
+ type: 'array',
+ },
+ messages: {
+ [MISSED_SPACING_ERROR_ID]: MISSED_SPACING_ERROR,
+ [EXTRA_SPACING_ERROR_ID]: EXTRA_SPACING_ERROR,
+ [GROUP_ORDER_ERROR_ID]: GROUP_ORDER_ERROR,
+ [ORDER_ERROR_ID]: ORDER_ERROR,
+ },
+ docs: {
+ url: 'https://perfectionist.dev/rules/sort-decorators',
+ description: 'Enforce sorted decorators.',
+ recommended: true,
+ },
+ type: 'suggestion',
+ fixable: 'code',
+ },
+ create: context => {
+ let settings = getSettings(context.settings)
+ let options = complete(context.options.at(0), settings, defaultOptions)
+ validateCustomSortConfig(options)
+ validateGroupsConfig({
+ modifiers: [],
+ selectors: [],
+ options,
+ })
+ validateNewlinesAndPartitionConfig(options)
+ return {
+ Decorator: decorator => {
+ if (!options.sortOnParameters) {
+ return
+ }
+ if (
+ 'decorators' in decorator.parent &&
+ decorator.parent.type === AST_NODE_TYPES.Identifier &&
+ decorator.parent.parent.type === AST_NODE_TYPES.FunctionExpression
+ ) {
+ let { decorators } = decorator.parent
+ if (decorator !== decorators[0]) {
+ return
+ }
+ sortDecorators(context, options, decorators)
+ }
+ },
+ PropertyDefinition: propertyDefinition => {
+ if (options.sortOnProperties) {
+ sortDecorators(
+ context,
+ options,
+ getNodeDecorators(propertyDefinition),
+ )
+ }
+ },
+ AccessorProperty: accessorDefinition => {
+ if (options.sortOnAccessors) {
+ sortDecorators(
+ context,
+ options,
+ getNodeDecorators(accessorDefinition),
+ )
+ }
+ },
+ MethodDefinition: methodDefinition => {
+ if (options.sortOnMethods) {
+ sortDecorators(context, options, getNodeDecorators(methodDefinition))
+ }
+ },
+ ClassDeclaration: declaration => {
+ if (options.sortOnClasses) {
+ sortDecorators(context, options, getNodeDecorators(declaration))
+ }
+ },
+ }
+ },
+ defaultOptions: [defaultOptions],
+ name: 'sort-decorators',
+})
+/**
+ * Sorts decorators attached to a class, method, or property.
+ *
+ * Processes the decorators, groups them according to options, and reports any
+ * ordering errors found. Handles partitioning by comments and newlines.
+ *
+ * @param context - The ESLint rule context.
+ * @param options - The sorting options for decorators.
+ * @param decorators - Array of decorator nodes to sort.
+ */
+function sortDecorators(context, options, decorators) {
+ if (!isSortable(decorators)) {
+ return
+ }
+ let { sourceCode, id } = context
+ let eslintDisabledLines = getEslintDisabledLines({
+ ruleName: id,
+ sourceCode,
+ })
+ let optionsByGroupIndexComputer = buildOptionsByGroupIndexComputer(options)
+ let formattedMembers = decorators.reduce(
+ (accumulator, decorator) => {
+ let name = getDecoratorName({
+ sourceCode,
+ decorator,
+ })
+ let group = computeGroup({
+ customGroupMatcher: customGroup =>
+ doesCustomGroupMatch({
+ elementName: name,
+ selectors: [],
+ modifiers: [],
+ customGroup,
+ }),
+ predefinedGroups: [],
+ options,
+ })
+ let sortingNode = {
+ isEslintDisabled: isNodeEslintDisabled(decorator, eslintDisabledLines),
+ size: rangeToDiff(decorator, sourceCode),
+ node: decorator,
+ group,
+ name,
+ }
+ let lastSortingNode = accumulator.at(-1)?.at(-1)
+ if (
+ shouldPartition({
+ lastSortingNode,
+ sortingNode,
+ sourceCode,
+ options,
+ })
+ ) {
+ accumulator.push([])
+ }
+ accumulator.at(-1).push({
+ ...sortingNode,
+ partitionId: accumulator.length,
+ })
+ return accumulator
+ },
+ [[]],
+ )
+ function sortNodesExcludingEslintDisabled(ignoreEslintDisabledNodes) {
+ return formattedMembers.flatMap(nodes =>
+ sortNodesByGroups({
+ comparatorByOptionsComputer: defaultComparatorByOptionsComputer,
+ optionsByGroupIndexComputer,
+ ignoreEslintDisabledNodes,
+ groups: options.groups,
+ nodes,
+ }),
+ )
+ }
+ let nodes = formattedMembers.flat()
+ reportAllErrors({
+ availableMessageIds: {
+ missedSpacingBetweenMembers: MISSED_SPACING_ERROR_ID,
+ extraSpacingBetweenMembers: EXTRA_SPACING_ERROR_ID,
+ unexpectedGroupOrder: GROUP_ORDER_ERROR_ID,
+ unexpectedOrder: ORDER_ERROR_ID,
+ },
+ ignoreFirstNodeHighestBlockComment: true,
+ sortNodesExcludingEslintDisabled,
+ options,
+ context,
+ nodes,
+ })
+}
+export { sort_decorators_default as default }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-decorators/types.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-decorators/types.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..9e543645dbd880a369fbc5a8c5ea1dbd810c90fe
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-decorators/types.d.ts
@@ -0,0 +1,24 @@
+import { TSESTree } from '@typescript-eslint/types'
+import { AllCommonOptions } from '../../types/all-common-options.js'
+import { TypeOption } from '../../types/common-options.js'
+import { SortingNode } from '../../types/sorting-node.js'
+export type Options = Partial<
+ {
+ sortOnParameters: boolean
+ sortOnProperties: boolean
+ sortOnAccessors: boolean
+ sortOnMethods: boolean
+ sortOnClasses: boolean
+ } & AllCommonOptions<
+ TypeOption,
+ AdditionalSortOptions,
+ CustomGroupMatchOptions
+ >
+>[]
+export type SortDecoratorsSortingNode = SortingNode
+/**
+ * Match options for a custom group.
+ */
+type CustomGroupMatchOptions = object
+type AdditionalSortOptions = object
+export {}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-enums.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-enums.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..9e22fd62ed845dd6fed80a4bce67728f948ffc23
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-enums.d.ts
@@ -0,0 +1,12 @@
+import { MessageId, Options } from './sort-enums/types.js'
+declare const _default: import('@typescript-eslint/utils/ts-eslint').RuleModule<
+ MessageId,
+ Options,
+ {
+ recommended?: boolean
+ },
+ import('@typescript-eslint/utils/ts-eslint').RuleListener
+> & {
+ name: string
+}
+export default _default
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-enums.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-enums.js
new file mode 100644
index 0000000000000000000000000000000000000000..17bdf9993800d988182921cacc2d9305c309f0ea
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-enums.js
@@ -0,0 +1,86 @@
+import {
+ buildCommonJsonSchemas,
+ buildUseConfigIfJsonSchema,
+ matchesAstSelectorJsonSchema,
+ useExperimentalDependencyDetectionJsonSchema,
+} from '../utils/json-schemas/common-json-schemas.js'
+import { buildCommonGroupsJsonSchemas } from '../utils/json-schemas/common-groups-json-schemas.js'
+import {
+ DEPENDENCY_ORDER_ERROR,
+ EXTRA_SPACING_ERROR,
+ GROUP_ORDER_ERROR,
+ MISSED_SPACING_ERROR,
+ ORDER_ERROR,
+} from '../utils/report-errors.js'
+import {
+ partitionByCommentJsonSchema,
+ partitionByNewlineJsonSchema,
+} from '../utils/json-schemas/common-partition-json-schemas.js'
+import { buildAstListeners } from '../utils/build-ast-listeners.js'
+import { createEslintRule } from '../utils/create-eslint-rule.js'
+import {
+ DEPENDENCY_ORDER_ERROR_ID,
+ EXTRA_SPACING_ERROR_ID,
+ GROUP_ORDER_ERROR_ID,
+ MISSED_SPACING_ERROR_ID,
+ ORDER_ERROR_ID,
+ additionalCustomGroupMatchOptionsJsonSchema,
+} from './sort-enums/types.js'
+import { defaultOptions, sortEnum } from './sort-enums/sort-enum.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+var sort_enums_default = createEslintRule({
+ meta: {
+ schema: {
+ items: {
+ properties: {
+ ...buildCommonJsonSchemas(),
+ ...buildCommonGroupsJsonSchemas({
+ additionalCustomGroupMatchProperties:
+ additionalCustomGroupMatchOptionsJsonSchema,
+ }),
+ sortByValue: {
+ description: 'Specifies whether to sort enums by value.',
+ enum: ['always', 'ifNumericEnum', 'never'],
+ type: 'string',
+ },
+ useConfigurationIf: buildUseConfigIfJsonSchema({
+ additionalProperties: {
+ matchesAstSelector: matchesAstSelectorJsonSchema,
+ },
+ }),
+ useExperimentalDependencyDetection:
+ useExperimentalDependencyDetectionJsonSchema,
+ partitionByComment: partitionByCommentJsonSchema,
+ partitionByNewLine: partitionByNewlineJsonSchema,
+ },
+ additionalProperties: false,
+ type: 'object',
+ },
+ uniqueItems: true,
+ type: 'array',
+ },
+ messages: {
+ [DEPENDENCY_ORDER_ERROR_ID]: DEPENDENCY_ORDER_ERROR,
+ [MISSED_SPACING_ERROR_ID]: MISSED_SPACING_ERROR,
+ [EXTRA_SPACING_ERROR_ID]: EXTRA_SPACING_ERROR,
+ [GROUP_ORDER_ERROR_ID]: GROUP_ORDER_ERROR,
+ [ORDER_ERROR_ID]: ORDER_ERROR,
+ },
+ docs: {
+ url: 'https://perfectionist.dev/rules/sort-enums',
+ description: 'Enforce sorted TypeScript enums.',
+ recommended: true,
+ },
+ type: 'suggestion',
+ fixable: 'code',
+ },
+ create: context =>
+ buildAstListeners({
+ nodeTypes: [AST_NODE_TYPES.TSEnumDeclaration],
+ sorter: sortEnum,
+ context,
+ }),
+ defaultOptions: [defaultOptions],
+ name: 'sort-enums',
+})
+export { sort_enums_default as default }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-enums/build-comparator-by-options-computer.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-enums/build-comparator-by-options-computer.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..45ed58fddb928b69217ee2eaf96b34dea11bc9bd
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-enums/build-comparator-by-options-computer.d.ts
@@ -0,0 +1,16 @@
+import { ComparatorByOptionsComputer } from '../../utils/compare/default-comparator-by-options-computer.js'
+import { SortEnumsSortingNode, Options } from './types.js'
+/**
+ * Builds a comparator computer function for sorting enum members.
+ *
+ * Creates a function that returns the appropriate comparator based on the
+ * sorting options and whether the enum is numeric. Handles sorting by name or
+ * by value depending on the `sortByValue` option.
+ *
+ * @param isNumericEnum - Whether the enum contains only numeric values.
+ * @returns A comparator computer function that creates comparators from
+ * options.
+ */
+export declare function buildComparatorByOptionsComputer(
+ isNumericEnum: boolean,
+): ComparatorByOptionsComputer, SortEnumsSortingNode>
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-enums/build-comparator-by-options-computer.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-enums/build-comparator-by-options-computer.js
new file mode 100644
index 0000000000000000000000000000000000000000..276646d9b5f4ad908a98df197f7eff20a2a7bd51
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-enums/build-comparator-by-options-computer.js
@@ -0,0 +1,84 @@
+import { UnreachableCaseError } from '../../utils/unreachable-case-error.js'
+import { buildLineLengthComparator } from '../../utils/compare/build-line-length-comparator.js'
+import { compareAlphabetically } from '../../utils/compare/compare-alphabetically.js'
+import { compareByCustomSort } from '../../utils/compare/compare-by-custom-sort.js'
+import { unsortedComparator } from '../../utils/compare/unsorted-comparator.js'
+import { compareNaturally } from '../../utils/compare/compare-naturally.js'
+import { defaultComparatorByOptionsComputer } from '../../utils/compare/default-comparator-by-options-computer.js'
+/**
+ * Builds a comparator computer function for sorting enum members.
+ *
+ * Creates a function that returns the appropriate comparator based on the
+ * sorting options and whether the enum is numeric. Handles sorting by name or
+ * by value depending on the `sortByValue` option.
+ *
+ * @param isNumericEnum - Whether the enum contains only numeric values.
+ * @returns A comparator computer function that creates comparators from
+ * options.
+ */
+function buildComparatorByOptionsComputer(isNumericEnum) {
+ return options => {
+ switch (options.sortByValue) {
+ case 'ifNumericEnum':
+ if (isNumericEnum) {
+ return byNumericValueComparatorComputer(options)
+ }
+ return defaultComparatorByOptionsComputer(options)
+ case 'always':
+ if (isNumericEnum) {
+ return byNumericValueComparatorComputer(options)
+ }
+ return byNonNumericValueComparatorComputer(options)
+ case 'never':
+ return defaultComparatorByOptionsComputer(options)
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(options.sortByValue)
+ }
+ }
+}
+var byNonNumericValueComparatorComputer = options => {
+ switch (options.type) {
+ /* v8 ignore next 2 -- @preserve Untested for now as not a relevant sort for this rule. */
+ case 'subgroup-order':
+ return defaultComparatorByOptionsComputer(options)
+ case 'alphabetical':
+ return (a, b) =>
+ compareAlphabetically(a.value ?? '', b.value ?? '', options)
+ case 'line-length':
+ return buildLineLengthComparator(options)
+ case 'unsorted':
+ return unsortedComparator
+ case 'natural':
+ return (a, b) => compareNaturally(a.value ?? '', b.value ?? '', options)
+ case 'custom':
+ return (a, b) =>
+ compareByCustomSort(a.value ?? '', b.value ?? '', options)
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(options.type)
+ }
+}
+var byNumericValueComparatorComputer = options => {
+ switch (options.type) {
+ /* v8 ignore next 2 -- @preserve Untested for now as not a relevant sort for this rule. */
+ case 'subgroup-order':
+ return defaultComparatorByOptionsComputer(options)
+ case 'alphabetical':
+ case 'line-length':
+ case 'natural':
+ case 'custom':
+ return (a, b) =>
+ compareNaturally(
+ a.numericValue.toString(),
+ b.numericValue.toString(),
+ options,
+ )
+ case 'unsorted':
+ return unsortedComparator
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(options.type)
+ }
+}
+export { buildComparatorByOptionsComputer }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-enums/compute-dependencies-by-sorting-node.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-enums/compute-dependencies-by-sorting-node.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..781103c5febf15760e9b2cca3a1fd83f9feeab39
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-enums/compute-dependencies-by-sorting-node.d.ts
@@ -0,0 +1,13 @@
+import { TSESLint } from '@typescript-eslint/utils'
+import { SortEnumsSortingNode } from './types.js'
+type SortingNodeWithoutDependencies = Omit
+export declare function computeDependenciesBySortingNode({
+ sortingNodes,
+ sourceCode,
+ enumName,
+}: {
+ sortingNodes: SortingNodeWithoutDependencies[]
+ sourceCode: TSESLint.SourceCode
+ enumName: string
+}): Map
+export {}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-enums/compute-dependencies-by-sorting-node.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-enums/compute-dependencies-by-sorting-node.js
new file mode 100644
index 0000000000000000000000000000000000000000..6210ed9f7b624daa78b7b4496bd4fb967e06b425
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-enums/compute-dependencies-by-sorting-node.js
@@ -0,0 +1,62 @@
+import { computeDependenciesBySortingNode as computeDependenciesBySortingNode$1 } from '../../utils/compute-dependencies-by-sorting-node.js'
+import { computeParentNodesWithTypes } from '../../utils/compute-parent-nodes-with-types.js'
+import { doesSortingNodeHaveOneOfDependencyNames } from '../../utils/does-sorting-node-have-one-of-dependency-names.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+function computeDependenciesBySortingNode({
+ sortingNodes,
+ sourceCode,
+ enumName,
+}) {
+ return computeDependenciesBySortingNode$1({
+ additionalIdentifierDependenciesComputer:
+ buildAdditionalIdentifierDependenciesComputer({
+ sortingNodes,
+ enumName,
+ }),
+ sortingNodes,
+ sourceCode,
+ })
+}
+function buildAdditionalIdentifierDependenciesComputer({
+ sortingNodes,
+ enumName,
+}) {
+ return ({ referencingSortingNode, reference }) => {
+ if (reference.identifier.name !== enumName) {
+ return []
+ }
+ let relatedIdentifiers = computeMemberExpressionIdentifiers(
+ reference.identifier,
+ referencingSortingNode,
+ )
+ return sortingNodes.filter(sortingNode =>
+ doesSortingNodeHaveOneOfDependencyNames(sortingNode, relatedIdentifiers),
+ )
+ }
+}
+function computeMemberExpressionIdentifiers(
+ identifier,
+ referencingSortingNode,
+) {
+ return computeParentNodesWithTypes({
+ allowedTypes: [AST_NODE_TYPES.MemberExpression],
+ maxParent: referencingSortingNode.node,
+ consecutiveOnly: true,
+ node: identifier,
+ })
+ .map(node => computeMemberExpressionPropertyName(node.property))
+ .filter(name => name !== null)
+}
+function computeMemberExpressionPropertyName(property) {
+ if (property.type === AST_NODE_TYPES.Identifier) {
+ return property.name
+ }
+ if (
+ property.type === AST_NODE_TYPES.Literal &&
+ typeof property.value === 'string'
+ ) {
+ return property.value
+ }
+ return null
+}
+export { computeDependenciesBySortingNode }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-enums/compute-dependencies.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-enums/compute-dependencies.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..7250084613807b65c20592c65e6efa73078fb28d
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-enums/compute-dependencies.d.ts
@@ -0,0 +1,14 @@
+import { TSESTree } from '@typescript-eslint/types'
+/**
+ * Extract dependencies from an enum.
+ *
+ * @deprecated - To remove when experimental dependency detection is the only
+ * option.
+ * @param expression - The enum or class declaration node.
+ * @param enumName - The name of the enum being processed.
+ * @returns The list of dependencies.
+ */
+export declare function computeDependencies(
+ expression: TSESTree.Expression,
+ enumName: string,
+): string[]
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-enums/compute-dependencies.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-enums/compute-dependencies.js
new file mode 100644
index 0000000000000000000000000000000000000000..ba822be2d779b3fb04d4cdcecd2c48a798b29c14
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-enums/compute-dependencies.js
@@ -0,0 +1,91 @@
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Extract dependencies from an enum.
+ *
+ * @deprecated - To remove when experimental dependency detection is the only
+ * option.
+ * @param expression - The enum or class declaration node.
+ * @param enumName - The name of the enum being processed.
+ * @returns The list of dependencies.
+ */
+function computeDependencies(expression, enumName) {
+ let dependencies = []
+ let stack = [expression]
+ while (stack.length > 0) {
+ let node = stack.pop()
+ switch (node.type) {
+ case AST_NODE_TYPES.MemberExpression:
+ if (
+ node.object.type === AST_NODE_TYPES.Identifier &&
+ node.object.name === enumName
+ ) {
+ if (node.property.type === AST_NODE_TYPES.Identifier) {
+ dependencies.push(node.property.name)
+ } else if (
+ node.property.type === AST_NODE_TYPES.Literal &&
+ typeof node.property.value === 'string'
+ ) {
+ dependencies.push(node.property.value)
+ }
+ }
+ break
+ case AST_NODE_TYPES.Identifier:
+ dependencies.push(node.name)
+ }
+ if ('alternate' in node && node.alternate) {
+ stack.push(node.alternate)
+ }
+ if ('argument' in node && node.argument) {
+ stack.push(node.argument)
+ }
+ if ('arguments' in node) {
+ stack.push(...node.arguments)
+ }
+ if ('callee' in node) {
+ stack.push(node.callee)
+ }
+ if ('consequent' in node) {
+ /* v8 ignore if -- @preserve Unsure if we can reach it. */
+ if (Array.isArray(node.consequent)) {
+ stack.push(...node.consequent)
+ } else {
+ stack.push(node.consequent)
+ }
+ }
+ if ('elements' in node) {
+ let elements = node.elements.filter(currentNode => currentNode !== null)
+ stack.push(...elements)
+ }
+ if ('expressions' in node) {
+ stack.push(...node.expressions)
+ }
+ if ('key' in node) {
+ stack.push(node.key)
+ }
+ if ('left' in node) {
+ stack.push(node.left)
+ }
+ if ('object' in node) {
+ stack.push(node.object)
+ }
+ if ('properties' in node) {
+ stack.push(...node.properties)
+ }
+ if ('right' in node) {
+ stack.push(node.right)
+ }
+ if ('test' in node && node.test) {
+ stack.push(node.test)
+ }
+ if (
+ 'value' in node &&
+ node.value &&
+ typeof node.value === 'object' &&
+ 'type' in node.value
+ ) {
+ stack.push(node.value)
+ }
+ }
+ return dependencies
+}
+export { computeDependencies }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-enums/compute-expression-number-value.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-enums/compute-expression-number-value.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..27a0557761825209a03b61d23ba083b065425f02
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-enums/compute-expression-number-value.d.ts
@@ -0,0 +1,13 @@
+import { TSESTree } from '@typescript-eslint/types'
+/**
+ * Extracts a numeric value from an AST expression node.
+ *
+ * Handles literal numbers, binary expressions, and unary expressions
+ * recursively to compute the final numeric value.
+ *
+ * @param expression - The AST node to evaluate.
+ * @returns The numeric value of the expression, or null if not evaluable.
+ */
+export declare function computeExpressionNumberValue(
+ expression: TSESTree.Node,
+): number | null
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-enums/compute-expression-number-value.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-enums/compute-expression-number-value.js
new file mode 100644
index 0000000000000000000000000000000000000000..99cb641d3d9379df4a7b1ad8317f8ba6388313b6
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-enums/compute-expression-number-value.js
@@ -0,0 +1,105 @@
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Extracts a numeric value from an AST expression node.
+ *
+ * Handles literal numbers, binary expressions, and unary expressions
+ * recursively to compute the final numeric value.
+ *
+ * @param expression - The AST node to evaluate.
+ * @returns The numeric value of the expression, or null if not evaluable.
+ */
+function computeExpressionNumberValue(expression) {
+ switch (expression.type) {
+ case AST_NODE_TYPES.BinaryExpression:
+ return computeBinaryExpressionNumberValue(
+ expression.left,
+ expression.right,
+ expression.operator,
+ )
+ case AST_NODE_TYPES.UnaryExpression:
+ return computeUnaryExpressionNumberValue(
+ expression.argument,
+ expression.operator,
+ )
+ case AST_NODE_TYPES.Literal:
+ return typeof expression.value === 'number' ? expression.value : null
+ default:
+ return null
+ }
+}
+/**
+ * Evaluates a binary expression to compute its numeric value.
+ *
+ * Supports arithmetic operators (+, -, *, /, %, **), bitwise operators (|, &,
+ * ^, <<, >>), and returns null for unsupported expressions.
+ *
+ * @param leftExpression - The left operand of the binary expression.
+ * @param rightExpression - The right operand of the binary expression.
+ * @param operator - The operator string (e.g., '+', '-', '*', '|').
+ * @returns The computed numeric value, or null if it cannot be evaluated.
+ */
+function computeBinaryExpressionNumberValue(
+ leftExpression,
+ rightExpression,
+ operator,
+) {
+ let left = computeExpressionNumberValue(leftExpression)
+ let right = computeExpressionNumberValue(rightExpression)
+ if (left === null || right === null) {
+ return null
+ }
+ switch (operator) {
+ case '**':
+ return left ** right
+ case '>>':
+ return left >> right
+ case '<<':
+ return left << right
+ case '+':
+ return left + right
+ case '-':
+ return left - right
+ case '*':
+ return left * right
+ case '/':
+ return left / right
+ case '%':
+ return left % right
+ case '|':
+ return left | right
+ case '&':
+ return left & right
+ case '^':
+ return left ^ right
+ /* v8 ignore next 2 -- @preserve Unsure if we can reach it. */
+ default:
+ return null
+ }
+}
+/**
+ * Evaluates a unary expression to compute its numeric value.
+ *
+ * Supports unary plus (+), minus (-), and bitwise NOT (~) operators.
+ *
+ * @param argumentExpression - The operand of the unary expression.
+ * @param operator - The operator string (e.g., '+', '-', '~').
+ * @returns The computed numeric value, or null if it cannot be evaluated.
+ */
+function computeUnaryExpressionNumberValue(argumentExpression, operator) {
+ let argument = computeExpressionNumberValue(argumentExpression)
+ if (argument === null) {
+ return null
+ }
+ switch (operator) {
+ case '+':
+ return argument
+ case '-':
+ return -argument
+ case '~':
+ return ~argument
+ /* v8 ignore next 2 -- @preserve Unsure if we can reach it. */
+ default:
+ return null
+ }
+}
+export { computeExpressionNumberValue }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-enums/compute-matched-context-options.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-enums/compute-matched-context-options.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..d8c79d2789b8210c37c0e9371618d77c34713b74
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-enums/compute-matched-context-options.d.ts
@@ -0,0 +1,22 @@
+import { RuleContext } from '@typescript-eslint/utils/ts-eslint'
+import { TSESTree } from '@typescript-eslint/types'
+import { MessageId, Options } from './types.js'
+/**
+ * Computes the matched context options for a given enum node.
+ *
+ * @param params - Parameters.
+ * @param params.enumMembers - The enum members of the enum declaration node.
+ * @param params.matchedAstSelectors - The matched AST selectors for an enum
+ * node.
+ * @param params.context - The rule context.
+ * @returns The matched context options or undefined if none match.
+ */
+export declare function computeMatchedContextOptions({
+ matchedAstSelectors,
+ enumMembers,
+ context,
+}: {
+ context: Readonly>
+ matchedAstSelectors: ReadonlySet
+ enumMembers: TSESTree.TSEnumMember[]
+}): Options[number] | undefined
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-enums/compute-matched-context-options.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-enums/compute-matched-context-options.js
new file mode 100644
index 0000000000000000000000000000000000000000..5bfc0f0e1198138b333036b5f7f3628306d4f61a
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-enums/compute-matched-context-options.js
@@ -0,0 +1,48 @@
+import { passesAllNamesMatchPatternFilter } from '../../utils/context-matching/passes-all-names-match-pattern-filter.js'
+import { passesAstSelectorFilter } from '../../utils/context-matching/passes-ast-selector-filter.js'
+import { computeNodeName } from './compute-node-name.js'
+/**
+ * Computes the matched context options for a given enum node.
+ *
+ * @param params - Parameters.
+ * @param params.enumMembers - The enum members of the enum declaration node.
+ * @param params.matchedAstSelectors - The matched AST selectors for an enum
+ * node.
+ * @param params.context - The rule context.
+ * @returns The matched context options or undefined if none match.
+ */
+function computeMatchedContextOptions({
+ matchedAstSelectors,
+ enumMembers,
+ context,
+}) {
+ let nodeNames = enumMembers.map(enumMember =>
+ computeNodeName({
+ sourceCode: context.sourceCode,
+ node: enumMember,
+ }),
+ )
+ return context.options.find(options =>
+ isContextOptionMatching({
+ matchedAstSelectors,
+ nodeNames,
+ options,
+ }),
+ )
+}
+function isContextOptionMatching({ matchedAstSelectors, nodeNames, options }) {
+ if (!options.useConfigurationIf) {
+ return true
+ }
+ return (
+ passesAllNamesMatchPatternFilter({
+ allNamesMatchPattern: options.useConfigurationIf.allNamesMatchPattern,
+ nodeNames,
+ }) &&
+ passesAstSelectorFilter({
+ matchesAstSelector: options.useConfigurationIf.matchesAstSelector,
+ matchedAstSelectors,
+ })
+ )
+}
+export { computeMatchedContextOptions }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-enums/compute-node-name.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-enums/compute-node-name.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..3ee95df909e9fc19d4ed9eaacb61d1ca5c661290
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-enums/compute-node-name.d.ts
@@ -0,0 +1,17 @@
+import { TSESTree } from '@typescript-eslint/types'
+import { TSESLint } from '@typescript-eslint/utils'
+/**
+ * Computes the name of an enum member node.
+ *
+ * @param params - Parameters for group-based sorting.
+ * @param params.node - The enum member node.
+ * @param params.sourceCode - The source code object.
+ * @returns The computed name of the enum member node.
+ */
+export declare function computeNodeName({
+ sourceCode,
+ node,
+}: {
+ sourceCode: TSESLint.SourceCode
+ node: TSESTree.TSEnumMember
+}): string
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-enums/compute-node-name.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-enums/compute-node-name.js
new file mode 100644
index 0000000000000000000000000000000000000000..9b3fc7c0d8b35af1237d1e26ab200c2801c23e0c
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-enums/compute-node-name.js
@@ -0,0 +1,15 @@
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Computes the name of an enum member node.
+ *
+ * @param params - Parameters for group-based sorting.
+ * @param params.node - The enum member node.
+ * @param params.sourceCode - The source code object.
+ * @returns The computed name of the enum member node.
+ */
+function computeNodeName({ sourceCode, node }) {
+ return node.id.type === AST_NODE_TYPES.Literal ?
+ node.id.value
+ : sourceCode.getText(node.id)
+}
+export { computeNodeName }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-enums/sort-enum.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-enums/sort-enum.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..89dca276bf9297f202677f7939638d661719a4e7
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-enums/sort-enum.d.ts
@@ -0,0 +1,13 @@
+import { RuleContext } from '@typescript-eslint/utils/ts-eslint'
+import { TSESTree } from '@typescript-eslint/types'
+import { MessageId, Options } from './types.js'
+export declare let defaultOptions: Required
+export declare function sortEnum({
+ matchedAstSelectors,
+ context,
+ node,
+}: {
+ context: Readonly>
+ matchedAstSelectors: ReadonlySet
+ node: TSESTree.TSEnumDeclaration
+}): void
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-enums/sort-enum.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-enums/sort-enum.js
new file mode 100644
index 0000000000000000000000000000000000000000..5f67268981cd430b9f94391bd8d3757d470ea3a0
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-enums/sort-enum.js
@@ -0,0 +1,174 @@
+import { populateSortingNodeGroupsWithDependencies } from '../../utils/populate-sorting-node-groups-with-dependencies.js'
+import { validateNewlinesAndPartitionConfig } from '../../utils/validate-newlines-and-partition-config.js'
+import { buildOptionsByGroupIndexComputer } from '../../utils/build-options-by-group-index-computer.js'
+import { validateCustomSortConfig } from '../../utils/validate-custom-sort-config.js'
+import { sortNodesByDependencies } from '../../utils/sort-nodes-by-dependencies.js'
+import { getEslintDisabledLines } from '../../utils/get-eslint-disabled-lines.js'
+import { doesCustomGroupMatch } from '../../utils/does-custom-group-match.js'
+import { isNodeEslintDisabled } from '../../utils/is-node-eslint-disabled.js'
+import { validateGroupsConfig } from '../../utils/validate-groups-config.js'
+import { sortNodesByGroups } from '../../utils/sort-nodes-by-groups.js'
+import { reportAllErrors } from '../../utils/report-all-errors.js'
+import { shouldPartition } from '../../utils/should-partition.js'
+import { computeGroup } from '../../utils/compute-group.js'
+import { rangeToDiff } from '../../utils/range-to-diff.js'
+import { getSettings } from '../../utils/get-settings.js'
+import { isSortable } from '../../utils/is-sortable.js'
+import { complete } from '../../utils/complete.js'
+import { getEnumMembers } from '../../utils/get-enum-members.js'
+import {
+ DEPENDENCY_ORDER_ERROR_ID,
+ EXTRA_SPACING_ERROR_ID,
+ GROUP_ORDER_ERROR_ID,
+ MISSED_SPACING_ERROR_ID,
+ ORDER_ERROR_ID,
+} from './types.js'
+import { computeDependenciesBySortingNode } from './compute-dependencies-by-sorting-node.js'
+import { buildComparatorByOptionsComputer } from './build-comparator-by-options-computer.js'
+import { computeExpressionNumberValue } from './compute-expression-number-value.js'
+import { computeNodeName } from './compute-node-name.js'
+import { computeMatchedContextOptions } from './compute-matched-context-options.js'
+import { computeDependencies } from './compute-dependencies.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+var defaultOptions = {
+ useExperimentalDependencyDetection: true,
+ fallbackSort: { type: 'unsorted' },
+ newlinesInside: 'newlinesBetween',
+ sortByValue: 'ifNumericEnum',
+ partitionByComment: false,
+ partitionByNewLine: false,
+ specialCharacters: 'keep',
+ newlinesBetween: 'ignore',
+ useConfigurationIf: {},
+ type: 'alphabetical',
+ ignoreCase: true,
+ locales: 'en-US',
+ customGroups: [],
+ alphabet: '',
+ order: 'asc',
+ groups: [],
+}
+function sortEnum({ matchedAstSelectors, context, node }) {
+ let members = getEnumMembers(node)
+ if (!isSortable(members) || members.some(({ initializer }) => !initializer)) {
+ return
+ }
+ let settings = getSettings(context.settings)
+ let matchedContextOptions = computeMatchedContextOptions({
+ enumMembers: members,
+ matchedAstSelectors,
+ context,
+ })
+ let options = complete(matchedContextOptions, settings, defaultOptions)
+ validateCustomSortConfig(options)
+ validateGroupsConfig({
+ selectors: [],
+ modifiers: [],
+ options,
+ })
+ validateNewlinesAndPartitionConfig(options)
+ let { sourceCode, id } = context
+ let eslintDisabledLines = getEslintDisabledLines({
+ ruleName: id,
+ sourceCode,
+ })
+ let optionsByGroupIndexComputer = buildOptionsByGroupIndexComputer(options)
+ let sortingNodeGroups = members.reduce(
+ (accumulator, member) => {
+ let name = computeNodeName({
+ node: member,
+ sourceCode,
+ })
+ let group = computeGroup({
+ customGroupMatcher: customGroup =>
+ doesCustomGroupMatch({
+ elementValue: sourceCode.getText(member.initializer),
+ elementName: name,
+ selectors: [],
+ modifiers: [],
+ customGroup,
+ }),
+ predefinedGroups: [],
+ options,
+ })
+ let lastSortingNode = accumulator.at(-1)?.at(-1)
+ let sortingNode = {
+ dependencies:
+ options.useExperimentalDependencyDetection ?
+ []
+ : computeDependencies(member.initializer, node.id.name),
+ value:
+ member.initializer?.type === AST_NODE_TYPES.Literal ?
+ (member.initializer.value?.toString() ?? null)
+ : null,
+ isEslintDisabled: isNodeEslintDisabled(member, eslintDisabledLines),
+ numericValue: computeExpressionNumberValue(member.initializer),
+ size: rangeToDiff(member, sourceCode),
+ dependencyNames: [name],
+ node: member,
+ group,
+ name,
+ }
+ if (
+ shouldPartition({
+ lastSortingNode,
+ sortingNode,
+ sourceCode,
+ options,
+ })
+ ) {
+ accumulator.push([])
+ }
+ accumulator.at(-1).push({
+ ...sortingNode,
+ partitionId: accumulator.length,
+ })
+ return accumulator
+ },
+ [[]],
+ )
+ if (options.useExperimentalDependencyDetection) {
+ let dependenciesBySortingNode = computeDependenciesBySortingNode({
+ sortingNodes: sortingNodeGroups.flat(),
+ enumName: node.id.name,
+ sourceCode,
+ })
+ sortingNodeGroups = populateSortingNodeGroupsWithDependencies({
+ dependenciesBySortingNode,
+ sortingNodeGroups,
+ })
+ }
+ let sortingNodes = sortingNodeGroups.flat()
+ let isNumericEnum = sortingNodes.every(
+ sortingNode => sortingNode.numericValue !== null,
+ )
+ reportAllErrors({
+ availableMessageIds: {
+ missedSpacingBetweenMembers: MISSED_SPACING_ERROR_ID,
+ unexpectedDependencyOrder: DEPENDENCY_ORDER_ERROR_ID,
+ extraSpacingBetweenMembers: EXTRA_SPACING_ERROR_ID,
+ unexpectedGroupOrder: GROUP_ORDER_ERROR_ID,
+ unexpectedOrder: ORDER_ERROR_ID,
+ },
+ sortNodesExcludingEslintDisabled,
+ nodes: sortingNodes,
+ options,
+ context,
+ })
+ function sortNodesExcludingEslintDisabled(ignoreEslintDisabledNodes) {
+ let nodesSortedByGroups = sortingNodeGroups.flatMap(sortingNodeGroup =>
+ sortNodesByGroups({
+ comparatorByOptionsComputer:
+ buildComparatorByOptionsComputer(isNumericEnum),
+ optionsByGroupIndexComputer,
+ ignoreEslintDisabledNodes,
+ nodes: sortingNodeGroup,
+ groups: options.groups,
+ }),
+ )
+ return sortNodesByDependencies(nodesSortedByGroups, {
+ ignoreEslintDisabledNodes,
+ })
+ }
+}
+export { defaultOptions, sortEnum }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-enums/types.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-enums/types.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..2a2d17839ecc9947d0e8accc4750f6e1b0cfdb94
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-enums/types.d.ts
@@ -0,0 +1,82 @@
+import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'
+import { TSESTree } from '@typescript-eslint/types'
+import { SortingNodeWithDependencies } from '../../utils/sort-nodes-by-dependencies.js'
+import { RegexOption, TypeOption } from '../../types/common-options.js'
+import { AllCommonOptions } from '../../types/all-common-options.js'
+export type MessageId =
+ | typeof DEPENDENCY_ORDER_ERROR_ID
+ | typeof MISSED_SPACING_ERROR_ID
+ | typeof EXTRA_SPACING_ERROR_ID
+ | typeof GROUP_ORDER_ERROR_ID
+ | typeof ORDER_ERROR_ID
+export declare const ORDER_ERROR_ID = 'unexpectedEnumsOrder'
+export declare const GROUP_ORDER_ERROR_ID = 'unexpectedEnumsGroupOrder'
+export declare const EXTRA_SPACING_ERROR_ID = 'extraSpacingBetweenEnumsMembers'
+export declare const MISSED_SPACING_ERROR_ID =
+ 'missedSpacingBetweenEnumsMembers'
+export declare const DEPENDENCY_ORDER_ERROR_ID =
+ 'unexpectedEnumsDependencyOrder'
+/**
+ * Configuration options for the sort-enums rule.
+ *
+ * This rule enforces consistent ordering of TypeScript enum members to improve
+ * code readability and maintainability.
+ */
+export type Options = Partial<
+ {
+ /**
+ * Conditional configuration based on pattern matching.
+ */
+ useConfigurationIf: {
+ /**
+ * Regular expression pattern to match against all enum element names.
+ * The rule is only applied when all names match this pattern.
+ */
+ allNamesMatchPattern?: RegexOption
+ /**
+ * AST selector to match against TSEnumDeclaration nodes.
+ */
+ matchesAstSelector?: string
+ }
+ /**
+ * Whether to sort enum members by their values instead of names. When
+ * "always", compares enum values; when "never", compares enum member
+ * names.
+ *
+ * @default ifNumericEnum
+ */
+ sortByValue: 'ifNumericEnum' | 'always' | 'never'
+ /**
+ * Enables experimental dependency detection.
+ */
+ useExperimentalDependencyDetection: boolean
+ } & AllCommonOptions<
+ TypeOption,
+ AdditionalSortOptions,
+ CustomGroupMatchOptions
+ >
+>[]
+export interface SortEnumsSortingNode extends SortingNodeWithDependencies {
+ numericValue: number | null
+ value: string | null
+}
+/**
+ * Match options for a custom group.
+ */
+interface CustomGroupMatchOptions {
+ /**
+ * Regular expression pattern to match enum member values. Members with
+ * values matching this pattern will be included in this custom group.
+ */
+ elementValuePattern?: RegexOption
+}
+type AdditionalSortOptions = object
+/**
+ * Additional custom group match options JSON schema. Used by ESLint to validate
+ * rule options at configuration time.
+ */
+export declare let additionalCustomGroupMatchOptionsJsonSchema: Record<
+ string,
+ JSONSchema4
+>
+export {}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-enums/types.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-enums/types.js
new file mode 100644
index 0000000000000000000000000000000000000000..42ca924b599bdfb7a365f57832a3ff6f4b1d07f3
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-enums/types.js
@@ -0,0 +1,21 @@
+import { buildRegexJsonSchema } from '../../utils/json-schemas/common-json-schemas.js'
+var ORDER_ERROR_ID = 'unexpectedEnumsOrder'
+var GROUP_ORDER_ERROR_ID = 'unexpectedEnumsGroupOrder'
+var EXTRA_SPACING_ERROR_ID = 'extraSpacingBetweenEnumsMembers'
+var MISSED_SPACING_ERROR_ID = 'missedSpacingBetweenEnumsMembers'
+var DEPENDENCY_ORDER_ERROR_ID = 'unexpectedEnumsDependencyOrder'
+/**
+ * Additional custom group match options JSON schema. Used by ESLint to validate
+ * rule options at configuration time.
+ */
+var additionalCustomGroupMatchOptionsJsonSchema = {
+ elementValuePattern: buildRegexJsonSchema(),
+}
+export {
+ DEPENDENCY_ORDER_ERROR_ID,
+ EXTRA_SPACING_ERROR_ID,
+ GROUP_ORDER_ERROR_ID,
+ MISSED_SPACING_ERROR_ID,
+ ORDER_ERROR_ID,
+ additionalCustomGroupMatchOptionsJsonSchema,
+}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-export-attributes.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-export-attributes.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..6b9f5df976ba07b70b03190f662a15b5c075ff78
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-export-attributes.d.ts
@@ -0,0 +1,20 @@
+declare const ORDER_ERROR_ID = 'unexpectedExportAttributesOrder'
+declare const GROUP_ORDER_ERROR_ID = 'unexpectedExportAttributesGroupOrder'
+declare const EXTRA_SPACING_ERROR_ID = 'extraSpacingBetweenExportAttributes'
+declare const MISSED_SPACING_ERROR_ID = 'missedSpacingBetweenExportAttributes'
+type MessageId =
+ | typeof MISSED_SPACING_ERROR_ID
+ | typeof EXTRA_SPACING_ERROR_ID
+ | typeof GROUP_ORDER_ERROR_ID
+ | typeof ORDER_ERROR_ID
+declare const _default: import('@typescript-eslint/utils/ts-eslint').RuleModule<
+ MessageId,
+ import('...js').SortImportAttributesOptions,
+ {
+ recommended?: boolean
+ },
+ import('@typescript-eslint/utils/ts-eslint').RuleListener
+> & {
+ name: string
+}
+export default _default
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-export-attributes.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-export-attributes.js
new file mode 100644
index 0000000000000000000000000000000000000000..b39aedf042e4a3ed08de32d99b54d75b8a68b9a5
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-export-attributes.js
@@ -0,0 +1,72 @@
+import {
+ EXTRA_SPACING_ERROR,
+ GROUP_ORDER_ERROR,
+ MISSED_SPACING_ERROR,
+ ORDER_ERROR,
+} from '../utils/report-errors.js'
+import { buildAstListeners } from '../utils/build-ast-listeners.js'
+import { createEslintRule } from '../utils/create-eslint-rule.js'
+import { sortImportOrExportAttributes } from './sort-import-attributes/sort-import-or-export-attributes.js'
+import { jsonSchema } from './sort-import-attributes.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+var ORDER_ERROR_ID = 'unexpectedExportAttributesOrder'
+var GROUP_ORDER_ERROR_ID = 'unexpectedExportAttributesGroupOrder'
+var EXTRA_SPACING_ERROR_ID = 'extraSpacingBetweenExportAttributes'
+var MISSED_SPACING_ERROR_ID = 'missedSpacingBetweenExportAttributes'
+var defaultOptions = {
+ fallbackSort: { type: 'unsorted' },
+ newlinesInside: 'newlinesBetween',
+ specialCharacters: 'keep',
+ partitionByComment: false,
+ partitionByNewLine: false,
+ newlinesBetween: 'ignore',
+ useConfigurationIf: {},
+ type: 'alphabetical',
+ ignoreCase: true,
+ customGroups: [],
+ locales: 'en-US',
+ alphabet: '',
+ order: 'asc',
+ groups: [],
+}
+var sort_export_attributes_default = createEslintRule({
+ meta: {
+ messages: {
+ [MISSED_SPACING_ERROR_ID]: MISSED_SPACING_ERROR,
+ [EXTRA_SPACING_ERROR_ID]: EXTRA_SPACING_ERROR,
+ [GROUP_ORDER_ERROR_ID]: GROUP_ORDER_ERROR,
+ [ORDER_ERROR_ID]: ORDER_ERROR,
+ },
+ docs: {
+ url: 'https://perfectionist.dev/rules/sort-export-attributes',
+ description: 'Enforce sorted export attributes.',
+ recommended: true,
+ },
+ schema: jsonSchema,
+ type: 'suggestion',
+ fixable: 'code',
+ },
+ create: context =>
+ buildAstListeners({
+ nodeTypes: [AST_NODE_TYPES.ExportNamedDeclaration],
+ sorter: sortExportAttributes,
+ context,
+ }),
+ defaultOptions: [defaultOptions],
+ name: 'sort-export-attributes',
+})
+function sortExportAttributes({ matchedAstSelectors, context, node }) {
+ sortImportOrExportAttributes({
+ availableMessageIds: {
+ missedSpacingBetweenMembers: MISSED_SPACING_ERROR_ID,
+ extraSpacingBetweenMembers: EXTRA_SPACING_ERROR_ID,
+ unexpectedGroupOrder: GROUP_ORDER_ERROR_ID,
+ unexpectedOrder: ORDER_ERROR_ID,
+ },
+ matchedAstSelectors,
+ defaultOptions,
+ context,
+ node,
+ })
+}
+export { sort_export_attributes_default as default }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-export-attributes/types.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-export-attributes/types.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..bd0af33ebae01fbd14136a8884a94fb9fba3033c
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-export-attributes/types.d.ts
@@ -0,0 +1,2 @@
+import { Options as SortImportAttributesOptions } from '../sort-import-attributes/types.js'
+export type Options = SortImportAttributesOptions
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-exports.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-exports.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..a06986d86504ee59a41ea7befe3010844780f88a
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-exports.d.ts
@@ -0,0 +1,24 @@
+import { TSESLint } from '@typescript-eslint/utils'
+import { Options } from './sort-exports/types.js'
+declare const ORDER_ERROR_ID = 'unexpectedExportsOrder'
+declare const GROUP_ORDER_ERROR_ID = 'unexpectedExportsGroupOrder'
+declare const EXTRA_SPACING_ERROR_ID = 'extraSpacingBetweenExports'
+declare const MISSED_SPACING_ERROR_ID = 'missedSpacingBetweenExports'
+declare const MISSED_COMMENT_ABOVE_ERROR_ID = 'missedCommentAboveExport'
+type MessageId =
+ | typeof MISSED_COMMENT_ABOVE_ERROR_ID
+ | typeof MISSED_SPACING_ERROR_ID
+ | typeof EXTRA_SPACING_ERROR_ID
+ | typeof GROUP_ORDER_ERROR_ID
+ | typeof ORDER_ERROR_ID
+declare const _default: TSESLint.RuleModule<
+ MessageId,
+ Options,
+ {
+ recommended?: boolean
+ },
+ TSESLint.RuleListener
+> & {
+ name: string
+}
+export default _default
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-exports.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-exports.js
new file mode 100644
index 0000000000000000000000000000000000000000..10485817eb813111b26e570864d061eb7ad058b9
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-exports.js
@@ -0,0 +1,237 @@
+import { buildCommonJsonSchemas } from '../utils/json-schemas/common-json-schemas.js'
+import { buildCommonGroupsJsonSchemas } from '../utils/json-schemas/common-groups-json-schemas.js'
+import { UnreachableCaseError } from '../utils/unreachable-case-error.js'
+import {
+ EXTRA_SPACING_ERROR,
+ GROUP_ORDER_ERROR,
+ MISSED_COMMENT_ABOVE_ERROR,
+ MISSED_SPACING_ERROR,
+ ORDER_ERROR,
+} from '../utils/report-errors.js'
+import {
+ partitionByCommentJsonSchema,
+ partitionByNewlineJsonSchema,
+} from '../utils/json-schemas/common-partition-json-schemas.js'
+import { defaultComparatorByOptionsComputer } from '../utils/compare/default-comparator-by-options-computer.js'
+import { validateNewlinesAndPartitionConfig } from '../utils/validate-newlines-and-partition-config.js'
+import { buildOptionsByGroupIndexComputer } from '../utils/build-options-by-group-index-computer.js'
+import { validateCustomSortConfig } from '../utils/validate-custom-sort-config.js'
+import { generatePredefinedGroups } from '../utils/generate-predefined-groups.js'
+import { getEslintDisabledLines } from '../utils/get-eslint-disabled-lines.js'
+import { doesCustomGroupMatch } from '../utils/does-custom-group-match.js'
+import { isNodeEslintDisabled } from '../utils/is-node-eslint-disabled.js'
+import { validateGroupsConfig } from '../utils/validate-groups-config.js'
+import { sortNodesByGroups } from '../utils/sort-nodes-by-groups.js'
+import { reportAllErrors } from '../utils/report-all-errors.js'
+import { shouldPartition } from '../utils/should-partition.js'
+import { computeGroup } from '../utils/compute-group.js'
+import { rangeToDiff } from '../utils/range-to-diff.js'
+import { getSettings } from '../utils/get-settings.js'
+import { complete } from '../utils/complete.js'
+import { createEslintRule } from '../utils/create-eslint-rule.js'
+import { isNodeOnSingleLine } from '../utils/is-node-on-single-line.js'
+import {
+ additionalCustomGroupMatchOptionsJsonSchema,
+ allModifiers,
+ allSelectors,
+} from './sort-exports/types.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Cache computed groups by modifiers and selectors for performance.
+ */
+var cachedGroupsByModifiersAndSelectors = /* @__PURE__ */ new Map()
+var ORDER_ERROR_ID = 'unexpectedExportsOrder'
+var GROUP_ORDER_ERROR_ID = 'unexpectedExportsGroupOrder'
+var EXTRA_SPACING_ERROR_ID = 'extraSpacingBetweenExports'
+var MISSED_SPACING_ERROR_ID = 'missedSpacingBetweenExports'
+var MISSED_COMMENT_ABOVE_ERROR_ID = 'missedCommentAboveExport'
+var defaultOptions = {
+ fallbackSort: { type: 'unsorted' },
+ newlinesInside: 'newlinesBetween',
+ specialCharacters: 'keep',
+ partitionByComment: false,
+ newlinesBetween: 'ignore',
+ partitionByNewLine: false,
+ type: 'alphabetical',
+ customGroups: [],
+ ignoreCase: true,
+ locales: 'en-US',
+ alphabet: '',
+ order: 'asc',
+ groups: [],
+}
+var sort_exports_default = createEslintRule({
+ create: context => {
+ let settings = getSettings(context.settings)
+ let options = complete(context.options.at(0), settings, defaultOptions)
+ validateCustomSortConfig(options)
+ validateGroupsConfig({
+ modifiers: allModifiers,
+ selectors: allSelectors,
+ options,
+ })
+ validateNewlinesAndPartitionConfig(options)
+ let { sourceCode, id } = context
+ let eslintDisabledLines = getEslintDisabledLines({
+ ruleName: id,
+ sourceCode,
+ })
+ let formattedMembers = [[]]
+ function registerNode(node) {
+ if (!node.source) {
+ return
+ }
+ let selector = 'export'
+ let modifiers = [
+ computeExportKindModifier(node),
+ computeExportTypeModifier(node),
+ computeLineCountModifier(node),
+ ]
+ let name = node.source.value
+ let predefinedGroups = generatePredefinedGroups({
+ cache: cachedGroupsByModifiersAndSelectors,
+ selectors: [selector],
+ modifiers,
+ })
+ let group = computeGroup({
+ customGroupMatcher: customGroup =>
+ doesCustomGroupMatch({
+ selectors: [selector],
+ elementName: name,
+ customGroup,
+ modifiers,
+ }),
+ predefinedGroups,
+ options,
+ })
+ let sortingNode = {
+ isEslintDisabled: isNodeEslintDisabled(node, eslintDisabledLines),
+ size: rangeToDiff(node, sourceCode),
+ addSafetySemicolonWhenInline: true,
+ group,
+ name,
+ node,
+ }
+ let lastSortingNode = formattedMembers.at(-1)?.at(-1)
+ if (
+ shouldPartition({
+ lastSortingNode,
+ sortingNode,
+ sourceCode,
+ options,
+ })
+ ) {
+ formattedMembers.push([])
+ }
+ formattedMembers.at(-1).push({
+ ...sortingNode,
+ partitionId: formattedMembers.length,
+ })
+ }
+ return {
+ 'Program:exit': () => {
+ sortExportNodes({
+ formattedMembers,
+ context,
+ options,
+ })
+ },
+ ExportNamedDeclaration: registerNode,
+ ExportAllDeclaration: registerNode,
+ }
+ },
+ meta: {
+ schema: {
+ items: {
+ properties: {
+ ...buildCommonJsonSchemas(),
+ ...buildCommonGroupsJsonSchemas({
+ additionalCustomGroupMatchProperties:
+ additionalCustomGroupMatchOptionsJsonSchema,
+ }),
+ partitionByComment: partitionByCommentJsonSchema,
+ partitionByNewLine: partitionByNewlineJsonSchema,
+ },
+ additionalProperties: false,
+ type: 'object',
+ },
+ uniqueItems: true,
+ type: 'array',
+ },
+ messages: {
+ [MISSED_COMMENT_ABOVE_ERROR_ID]: MISSED_COMMENT_ABOVE_ERROR,
+ [MISSED_SPACING_ERROR_ID]: MISSED_SPACING_ERROR,
+ [EXTRA_SPACING_ERROR_ID]: EXTRA_SPACING_ERROR,
+ [GROUP_ORDER_ERROR_ID]: GROUP_ORDER_ERROR,
+ [ORDER_ERROR_ID]: ORDER_ERROR,
+ },
+ docs: {
+ url: 'https://perfectionist.dev/rules/sort-exports',
+ description: 'Enforce sorted exports.',
+ recommended: true,
+ },
+ type: 'suggestion',
+ fixable: 'code',
+ },
+ defaultOptions: [defaultOptions],
+ name: 'sort-exports',
+})
+function sortExportNodes({ formattedMembers, context, options }) {
+ let optionsByGroupIndexComputer = buildOptionsByGroupIndexComputer(options)
+ let nodes = formattedMembers.flat()
+ reportAllErrors({
+ availableMessageIds: {
+ missedSpacingBetweenMembers: MISSED_SPACING_ERROR_ID,
+ extraSpacingBetweenMembers: EXTRA_SPACING_ERROR_ID,
+ missedCommentAbove: MISSED_COMMENT_ABOVE_ERROR_ID,
+ unexpectedGroupOrder: GROUP_ORDER_ERROR_ID,
+ unexpectedOrder: ORDER_ERROR_ID,
+ },
+ sortNodesExcludingEslintDisabled,
+ options,
+ context,
+ nodes,
+ })
+ function sortNodesExcludingEslintDisabled(ignoreEslintDisabledNodes) {
+ return formattedMembers.flatMap(groupedNodes =>
+ sortNodesByGroups({
+ comparatorByOptionsComputer: defaultComparatorByOptionsComputer,
+ optionsByGroupIndexComputer,
+ ignoreEslintDisabledNodes,
+ groups: options.groups,
+ nodes: groupedNodes,
+ }),
+ )
+ }
+}
+function computeExportKindModifier(node) {
+ let exportKind = 'exportKind' in node ? node.exportKind : void 0
+ switch (exportKind) {
+ case void 0:
+ case 'value':
+ return 'value'
+ case 'type':
+ return 'type'
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(exportKind)
+ }
+}
+function computeExportTypeModifier(node) {
+ switch (node.type) {
+ case AST_NODE_TYPES.ExportNamedDeclaration:
+ return 'named'
+ case AST_NODE_TYPES.ExportAllDeclaration:
+ return 'wildcard'
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(node)
+ }
+}
+function computeLineCountModifier(node) {
+ if (isNodeOnSingleLine(node)) {
+ return 'singleline'
+ }
+ return 'multiline'
+}
+export { sort_exports_default as default }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-exports/types.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-exports/types.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..71e93d3b562f085d32f79a618d35b2658e501e37
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-exports/types.d.ts
@@ -0,0 +1,76 @@
+import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'
+import { AllCommonOptions } from '../../types/all-common-options.js'
+import { TypeOption } from '../../types/common-options.js'
+/**
+ * Configuration options for the sort-exports rule.
+ *
+ * This rule enforces consistent ordering of re-export statements (`export ...
+ * From '...'`) to improve code organization and maintainability.
+ */
+export type Options = Partial<
+ AllCommonOptions
+>[]
+/**
+ * Union type of available export modifiers. Distinguishes between value exports
+ * and type-only exports.
+ */
+export type Modifier = (typeof allModifiers)[number]
+/**
+ * Type of selector for export statements. Currently represents re-export
+ * statements.
+ */
+export type Selector = (typeof allSelectors)[number]
+/**
+ * Additional configuration for a single custom group.
+ *
+ * Custom groups allow fine-grained control over how export statements are
+ * grouped and sorted based on their module names, selectors, and modifiers.
+ *
+ * @example
+ *
+ * ```ts
+ * {
+ * "modifiers": ["type"],
+ * "selector": "export"
+ * }
+ * ```
+ */
+interface CustomGroupMatchOptions {
+ /**
+ * List of modifiers that exports must have to be included in this group.
+ * Can include 'value' for value exports or 'type' for type exports.
+ */
+ modifiers?: Modifier[]
+ /**
+ * The selector type for this group. Currently only 'export' is supported
+ * for re-export statements.
+ */
+ selector?: Selector
+}
+type AdditionalSortOptions = object
+/**
+ * Complete list of available export selectors. Used for validation and JSON
+ * schema generation.
+ */
+export declare let allSelectors: readonly ['export']
+/**
+ * Complete list of available export modifiers. Used for validation and JSON
+ * schema generation.
+ */
+export declare let allModifiers: readonly [
+ 'value',
+ 'type',
+ 'named',
+ 'wildcard',
+ 'multiline',
+ 'singleline',
+]
+/**
+ * Additional custom group match options JSON schema. Used by ESLint to validate
+ * rule options at configuration time.
+ */
+export declare let additionalCustomGroupMatchOptionsJsonSchema: Record<
+ string,
+ JSONSchema4
+>
+export {}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-exports/types.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-exports/types.js
new file mode 100644
index 0000000000000000000000000000000000000000..6ad0517c390426fd6688415db531e089539ce3a5
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-exports/types.js
@@ -0,0 +1,34 @@
+import {
+ buildCustomGroupModifiersJsonSchema,
+ buildCustomGroupSelectorJsonSchema,
+} from '../../utils/json-schemas/common-groups-json-schemas.js'
+/**
+ * Complete list of available export selectors. Used for validation and JSON
+ * schema generation.
+ */
+var allSelectors = ['export']
+/**
+ * Complete list of available export modifiers. Used for validation and JSON
+ * schema generation.
+ */
+var allModifiers = [
+ 'value',
+ 'type',
+ 'named',
+ 'wildcard',
+ 'multiline',
+ 'singleline',
+]
+/**
+ * Additional custom group match options JSON schema. Used by ESLint to validate
+ * rule options at configuration time.
+ */
+var additionalCustomGroupMatchOptionsJsonSchema = {
+ modifiers: buildCustomGroupModifiersJsonSchema(allModifiers),
+ selector: buildCustomGroupSelectorJsonSchema(allSelectors),
+}
+export {
+ additionalCustomGroupMatchOptionsJsonSchema,
+ allModifiers,
+ allSelectors,
+}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-heritage-clauses.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-heritage-clauses.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..14d472e945cdcae201a09e71eeaa5513396847b6
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-heritage-clauses.d.ts
@@ -0,0 +1,12 @@
+import { MessageId, Options } from './sort-heritage-clauses/types.js'
+declare const _default: import('@typescript-eslint/utils/ts-eslint').RuleModule<
+ MessageId,
+ Options,
+ {
+ recommended?: boolean
+ },
+ import('@typescript-eslint/utils/ts-eslint').RuleListener
+> & {
+ name: string
+}
+export default _default
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-heritage-clauses.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-heritage-clauses.js
new file mode 100644
index 0000000000000000000000000000000000000000..255ac05bdedc989a8986d538df7ca83db960a540
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-heritage-clauses.js
@@ -0,0 +1,77 @@
+import {
+ buildCommonJsonSchemas,
+ buildUseConfigIfJsonSchema,
+ matchesAstSelectorJsonSchema,
+} from '../utils/json-schemas/common-json-schemas.js'
+import { buildCommonGroupsJsonSchemas } from '../utils/json-schemas/common-groups-json-schemas.js'
+import {
+ EXTRA_SPACING_ERROR,
+ GROUP_ORDER_ERROR,
+ MISSED_SPACING_ERROR,
+ ORDER_ERROR,
+} from '../utils/report-errors.js'
+import {
+ partitionByCommentJsonSchema,
+ partitionByNewlineJsonSchema,
+} from '../utils/json-schemas/common-partition-json-schemas.js'
+import { buildAstListeners } from '../utils/build-ast-listeners.js'
+import { createEslintRule } from '../utils/create-eslint-rule.js'
+import {
+ EXTRA_SPACING_ERROR_ID,
+ GROUP_ORDER_ERROR_ID,
+ MISSED_SPACING_ERROR_ID,
+ ORDER_ERROR_ID,
+} from './sort-heritage-clauses/types.js'
+import {
+ defaultOptions,
+ sortHeritageClause,
+} from './sort-heritage-clauses/sort-heritage-clause.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+var sort_heritage_clauses_default = createEslintRule({
+ meta: {
+ schema: {
+ items: {
+ properties: {
+ ...buildCommonJsonSchemas(),
+ ...buildCommonGroupsJsonSchemas(),
+ useConfigurationIf: buildUseConfigIfJsonSchema({
+ additionalProperties: {
+ matchesAstSelector: matchesAstSelectorJsonSchema,
+ },
+ }),
+ partitionByNewLine: partitionByNewlineJsonSchema,
+ partitionByComment: partitionByCommentJsonSchema,
+ },
+ additionalProperties: false,
+ type: 'object',
+ },
+ uniqueItems: true,
+ type: 'array',
+ },
+ messages: {
+ [MISSED_SPACING_ERROR_ID]: MISSED_SPACING_ERROR,
+ [EXTRA_SPACING_ERROR_ID]: EXTRA_SPACING_ERROR,
+ [GROUP_ORDER_ERROR_ID]: GROUP_ORDER_ERROR,
+ [ORDER_ERROR_ID]: ORDER_ERROR,
+ },
+ docs: {
+ url: 'https://perfectionist.dev/rules/sort-heritage-clauses',
+ description: 'Enforce sorted heritage clauses.',
+ recommended: true,
+ },
+ type: 'suggestion',
+ fixable: 'code',
+ },
+ create: context =>
+ buildAstListeners({
+ nodeTypes: [
+ AST_NODE_TYPES.TSInterfaceDeclaration,
+ AST_NODE_TYPES.ClassDeclaration,
+ ],
+ sorter: sortHeritageClause,
+ context,
+ }),
+ defaultOptions: [defaultOptions],
+ name: 'sort-heritage-clauses',
+})
+export { sort_heritage_clauses_default as default }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-heritage-clauses/compute-matched-context-options.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-heritage-clauses/compute-matched-context-options.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..acdaf8e0feadf8ebb238e582c02a58f1e86fc479
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-heritage-clauses/compute-matched-context-options.d.ts
@@ -0,0 +1,22 @@
+import { RuleContext } from '@typescript-eslint/utils/ts-eslint'
+import { TSESTree } from '@typescript-eslint/types'
+import { MessageId, Options } from './types.js'
+/**
+ * Computes the matched context options for a given heritage clause parent node.
+ *
+ * @param params - Parameters.
+ * @param params.heritageClauses - The heritage clauses of the parent node.
+ * @param params.matchedAstSelectors - The matched AST selectors for an object
+ * node.
+ * @param params.context - The rule context.
+ * @returns The matched context options or undefined if none match.
+ */
+export declare function computeMatchedContextOptions({
+ matchedAstSelectors,
+ heritageClauses,
+ context,
+}: {
+ heritageClauses: TSESTree.TSInterfaceHeritage[] | TSESTree.TSClassImplements[]
+ context: Readonly>
+ matchedAstSelectors: ReadonlySet
+}): Options[number] | undefined
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-heritage-clauses/compute-matched-context-options.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-heritage-clauses/compute-matched-context-options.js
new file mode 100644
index 0000000000000000000000000000000000000000..7441bf2b3c4d29f36252ae39a218cebfc65c1ac9
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-heritage-clauses/compute-matched-context-options.js
@@ -0,0 +1,45 @@
+import { passesAllNamesMatchPatternFilter } from '../../utils/context-matching/passes-all-names-match-pattern-filter.js'
+import { passesAstSelectorFilter } from '../../utils/context-matching/passes-ast-selector-filter.js'
+import { computeNodeName } from './compute-node-name.js'
+/**
+ * Computes the matched context options for a given heritage clause parent node.
+ *
+ * @param params - Parameters.
+ * @param params.heritageClauses - The heritage clauses of the parent node.
+ * @param params.matchedAstSelectors - The matched AST selectors for an object
+ * node.
+ * @param params.context - The rule context.
+ * @returns The matched context options or undefined if none match.
+ */
+function computeMatchedContextOptions({
+ matchedAstSelectors,
+ heritageClauses,
+ context,
+}) {
+ let nodeNames = heritageClauses.map(clause =>
+ computeNodeName(clause.expression),
+ )
+ return context.options.find(options =>
+ isContextOptionMatching({
+ matchedAstSelectors,
+ nodeNames,
+ options,
+ }),
+ )
+}
+function isContextOptionMatching({ matchedAstSelectors, nodeNames, options }) {
+ if (!options.useConfigurationIf) {
+ return true
+ }
+ return (
+ passesAllNamesMatchPatternFilter({
+ allNamesMatchPattern: options.useConfigurationIf.allNamesMatchPattern,
+ nodeNames,
+ }) &&
+ passesAstSelectorFilter({
+ matchesAstSelector: options.useConfigurationIf.matchesAstSelector,
+ matchedAstSelectors,
+ })
+ )
+}
+export { computeMatchedContextOptions }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-heritage-clauses/compute-node-name.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-heritage-clauses/compute-node-name.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..bd3a5d2ddf38bb7840a3f741f7e80357b7f9eb7b
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-heritage-clauses/compute-node-name.d.ts
@@ -0,0 +1,13 @@
+import { TSESTree } from '@typescript-eslint/types'
+/**
+ * Extracts the name from a heritage clause expression.
+ *
+ * For simple identifiers, returns the name directly. For member expressions
+ * (like `Namespace.Class`), extracts the innermost property name.
+ *
+ * @param expression - The heritage clause expression AST node.
+ * @returns The extracted name string from the expression.
+ */
+export declare function computeNodeName(
+ expression: TSESTree.PrivateIdentifier | TSESTree.Expression,
+): string
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-heritage-clauses/compute-node-name.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-heritage-clauses/compute-node-name.js
new file mode 100644
index 0000000000000000000000000000000000000000..d67bd3abe350daa2accf3f8a909dce1e5ed1b3d2
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-heritage-clauses/compute-node-name.js
@@ -0,0 +1,25 @@
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Extracts the name from a heritage clause expression.
+ *
+ * For simple identifiers, returns the name directly. For member expressions
+ * (like `Namespace.Class`), extracts the innermost property name.
+ *
+ * @param expression - The heritage clause expression AST node.
+ * @returns The extracted name string from the expression.
+ */
+function computeNodeName(expression) {
+ let currentExpression = expression
+ while ('property' in currentExpression) {
+ currentExpression = currentExpression.property
+ }
+ /* v8 ignore else -- @preserve Exhaustive guard for unsupported expressions. */
+ if (currentExpression.type === AST_NODE_TYPES.Identifier) {
+ return currentExpression.name
+ }
+ /* v8 ignore next -- @preserve Should never throw. */
+ throw new Error(
+ 'Unexpected heritage clause expression. Please report this issue here: https://github.com/azat-io/eslint-plugin-perfectionist/issues',
+ )
+}
+export { computeNodeName }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-heritage-clauses/sort-heritage-clause.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-heritage-clauses/sort-heritage-clause.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..16a21e48b002e9539e4e020b7da1fb869378f84e
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-heritage-clauses/sort-heritage-clause.d.ts
@@ -0,0 +1,13 @@
+import { TSESLint } from '@typescript-eslint/utils'
+import { TSESTree } from '@typescript-eslint/types'
+import { MessageId, Options } from './types.js'
+export declare let defaultOptions: Required
+export declare function sortHeritageClause({
+ matchedAstSelectors,
+ context,
+ node,
+}: {
+ node: TSESTree.TSInterfaceDeclaration | TSESTree.ClassDeclaration
+ context: TSESLint.RuleContext
+ matchedAstSelectors: ReadonlySet
+}): void
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-heritage-clauses/sort-heritage-clause.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-heritage-clauses/sort-heritage-clause.js
new file mode 100644
index 0000000000000000000000000000000000000000..137849c1ba86283be404029fe4e857cd3a73542d
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-heritage-clauses/sort-heritage-clause.js
@@ -0,0 +1,135 @@
+import { defaultComparatorByOptionsComputer } from '../../utils/compare/default-comparator-by-options-computer.js'
+import { validateNewlinesAndPartitionConfig } from '../../utils/validate-newlines-and-partition-config.js'
+import { buildOptionsByGroupIndexComputer } from '../../utils/build-options-by-group-index-computer.js'
+import { validateCustomSortConfig } from '../../utils/validate-custom-sort-config.js'
+import { getEslintDisabledLines } from '../../utils/get-eslint-disabled-lines.js'
+import { doesCustomGroupMatch } from '../../utils/does-custom-group-match.js'
+import { isNodeEslintDisabled } from '../../utils/is-node-eslint-disabled.js'
+import { validateGroupsConfig } from '../../utils/validate-groups-config.js'
+import { sortNodesByGroups } from '../../utils/sort-nodes-by-groups.js'
+import { reportAllErrors } from '../../utils/report-all-errors.js'
+import { shouldPartition } from '../../utils/should-partition.js'
+import { computeGroup } from '../../utils/compute-group.js'
+import { rangeToDiff } from '../../utils/range-to-diff.js'
+import { getSettings } from '../../utils/get-settings.js'
+import { isSortable } from '../../utils/is-sortable.js'
+import { complete } from '../../utils/complete.js'
+import {
+ EXTRA_SPACING_ERROR_ID,
+ GROUP_ORDER_ERROR_ID,
+ MISSED_SPACING_ERROR_ID,
+ ORDER_ERROR_ID,
+} from './types.js'
+import { computeNodeName } from './compute-node-name.js'
+import { computeMatchedContextOptions } from './compute-matched-context-options.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+var defaultOptions = {
+ fallbackSort: { type: 'unsorted' },
+ newlinesInside: 'newlinesBetween',
+ specialCharacters: 'keep',
+ newlinesBetween: 'ignore',
+ partitionByNewLine: false,
+ partitionByComment: false,
+ useConfigurationIf: {},
+ type: 'alphabetical',
+ ignoreCase: true,
+ customGroups: [],
+ locales: 'en-US',
+ alphabet: '',
+ order: 'asc',
+ groups: [],
+}
+function sortHeritageClause({ matchedAstSelectors, context, node }) {
+ let heritageClauses =
+ node.type === AST_NODE_TYPES.TSInterfaceDeclaration ?
+ node.extends
+ : node.implements
+ if (!isSortable(heritageClauses)) {
+ return
+ }
+ let settings = getSettings(context.settings)
+ let matchedContextOptions = computeMatchedContextOptions({
+ matchedAstSelectors,
+ heritageClauses,
+ context,
+ })
+ let options = complete(matchedContextOptions, settings, defaultOptions)
+ validateCustomSortConfig(options)
+ validateGroupsConfig({
+ modifiers: [],
+ selectors: [],
+ options,
+ })
+ validateNewlinesAndPartitionConfig(options)
+ let { sourceCode, id } = context
+ let eslintDisabledLines = getEslintDisabledLines({
+ ruleName: id,
+ sourceCode,
+ })
+ let optionsByGroupIndexComputer = buildOptionsByGroupIndexComputer(options)
+ let formattedMembers = [[]]
+ for (let heritageClause of heritageClauses) {
+ let name = computeNodeName(heritageClause.expression)
+ let group = computeGroup({
+ customGroupMatcher: customGroup =>
+ doesCustomGroupMatch({
+ elementName: name,
+ selectors: [],
+ modifiers: [],
+ customGroup,
+ }),
+ predefinedGroups: [],
+ options,
+ })
+ let sortingNode = {
+ isEslintDisabled: isNodeEslintDisabled(
+ heritageClause,
+ eslintDisabledLines,
+ ),
+ size: rangeToDiff(heritageClause, sourceCode),
+ node: heritageClause,
+ partitionId: 0,
+ group,
+ name,
+ }
+ let lastSortingNode = formattedMembers.at(-1)?.at(-1)
+ if (
+ shouldPartition({
+ lastSortingNode,
+ sortingNode,
+ sourceCode,
+ options,
+ })
+ ) {
+ formattedMembers.push([])
+ }
+ formattedMembers.at(-1).push(sortingNode)
+ }
+ for (let nodes of formattedMembers) {
+ function createSortNodesExcludingEslintDisabled(sortingNodes) {
+ return function (ignoreEslintDisabledNodes) {
+ return sortNodesByGroups({
+ comparatorByOptionsComputer: defaultComparatorByOptionsComputer,
+ optionsByGroupIndexComputer,
+ ignoreEslintDisabledNodes,
+ groups: options.groups,
+ nodes: sortingNodes,
+ })
+ }
+ }
+ reportAllErrors({
+ availableMessageIds: {
+ missedSpacingBetweenMembers: MISSED_SPACING_ERROR_ID,
+ extraSpacingBetweenMembers: EXTRA_SPACING_ERROR_ID,
+ unexpectedGroupOrder: GROUP_ORDER_ERROR_ID,
+ unexpectedOrder: ORDER_ERROR_ID,
+ },
+ sortNodesExcludingEslintDisabled:
+ createSortNodesExcludingEslintDisabled(nodes),
+ options,
+ context,
+ nodes,
+ })
+ }
+}
+export { defaultOptions, sortHeritageClause }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-heritage-clauses/types.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-heritage-clauses/types.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..dc4bac52f60cf90d0ec7ca66e49f415a1f08a07f
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-heritage-clauses/types.d.ts
@@ -0,0 +1,43 @@
+import { RegexOption, TypeOption } from '../../types/common-options.js'
+import { AllCommonOptions } from '../../types/all-common-options.js'
+export type MessageId =
+ | typeof MISSED_SPACING_ERROR_ID
+ | typeof EXTRA_SPACING_ERROR_ID
+ | typeof GROUP_ORDER_ERROR_ID
+ | typeof ORDER_ERROR_ID
+export declare const ORDER_ERROR_ID = 'unexpectedHeritageClausesOrder'
+export declare const GROUP_ORDER_ERROR_ID =
+ 'unexpectedHeritageClausesGroupOrder'
+export declare const EXTRA_SPACING_ERROR_ID =
+ 'extraSpacingBetweenHeritageClauses'
+export declare const MISSED_SPACING_ERROR_ID =
+ 'missedSpacingBetweenHeritageClauses'
+export type Options = Partial<
+ {
+ /**
+ * Conditional configuration based on pattern matching.
+ */
+ useConfigurationIf: {
+ /**
+ * Regular expression pattern to match against all heritage clause
+ * names. The rule is only applied when all names match this pattern.
+ */
+ allNamesMatchPattern?: RegexOption
+ /**
+ * AST selector to match against ClassDeclaration or
+ * TSInterfaceDeclaration nodes.
+ */
+ matchesAstSelector?: string
+ }
+ } & AllCommonOptions<
+ TypeOption,
+ AdditionalSortOptions,
+ CustomGroupMatchOptions
+ >
+>[]
+/**
+ * Match options for a custom group.
+ */
+type CustomGroupMatchOptions = object
+type AdditionalSortOptions = object
+export {}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-heritage-clauses/types.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-heritage-clauses/types.js
new file mode 100644
index 0000000000000000000000000000000000000000..d7e429a0a73a8bcb372b79a02e2420912df442bb
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-heritage-clauses/types.js
@@ -0,0 +1,10 @@
+var ORDER_ERROR_ID = 'unexpectedHeritageClausesOrder'
+var GROUP_ORDER_ERROR_ID = 'unexpectedHeritageClausesGroupOrder'
+var EXTRA_SPACING_ERROR_ID = 'extraSpacingBetweenHeritageClauses'
+var MISSED_SPACING_ERROR_ID = 'missedSpacingBetweenHeritageClauses'
+export {
+ EXTRA_SPACING_ERROR_ID,
+ GROUP_ORDER_ERROR_ID,
+ MISSED_SPACING_ERROR_ID,
+ ORDER_ERROR_ID,
+}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-import-attributes.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-import-attributes.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..ab9300185a833f2d73d8a5872a1725169a351b86
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-import-attributes.d.ts
@@ -0,0 +1,23 @@
+import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'
+import { Options } from './sort-import-attributes/types.js'
+declare const ORDER_ERROR_ID = 'unexpectedImportAttributesOrder'
+declare const GROUP_ORDER_ERROR_ID = 'unexpectedImportAttributesGroupOrder'
+declare const EXTRA_SPACING_ERROR_ID = 'extraSpacingBetweenImportAttributes'
+declare const MISSED_SPACING_ERROR_ID = 'missedSpacingBetweenImportAttributes'
+type MessageId =
+ | typeof MISSED_SPACING_ERROR_ID
+ | typeof EXTRA_SPACING_ERROR_ID
+ | typeof GROUP_ORDER_ERROR_ID
+ | typeof ORDER_ERROR_ID
+export declare let jsonSchema: JSONSchema4
+declare const _default: import('@typescript-eslint/utils/ts-eslint').RuleModule<
+ MessageId,
+ Options,
+ {
+ recommended?: boolean
+ },
+ import('@typescript-eslint/utils/ts-eslint').RuleListener
+> & {
+ name: string
+}
+export default _default
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-import-attributes.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-import-attributes.js
new file mode 100644
index 0000000000000000000000000000000000000000..c6b8959f1fb9507157f7ca905fea5e488c3666e2
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-import-attributes.js
@@ -0,0 +1,100 @@
+import {
+ buildCommonJsonSchemas,
+ buildUseConfigIfJsonSchema,
+ matchesAstSelectorJsonSchema,
+} from '../utils/json-schemas/common-json-schemas.js'
+import { buildCommonGroupsJsonSchemas } from '../utils/json-schemas/common-groups-json-schemas.js'
+import {
+ EXTRA_SPACING_ERROR,
+ GROUP_ORDER_ERROR,
+ MISSED_SPACING_ERROR,
+ ORDER_ERROR,
+} from '../utils/report-errors.js'
+import {
+ partitionByCommentJsonSchema,
+ partitionByNewlineJsonSchema,
+} from '../utils/json-schemas/common-partition-json-schemas.js'
+import { buildAstListeners } from '../utils/build-ast-listeners.js'
+import { createEslintRule } from '../utils/create-eslint-rule.js'
+import { sortImportOrExportAttributes } from './sort-import-attributes/sort-import-or-export-attributes.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+var ORDER_ERROR_ID = 'unexpectedImportAttributesOrder'
+var GROUP_ORDER_ERROR_ID = 'unexpectedImportAttributesGroupOrder'
+var EXTRA_SPACING_ERROR_ID = 'extraSpacingBetweenImportAttributes'
+var MISSED_SPACING_ERROR_ID = 'missedSpacingBetweenImportAttributes'
+var defaultOptions = {
+ fallbackSort: { type: 'unsorted' },
+ newlinesInside: 'newlinesBetween',
+ specialCharacters: 'keep',
+ partitionByComment: false,
+ partitionByNewLine: false,
+ newlinesBetween: 'ignore',
+ useConfigurationIf: {},
+ type: 'alphabetical',
+ ignoreCase: true,
+ customGroups: [],
+ locales: 'en-US',
+ alphabet: '',
+ order: 'asc',
+ groups: [],
+}
+var jsonSchema = {
+ items: {
+ properties: {
+ ...buildCommonJsonSchemas(),
+ ...buildCommonGroupsJsonSchemas(),
+ useConfigurationIf: buildUseConfigIfJsonSchema({
+ additionalProperties: {
+ matchesAstSelector: matchesAstSelectorJsonSchema,
+ },
+ }),
+ partitionByComment: partitionByCommentJsonSchema,
+ partitionByNewLine: partitionByNewlineJsonSchema,
+ },
+ additionalProperties: false,
+ type: 'object',
+ },
+ uniqueItems: true,
+ type: 'array',
+}
+var sort_import_attributes_default = createEslintRule({
+ meta: {
+ messages: {
+ [MISSED_SPACING_ERROR_ID]: MISSED_SPACING_ERROR,
+ [EXTRA_SPACING_ERROR_ID]: EXTRA_SPACING_ERROR,
+ [GROUP_ORDER_ERROR_ID]: GROUP_ORDER_ERROR,
+ [ORDER_ERROR_ID]: ORDER_ERROR,
+ },
+ docs: {
+ url: 'https://perfectionist.dev/rules/sort-import-attributes',
+ description: 'Enforce sorted import attributes.',
+ recommended: true,
+ },
+ schema: jsonSchema,
+ type: 'suggestion',
+ fixable: 'code',
+ },
+ create: context =>
+ buildAstListeners({
+ nodeTypes: [AST_NODE_TYPES.ImportDeclaration],
+ sorter: sortImportAttributes,
+ context,
+ }),
+ defaultOptions: [defaultOptions],
+ name: 'sort-import-attributes',
+})
+function sortImportAttributes({ matchedAstSelectors, context, node }) {
+ sortImportOrExportAttributes({
+ availableMessageIds: {
+ missedSpacingBetweenMembers: MISSED_SPACING_ERROR_ID,
+ extraSpacingBetweenMembers: EXTRA_SPACING_ERROR_ID,
+ unexpectedGroupOrder: GROUP_ORDER_ERROR_ID,
+ unexpectedOrder: ORDER_ERROR_ID,
+ },
+ matchedAstSelectors,
+ defaultOptions,
+ context,
+ node,
+ })
+}
+export { sort_import_attributes_default as default, jsonSchema }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-import-attributes/compute-matched-context-options.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-import-attributes/compute-matched-context-options.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..74405e8b412ff9489e6502615412a4f4b7c6fc35
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-import-attributes/compute-matched-context-options.d.ts
@@ -0,0 +1,26 @@
+import { RuleContext } from '@typescript-eslint/utils/ts-eslint'
+import { TSESTree } from '@typescript-eslint/types'
+import { Options } from './types.js'
+/**
+ * Computes the matched context options for a given import/export attributes
+ * node.
+ *
+ * @param params - Parameters.
+ * @param params.matchedAstSelectors - The matched AST selectors for an
+ * import/export declaration node.
+ * @param params.attributes - The import attributes to compute the context
+ * options for.
+ * @param params.context - The rule context.
+ * @returns The matched context options or undefined if none match.
+ */
+export declare function computeMatchedContextOptions<
+ MessageIds extends string,
+>({
+ matchedAstSelectors,
+ attributes,
+ context,
+}: {
+ context: Readonly>
+ matchedAstSelectors: ReadonlySet
+ attributes: TSESTree.ImportAttribute[]
+}): Options[number] | undefined
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-import-attributes/compute-matched-context-options.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-import-attributes/compute-matched-context-options.js
new file mode 100644
index 0000000000000000000000000000000000000000..d3de27ef997d6cd189022fb4db158102ade00103
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-import-attributes/compute-matched-context-options.js
@@ -0,0 +1,47 @@
+import { passesAllNamesMatchPatternFilter } from '../../utils/context-matching/passes-all-names-match-pattern-filter.js'
+import { passesAstSelectorFilter } from '../../utils/context-matching/passes-ast-selector-filter.js'
+import { computeNodeName } from './compute-node-name.js'
+/**
+ * Computes the matched context options for a given import/export attributes
+ * node.
+ *
+ * @param params - Parameters.
+ * @param params.matchedAstSelectors - The matched AST selectors for an
+ * import/export declaration node.
+ * @param params.attributes - The import attributes to compute the context
+ * options for.
+ * @param params.context - The rule context.
+ * @returns The matched context options or undefined if none match.
+ */
+function computeMatchedContextOptions({
+ matchedAstSelectors,
+ attributes,
+ context,
+}) {
+ let nodeNames = attributes.map(attribute =>
+ computeNodeName(attribute, context.sourceCode),
+ )
+ return context.options.find(options =>
+ isContextOptionMatching({
+ matchedAstSelectors,
+ nodeNames,
+ options,
+ }),
+ )
+}
+function isContextOptionMatching({ matchedAstSelectors, nodeNames, options }) {
+ if (!options.useConfigurationIf) {
+ return true
+ }
+ return (
+ passesAllNamesMatchPatternFilter({
+ allNamesMatchPattern: options.useConfigurationIf.allNamesMatchPattern,
+ nodeNames,
+ }) &&
+ passesAstSelectorFilter({
+ matchesAstSelector: options.useConfigurationIf.matchesAstSelector,
+ matchedAstSelectors,
+ })
+ )
+}
+export { computeMatchedContextOptions }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-import-attributes/compute-node-name.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-import-attributes/compute-node-name.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..c6a2c58006c80788bab8be3f02872f3d1ac272a0
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-import-attributes/compute-node-name.d.ts
@@ -0,0 +1,16 @@
+import { TSESLint } from '@typescript-eslint/utils'
+import { TSESTree } from '@typescript-eslint/types'
+/**
+ * Extracts the name of an import attribute for sorting purposes.
+ *
+ * For identifier keys, returns the identifier name. For literal keys, returns
+ * the string value. Falls back to source code text if needed.
+ *
+ * @param attribute - The import attribute AST node.
+ * @param sourceCode - The ESLint source code object.
+ * @returns The attribute name to use for sorting.
+ */
+export declare function computeNodeName(
+ attribute: TSESTree.ImportAttribute,
+ sourceCode: TSESLint.SourceCode,
+): string
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-import-attributes/compute-node-name.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-import-attributes/compute-node-name.js
new file mode 100644
index 0000000000000000000000000000000000000000..9c8a989e4005378ebd815f12f4f567add29c7d88
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-import-attributes/compute-node-name.js
@@ -0,0 +1,25 @@
+import { UnreachableCaseError } from '../../utils/unreachable-case-error.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Extracts the name of an import attribute for sorting purposes.
+ *
+ * For identifier keys, returns the identifier name. For literal keys, returns
+ * the string value. Falls back to source code text if needed.
+ *
+ * @param attribute - The import attribute AST node.
+ * @param sourceCode - The ESLint source code object.
+ * @returns The attribute name to use for sorting.
+ */
+function computeNodeName(attribute, sourceCode) {
+ let { key } = attribute
+ switch (key.type) {
+ case AST_NODE_TYPES.Identifier:
+ return key.name
+ case AST_NODE_TYPES.Literal:
+ return key.value?.toString() ?? sourceCode.getText(attribute)
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(key)
+ }
+}
+export { computeNodeName }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-import-attributes/sort-import-or-export-attributes.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-import-attributes/sort-import-or-export-attributes.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..dd48f205cfc299dc7cfc5eee61cf7a9cb26e8625
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-import-attributes/sort-import-or-export-attributes.d.ts
@@ -0,0 +1,23 @@
+import { TSESTree } from '@typescript-eslint/types'
+import { TSESLint } from '@typescript-eslint/utils'
+import { Options } from './types.js'
+export declare function sortImportOrExportAttributes<
+ MessageIds extends string,
+>({
+ matchedAstSelectors,
+ availableMessageIds,
+ defaultOptions,
+ context,
+ node,
+}: {
+ availableMessageIds: {
+ missedSpacingBetweenMembers: MessageIds
+ extraSpacingBetweenMembers: MessageIds
+ unexpectedGroupOrder: MessageIds
+ unexpectedOrder: MessageIds
+ }
+ node: TSESTree.ExportNamedDeclaration | TSESTree.ImportDeclaration
+ context: TSESLint.RuleContext
+ defaultOptions: Required
+ matchedAstSelectors: ReadonlySet
+}): void
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-import-attributes/sort-import-or-export-attributes.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-import-attributes/sort-import-or-export-attributes.js
new file mode 100644
index 0000000000000000000000000000000000000000..7ddf21448578bc5e3dcb254bdd3dc76dfe21f7a5
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-import-attributes/sort-import-or-export-attributes.js
@@ -0,0 +1,109 @@
+import { defaultComparatorByOptionsComputer } from '../../utils/compare/default-comparator-by-options-computer.js'
+import { validateNewlinesAndPartitionConfig } from '../../utils/validate-newlines-and-partition-config.js'
+import { buildOptionsByGroupIndexComputer } from '../../utils/build-options-by-group-index-computer.js'
+import { validateCustomSortConfig } from '../../utils/validate-custom-sort-config.js'
+import { getEslintDisabledLines } from '../../utils/get-eslint-disabled-lines.js'
+import { doesCustomGroupMatch } from '../../utils/does-custom-group-match.js'
+import { isNodeEslintDisabled } from '../../utils/is-node-eslint-disabled.js'
+import { validateGroupsConfig } from '../../utils/validate-groups-config.js'
+import { sortNodesByGroups } from '../../utils/sort-nodes-by-groups.js'
+import { reportAllErrors } from '../../utils/report-all-errors.js'
+import { shouldPartition } from '../../utils/should-partition.js'
+import { computeGroup } from '../../utils/compute-group.js'
+import { rangeToDiff } from '../../utils/range-to-diff.js'
+import { getSettings } from '../../utils/get-settings.js'
+import { isSortable } from '../../utils/is-sortable.js'
+import { complete } from '../../utils/complete.js'
+import { computeNodeName } from './compute-node-name.js'
+import { computeMatchedContextOptions } from './compute-matched-context-options.js'
+function sortImportOrExportAttributes({
+ matchedAstSelectors,
+ availableMessageIds,
+ defaultOptions,
+ context,
+ node,
+}) {
+ let attributes = node.attributes
+ if (!isSortable(attributes)) {
+ return
+ }
+ let { sourceCode, id } = context
+ let settings = getSettings(context.settings)
+ let matchedContextOptions = computeMatchedContextOptions({
+ matchedAstSelectors,
+ attributes,
+ context,
+ })
+ let options = complete(matchedContextOptions, settings, defaultOptions)
+ validateCustomSortConfig(options)
+ validateGroupsConfig({
+ selectors: [],
+ modifiers: [],
+ options,
+ })
+ validateNewlinesAndPartitionConfig(options)
+ let eslintDisabledLines = getEslintDisabledLines({
+ ruleName: id,
+ sourceCode,
+ })
+ let optionsByGroupIndexComputer = buildOptionsByGroupIndexComputer(options)
+ let formattedMembers = [[]]
+ for (let attribute of attributes) {
+ let name = computeNodeName(attribute, sourceCode)
+ let group = computeGroup({
+ customGroupMatcher: customGroup =>
+ doesCustomGroupMatch({
+ elementName: name,
+ selectors: [],
+ modifiers: [],
+ customGroup,
+ }),
+ predefinedGroups: [],
+ options,
+ })
+ let sortingNode = {
+ isEslintDisabled: isNodeEslintDisabled(attribute, eslintDisabledLines),
+ size: rangeToDiff(attribute, sourceCode),
+ node: attribute,
+ group,
+ name,
+ }
+ let lastSortingNode = formattedMembers.at(-1)?.at(-1)
+ if (
+ shouldPartition({
+ lastSortingNode,
+ sortingNode,
+ sourceCode,
+ options,
+ })
+ ) {
+ formattedMembers.push([])
+ }
+ formattedMembers.at(-1).push({
+ ...sortingNode,
+ partitionId: formattedMembers.length,
+ })
+ }
+ for (let nodes of formattedMembers) {
+ function createSortNodesExcludingEslintDisabled(sortingNodes) {
+ return function (ignoreEslintDisabledNodes) {
+ return sortNodesByGroups({
+ comparatorByOptionsComputer: defaultComparatorByOptionsComputer,
+ optionsByGroupIndexComputer,
+ ignoreEslintDisabledNodes,
+ groups: options.groups,
+ nodes: sortingNodes,
+ })
+ }
+ }
+ reportAllErrors({
+ sortNodesExcludingEslintDisabled:
+ createSortNodesExcludingEslintDisabled(nodes),
+ availableMessageIds,
+ options,
+ context,
+ nodes,
+ })
+ }
+}
+export { sortImportOrExportAttributes }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-import-attributes/types.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-import-attributes/types.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..23cb9d0b58e9ac9505a503c56c26a91026fc78a7
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-import-attributes/types.d.ts
@@ -0,0 +1,35 @@
+import { TSESTree } from '@typescript-eslint/types'
+import { RegexOption, TypeOption } from '../../types/common-options.js'
+import { AllCommonOptions } from '../../types/all-common-options.js'
+import { SortingNode } from '../../types/sorting-node.js'
+export type Options = Partial<
+ {
+ /**
+ * Conditional configuration based on pattern matching.
+ */
+ useConfigurationIf: {
+ /**
+ * Regular expression pattern to match against all attribute key names.
+ * The rule is only applied when all names match this pattern.
+ */
+ allNamesMatchPattern?: RegexOption
+ /**
+ * AST selector to match against ImportDeclaration or
+ * ExportNamedDeclaration nodes.
+ */
+ matchesAstSelector?: string
+ }
+ } & AllCommonOptions<
+ TypeOption,
+ AdditionalSortOptions,
+ CustomGroupMatchOptions
+ >
+>[]
+export type SortImportAttributesSortingNode =
+ SortingNode
+/**
+ * Match options for a custom group.
+ */
+type CustomGroupMatchOptions = object
+type AdditionalSortOptions = object
+export {}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..a56387515c322d5d8b34e7fabc3ae3b94a0633ae
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports.d.ts
@@ -0,0 +1,26 @@
+import { TSESLint } from '@typescript-eslint/utils'
+import { Options } from './sort-imports/types.js'
+declare const ORDER_ERROR_ID = 'unexpectedImportsOrder'
+declare const GROUP_ORDER_ERROR_ID = 'unexpectedImportsGroupOrder'
+declare const EXTRA_SPACING_ERROR_ID = 'extraSpacingBetweenImports'
+declare const MISSED_SPACING_ERROR_ID = 'missedSpacingBetweenImports'
+declare const MISSED_COMMENT_ABOVE_ERROR_ID = 'missedCommentAboveImport'
+declare const DEPENDENCY_ORDER_ERROR_ID = 'unexpectedImportsDependencyOrder'
+export type MessageId =
+ | typeof MISSED_COMMENT_ABOVE_ERROR_ID
+ | typeof DEPENDENCY_ORDER_ERROR_ID
+ | typeof MISSED_SPACING_ERROR_ID
+ | typeof EXTRA_SPACING_ERROR_ID
+ | typeof GROUP_ORDER_ERROR_ID
+ | typeof ORDER_ERROR_ID
+declare const _default: TSESLint.RuleModule<
+ MessageId,
+ Options,
+ {
+ recommended?: boolean
+ },
+ TSESLint.RuleListener
+> & {
+ name: string
+}
+export default _default
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports.js
new file mode 100644
index 0000000000000000000000000000000000000000..1b827e2f8876a0be9eb901edcecabd59216c592a
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports.js
@@ -0,0 +1,460 @@
+import {
+ buildCommonJsonSchemas,
+ buildRegexJsonSchema,
+ useExperimentalDependencyDetectionJsonSchema,
+} from '../utils/json-schemas/common-json-schemas.js'
+import { buildCommonGroupsJsonSchemas } from '../utils/json-schemas/common-groups-json-schemas.js'
+import {
+ DEPENDENCY_ORDER_ERROR,
+ EXTRA_SPACING_ERROR,
+ GROUP_ORDER_ERROR,
+ MISSED_COMMENT_ABOVE_ERROR,
+ MISSED_SPACING_ERROR,
+ ORDER_ERROR,
+} from '../utils/report-errors.js'
+import {
+ partitionByCommentJsonSchema,
+ partitionByNewlineJsonSchema,
+} from '../utils/json-schemas/common-partition-json-schemas.js'
+import { computeDependenciesBySortingNode } from '../utils/compute-dependencies-by-sorting-node.js'
+import { populateSortingNodeGroupsWithDependencies } from '../utils/populate-sorting-node-groups-with-dependencies.js'
+import { validateNewlinesAndPartitionConfig } from '../utils/validate-newlines-and-partition-config.js'
+import { buildOptionsByGroupIndexComputer } from '../utils/build-options-by-group-index-computer.js'
+import { validateCustomSortConfig } from '../utils/validate-custom-sort-config.js'
+import { generatePredefinedGroups } from '../utils/generate-predefined-groups.js'
+import { sortNodesByDependencies } from '../utils/sort-nodes-by-dependencies.js'
+import { getEslintDisabledLines } from '../utils/get-eslint-disabled-lines.js'
+import { doesCustomGroupMatch } from '../utils/does-custom-group-match.js'
+import { isNodeEslintDisabled } from '../utils/is-node-eslint-disabled.js'
+import { validateGroupsConfig } from '../utils/validate-groups-config.js'
+import { sortNodesByGroups } from '../utils/sort-nodes-by-groups.js'
+import { reportAllErrors } from '../utils/report-all-errors.js'
+import { shouldPartition } from '../utils/should-partition.js'
+import { computeGroup } from '../utils/compute-group.js'
+import { rangeToDiff } from '../utils/range-to-diff.js'
+import { getSettings } from '../utils/get-settings.js'
+import { isSortable } from '../utils/is-sortable.js'
+import { complete } from '../utils/complete.js'
+import { createEslintRule } from '../utils/create-eslint-rule.js'
+import { isNodeOnSingleLine } from '../utils/is-node-on-single-line.js'
+import {
+ TYPE_IMPORT_FIRST_TYPE_OPTION,
+ additionalCustomGroupMatchOptionsJsonSchema,
+ additionalSortOptionsJsonSchema,
+ allModifiers,
+ allSelectors,
+} from './sort-imports/types.js'
+import { isNonExternalReferenceTsImportEquals } from './sort-imports/is-non-external-reference-ts-import-equals.js'
+import { comparatorByOptionsComputer } from './sort-imports/comparator-by-options-computer.js'
+import { readClosestTsConfigByPath } from './sort-imports/read-closest-ts-config-by-path.js'
+import { isSideEffectOnlyGroup } from './sort-imports/is-side-effect-only-group.js'
+import { validateSideEffectsConfig } from './sort-imports/validate-side-effects-config.js'
+import { computeSpecifierModifiers } from './sort-imports/compute-specifier-modifiers.js'
+import { getOptionsWithCleanGroups } from '../utils/get-options-with-clean-groups.js'
+import { computeCommonSelectors } from './sort-imports/compute-common-selectors.js'
+import { computeDependencyNames } from './sort-imports/compute-dependency-names.js'
+import { computeSpecifierName } from './sort-imports/compute-specifier-name.js'
+import { computeDependencies } from './sort-imports/compute-dependencies.js'
+import { isSideEffectImport } from './sort-imports/is-side-effect-import.js'
+import { computeNodeName } from './sort-imports/compute-node-name.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Cache computed groups by modifiers and selectors for performance.
+ */
+var cachedGroupsByModifiersAndSelectors = /* @__PURE__ */ new Map()
+var ORDER_ERROR_ID = 'unexpectedImportsOrder'
+var GROUP_ORDER_ERROR_ID = 'unexpectedImportsGroupOrder'
+var EXTRA_SPACING_ERROR_ID = 'extraSpacingBetweenImports'
+var MISSED_SPACING_ERROR_ID = 'missedSpacingBetweenImports'
+var MISSED_COMMENT_ABOVE_ERROR_ID = 'missedCommentAboveImport'
+var DEPENDENCY_ORDER_ERROR_ID = 'unexpectedImportsDependencyOrder'
+var defaultOptions = {
+ groups: [
+ 'type-import',
+ ['value-builtin', 'value-external'],
+ 'type-internal',
+ 'value-internal',
+ ['type-parent', 'type-sibling', 'type-index'],
+ ['value-parent', 'value-sibling', 'value-index'],
+ 'ts-equals-import',
+ 'unknown',
+ ],
+ internalPattern: ['^~/.+', '^@/.+', '^#.+'],
+ useExperimentalDependencyDetection: true,
+ fallbackSort: { type: 'unsorted' },
+ partitionByComment: false,
+ partitionByNewLine: false,
+ specialCharacters: 'keep',
+ tsconfig: { rootDir: '' },
+ maxLineLength: Infinity,
+ sortSideEffects: false,
+ type: 'alphabetical',
+ environment: 'node',
+ newlinesBetween: 1,
+ newlinesInside: 0,
+ customGroups: [],
+ ignoreCase: true,
+ locales: 'en-US',
+ sortBy: 'path',
+ alphabet: '',
+ order: 'asc',
+}
+var sort_imports_default = createEslintRule({
+ create: context => {
+ let settings = getSettings(context.settings)
+ let userOptions = context.options.at(0)
+ let options = getOptionsWithCleanGroups(
+ complete(userOptions, settings, defaultOptions),
+ )
+ validateGroupsConfig({
+ selectors: allSelectors,
+ modifiers: allModifiers,
+ options,
+ })
+ validateCustomSortConfig(options)
+ validateNewlinesAndPartitionConfig(options)
+ validateSideEffectsConfig(options)
+ let tsconfigRootDirectory = options.tsconfig.rootDir
+ let tsConfigOutput =
+ tsconfigRootDirectory ?
+ readClosestTsConfigByPath({
+ tsconfigFilename: options.tsconfig.filename ?? 'tsconfig.json',
+ tsconfigRootDir: tsconfigRootDirectory,
+ filePath: context.physicalFilename,
+ contextCwd: context.cwd,
+ })
+ : null
+ let { sourceCode, filename, id } = context
+ let eslintDisabledLines = getEslintDisabledLines({
+ ruleName: id,
+ sourceCode,
+ })
+ let sortingNodesWithoutPartitionId = []
+ let flatGroups = new Set(options.groups.flat())
+ let shouldRegroupSideEffectNodes = flatGroups.has('side-effect')
+ let shouldRegroupSideEffectStyleNodes = flatGroups.has('side-effect-style')
+ function registerNode(node) {
+ let name = computeNodeName({
+ sourceCode,
+ node,
+ })
+ let commonSelectors = computeCommonSelectors({
+ tsConfigOutput,
+ filename,
+ options,
+ name,
+ })
+ let selectors = []
+ let modifiers = []
+ let group = null
+ if (
+ node.type !== AST_NODE_TYPES.VariableDeclaration &&
+ node.importKind === 'type'
+ ) {
+ selectors.push('type')
+ modifiers.push('type')
+ }
+ let isSideEffect = isSideEffectImport({
+ sourceCode,
+ node,
+ })
+ let isStyleValue = isStyle(name)
+ let isStyleSideEffect = isSideEffect && isStyleValue
+ if (!isNonExternalReferenceTsImportEquals(node)) {
+ if (isStyleSideEffect) {
+ selectors.push('side-effect-style')
+ }
+ if (isSideEffect) {
+ selectors.push('side-effect')
+ modifiers.push('side-effect')
+ }
+ if (isStyleValue) {
+ selectors.push('style')
+ }
+ for (let selector of commonSelectors) {
+ selectors.push(selector)
+ }
+ }
+ selectors.push('import')
+ if (!modifiers.includes('type')) {
+ modifiers.push('value')
+ }
+ if (node.type === AST_NODE_TYPES.TSImportEqualsDeclaration) {
+ modifiers.push('ts-equals')
+ }
+ if (node.type === AST_NODE_TYPES.VariableDeclaration) {
+ modifiers.push('require')
+ }
+ modifiers.push(...computeSpecifierModifiers(node))
+ if (isNodeOnSingleLine(node)) {
+ modifiers.push('singleline')
+ } else {
+ modifiers.push('multiline')
+ }
+ group ??=
+ computeGroupExceptUnknown({
+ selectors,
+ modifiers,
+ options,
+ name,
+ }) ?? 'unknown'
+ let hasMultipleImportDeclarations =
+ node.type === AST_NODE_TYPES.ImportDeclaration &&
+ isSortable(node.specifiers)
+ let size = rangeToDiff(node, sourceCode)
+ if (hasMultipleImportDeclarations && size > options.maxLineLength) {
+ size = name.length + 10
+ }
+ sortingNodesWithoutPartitionId.push({
+ isIgnored:
+ !options.sortSideEffects &&
+ isSideEffect &&
+ !shouldRegroupSideEffectNodes &&
+ (!isStyleSideEffect || !shouldRegroupSideEffectStyleNodes),
+ dependencies:
+ options.useExperimentalDependencyDetection ?
+ []
+ : computeDependencies(node),
+ isEslintDisabled: isNodeEslintDisabled(node, eslintDisabledLines),
+ dependencyNames: computeDependencyNames({
+ sourceCode,
+ node,
+ }),
+ specifierName: computeSpecifierName({
+ sourceCode,
+ node,
+ }),
+ isTypeImport: modifiers.includes('type'),
+ addSafetySemicolonWhenInline: true,
+ group,
+ size,
+ name,
+ node,
+ })
+ }
+ return {
+ VariableDeclaration: node => {
+ if (
+ node.declarations[0].init?.type === AST_NODE_TYPES.CallExpression &&
+ node.declarations[0].init.callee.type === AST_NODE_TYPES.Identifier &&
+ node.declarations[0].init.callee.name === 'require' &&
+ node.declarations[0].init.arguments[0]?.type ===
+ AST_NODE_TYPES.Literal
+ ) {
+ registerNode(node)
+ }
+ },
+ 'Program:exit': () => {
+ sortImportNodes({
+ sortingNodesWithoutPartitionId,
+ context,
+ options,
+ })
+ },
+ TSImportEqualsDeclaration: registerNode,
+ ImportDeclaration: registerNode,
+ }
+ },
+ meta: {
+ schema: {
+ items: {
+ properties: {
+ ...buildCommonJsonSchemas({
+ allowedAdditionalTypeValues: [TYPE_IMPORT_FIRST_TYPE_OPTION],
+ additionalSortProperties: additionalSortOptionsJsonSchema,
+ }),
+ ...buildCommonGroupsJsonSchemas({
+ additionalCustomGroupMatchProperties:
+ additionalCustomGroupMatchOptionsJsonSchema,
+ allowedAdditionalTypeValues: [TYPE_IMPORT_FIRST_TYPE_OPTION],
+ additionalSortProperties: additionalSortOptionsJsonSchema,
+ }),
+ tsconfig: {
+ properties: {
+ rootDir: {
+ description: 'Specifies the tsConfig root directory.',
+ type: 'string',
+ },
+ filename: {
+ description: 'Specifies the tsConfig filename.',
+ type: 'string',
+ },
+ },
+ additionalProperties: false,
+ required: ['rootDir'],
+ type: 'object',
+ },
+ maxLineLength: {
+ description: 'Specifies the maximum line length.',
+ exclusiveMinimum: true,
+ type: 'integer',
+ minimum: 0,
+ },
+ sortSideEffects: {
+ description:
+ 'Controls whether side-effect imports should be sorted.',
+ type: 'boolean',
+ },
+ environment: {
+ description: 'Specifies the environment.',
+ enum: ['node', 'bun'],
+ type: 'string',
+ },
+ useExperimentalDependencyDetection:
+ useExperimentalDependencyDetectionJsonSchema,
+ partitionByComment: partitionByCommentJsonSchema,
+ partitionByNewLine: partitionByNewlineJsonSchema,
+ internalPattern: buildRegexJsonSchema(),
+ },
+ additionalProperties: false,
+ type: 'object',
+ },
+ uniqueItems: true,
+ type: 'array',
+ },
+ messages: {
+ [MISSED_COMMENT_ABOVE_ERROR_ID]: MISSED_COMMENT_ABOVE_ERROR,
+ [DEPENDENCY_ORDER_ERROR_ID]: DEPENDENCY_ORDER_ERROR,
+ [MISSED_SPACING_ERROR_ID]: MISSED_SPACING_ERROR,
+ [EXTRA_SPACING_ERROR_ID]: EXTRA_SPACING_ERROR,
+ [GROUP_ORDER_ERROR_ID]: GROUP_ORDER_ERROR,
+ [ORDER_ERROR_ID]: ORDER_ERROR,
+ },
+ docs: {
+ url: 'https://perfectionist.dev/rules/sort-imports',
+ description: 'Enforce sorted imports.',
+ recommended: true,
+ },
+ type: 'suggestion',
+ fixable: 'code',
+ },
+ defaultOptions: [defaultOptions],
+ name: 'sort-imports',
+})
+function sortImportNodes({ sortingNodesWithoutPartitionId, options, context }) {
+ let { sourceCode } = context
+ let optionsByGroupIndexComputer = buildOptionsByGroupIndexComputer(options)
+ let contentSeparatedSortingNodeGroups = [[[]]]
+ for (let sortingNodeWithoutPartitionId of sortingNodesWithoutPartitionId) {
+ let lastGroupWithNoContentBetween = contentSeparatedSortingNodeGroups.at(-1)
+ let lastGroup = lastGroupWithNoContentBetween.at(-1)
+ let lastSortingNode = lastGroup.at(-1)
+ if (
+ lastSortingNode &&
+ hasContentBetweenNodes(lastSortingNode, sortingNodeWithoutPartitionId)
+ ) {
+ lastGroup = []
+ lastGroupWithNoContentBetween = [lastGroup]
+ contentSeparatedSortingNodeGroups.push(lastGroupWithNoContentBetween)
+ } else if (
+ shouldPartition({
+ sortingNode: sortingNodeWithoutPartitionId,
+ lastSortingNode,
+ sourceCode,
+ options,
+ })
+ ) {
+ lastGroup = []
+ lastGroupWithNoContentBetween.push(lastGroup)
+ }
+ lastGroup.push({
+ ...sortingNodeWithoutPartitionId,
+ partitionId: lastGroupWithNoContentBetween.length,
+ })
+ }
+ for (let contentSeparatedSortingNodeGroup of contentSeparatedSortingNodeGroups) {
+ let sortingNodeGroups = [...contentSeparatedSortingNodeGroup]
+ if (options.useExperimentalDependencyDetection) {
+ let dependenciesBySortingNode = computeDependenciesBySortingNode({
+ sortingNodes: sortingNodeGroups.flat(),
+ sourceCode,
+ })
+ sortingNodeGroups = populateSortingNodeGroupsWithDependencies({
+ dependenciesBySortingNode,
+ sortingNodeGroups,
+ })
+ }
+ let sortingNodes = sortingNodeGroups.flat()
+ reportAllErrors({
+ availableMessageIds: {
+ unexpectedDependencyOrder: DEPENDENCY_ORDER_ERROR_ID,
+ missedSpacingBetweenMembers: MISSED_SPACING_ERROR_ID,
+ extraSpacingBetweenMembers: EXTRA_SPACING_ERROR_ID,
+ missedCommentAbove: MISSED_COMMENT_ABOVE_ERROR_ID,
+ unexpectedGroupOrder: GROUP_ORDER_ERROR_ID,
+ unexpectedOrder: ORDER_ERROR_ID,
+ },
+ sortNodesExcludingEslintDisabled:
+ createSortNodesExcludingEslintDisabled(sortingNodeGroups),
+ nodes: sortingNodes,
+ options,
+ context,
+ })
+ }
+ function createSortNodesExcludingEslintDisabled(nodeGroups) {
+ return function (ignoreEslintDisabledNodes) {
+ let nodesSortedByGroups = nodeGroups.flatMap(nodes =>
+ sortNodesByGroups({
+ isNodeIgnoredForGroup: ({ groupIndex }) => {
+ if (options.sortSideEffects) {
+ return false
+ }
+ return isSideEffectOnlyGroup(options.groups[groupIndex])
+ },
+ isNodeIgnored: node => node.isIgnored,
+ optionsByGroupIndexComputer,
+ comparatorByOptionsComputer,
+ ignoreEslintDisabledNodes,
+ groups: options.groups,
+ nodes,
+ }),
+ )
+ return sortNodesByDependencies(nodesSortedByGroups, {
+ ignoreEslintDisabledNodes,
+ })
+ }
+ }
+ function hasContentBetweenNodes(left, right) {
+ return (
+ sourceCode.getTokensBetween(left.node, right.node, {
+ includeComments: false,
+ }).length > 0
+ )
+ }
+}
+function computeGroupExceptUnknown({ selectors, modifiers, options, name }) {
+ let predefinedGroups = generatePredefinedGroups({
+ cache: cachedGroupsByModifiersAndSelectors,
+ selectors,
+ modifiers,
+ })
+ let computedCustomGroup = computeGroup({
+ customGroupMatcher: customGroup =>
+ doesCustomGroupMatch({
+ elementName: name,
+ customGroup,
+ modifiers,
+ selectors,
+ }),
+ predefinedGroups,
+ options,
+ })
+ if (computedCustomGroup === 'unknown') {
+ return null
+ }
+ return computedCustomGroup
+}
+var styleExtensions = [
+ '.less',
+ '.scss',
+ '.sass',
+ '.styl',
+ '.pcss',
+ '.css',
+ '.sss',
+]
+function isStyle(value) {
+ let [cleanedValue] = value.split('?', 1)
+ return styleExtensions.some(extension => cleanedValue?.endsWith(extension))
+}
+export { sort_imports_default as default }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/comparator-by-options-computer.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/comparator-by-options-computer.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..a7a84958fa291689f03c77ef162dc656e166b56c
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/comparator-by-options-computer.d.ts
@@ -0,0 +1,6 @@
+import { ComparatorByOptionsComputer } from '../../utils/compare/default-comparator-by-options-computer.js'
+import { SortImportsSortingNode, Options } from './types.js'
+export declare let comparatorByOptionsComputer: ComparatorByOptionsComputer<
+ Required,
+ SortImportsSortingNode
+>
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/comparator-by-options-computer.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/comparator-by-options-computer.js
new file mode 100644
index 0000000000000000000000000000000000000000..368f3296a5f6b8a9ce44d78a4cc482ff17fa595f
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/comparator-by-options-computer.js
@@ -0,0 +1,90 @@
+import { UnreachableCaseError } from '../../utils/unreachable-case-error.js'
+import { computeOrderedValue } from '../../utils/compare/compute-ordered-value.js'
+import { buildLineLengthComparator } from '../../utils/compare/build-line-length-comparator.js'
+import { compareAlphabetically } from '../../utils/compare/compare-alphabetically.js'
+import { compareByCustomSort } from '../../utils/compare/compare-by-custom-sort.js'
+import { unsortedComparator } from '../../utils/compare/unsorted-comparator.js'
+import { compareNaturally } from '../../utils/compare/compare-naturally.js'
+import { defaultComparatorByOptionsComputer } from '../../utils/compare/default-comparator-by-options-computer.js'
+var comparatorByOptionsComputer = options => {
+ switch (options.type) {
+ case 'type-import-first':
+ return (a, b) => compareTypeImportFirst(a, b, options)
+ case 'subgroup-order':
+ case 'alphabetical':
+ case 'line-length':
+ case 'unsorted':
+ case 'natural':
+ case 'custom':
+ switch (options.sortBy) {
+ case 'specifier':
+ return bySpecifierComparatorByOptionsComputer({
+ ...options,
+ type: options.type,
+ })
+ case 'path':
+ return defaultComparatorByOptionsComputer({
+ ...options,
+ type: options.type,
+ })
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(options.sortBy)
+ }
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(options.type)
+ }
+}
+/**
+ * Compares two import nodes to sort type imports before regular imports.
+ *
+ * When both nodes are type imports or both are regular imports, returns 0
+ * (equal). Otherwise, sorts type imports first based on the order option.
+ *
+ * @param a - The first import sorting node.
+ * @param b - The second import sorting node.
+ * @param options - Options containing the sort order.
+ * @returns A negative number if a should come first, positive if b should.
+ */
+function compareTypeImportFirst(a, b, options) {
+ if (a.isTypeImport && b.isTypeImport) {
+ return 0
+ }
+ if (!a.isTypeImport && !b.isTypeImport) {
+ return 0
+ }
+ return computeOrderedValue(a.isTypeImport ? -1 : 1, options.order)
+}
+var bySpecifierComparatorByOptionsComputer = options => {
+ switch (options.type) {
+ /* v8 ignore next 2 -- @preserve Untested for now as not a relevant sort for this rule. */
+ case 'subgroup-order':
+ return defaultComparatorByOptionsComputer(options)
+ case 'alphabetical':
+ return (a, b) =>
+ compareAlphabetically(
+ a.specifierName ?? '',
+ b.specifierName ?? '',
+ options,
+ )
+ case 'line-length':
+ return buildLineLengthComparator(options)
+ case 'unsorted':
+ return unsortedComparator
+ case 'natural':
+ return (a, b) =>
+ compareNaturally(a.specifierName ?? '', b.specifierName ?? '', options)
+ case 'custom':
+ return (a, b) =>
+ compareByCustomSort(
+ a.specifierName ?? '',
+ b.specifierName ?? '',
+ options,
+ )
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(options.type)
+ }
+}
+export { comparatorByOptionsComputer }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/compute-common-selectors.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/compute-common-selectors.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..77d1911b61d71e1731fdf4a717d36054166dc171
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/compute-common-selectors.d.ts
@@ -0,0 +1,52 @@
+import { ReadClosestTsConfigByPathValue } from './read-closest-ts-config-by-path.js'
+import { RegexOption } from '../../types/common-options.js'
+import { Selector } from './types.js'
+/**
+ * Common import selector types that categorize imports by their
+ * characteristics.
+ *
+ * These selectors are used to identify and group imports based on their module
+ * path patterns and resolution characteristics.
+ */
+type CommonSelector = Extract<
+ Selector,
+ | 'tsconfig-path'
+ | 'internal'
+ | 'external'
+ | 'sibling'
+ | 'builtin'
+ | 'subpath'
+ | 'parent'
+ | 'index'
+>
+/**
+ * Computes all applicable selectors for an import based on its module path.
+ *
+ * Analyzes an import's module specifier to determine which categories it
+ * belongs to, such as external package, internal module, relative import, or
+ * Node.js builtin. These selectors are used for grouping and sorting imports
+ * according to user configuration.
+ *
+ * @param options - Configuration options.
+ * @param options.tsConfigOutput - TypeScript configuration for path resolution.
+ * @param options.filename - Current file path for relative import resolution.
+ * @param options.options - Rule options including internal patterns and
+ * environment.
+ * @param options.name - Import module specifier to analyze.
+ * @returns Array of matching selectors for the import.
+ */
+export declare function computeCommonSelectors({
+ tsConfigOutput,
+ filename,
+ options,
+ name,
+}: {
+ options: {
+ internalPattern: RegexOption[]
+ environment: 'node' | 'bun'
+ }
+ tsConfigOutput: ReadClosestTsConfigByPathValue | null
+ filename: string
+ name: string
+}): CommonSelector[]
+export {}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/compute-common-selectors.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/compute-common-selectors.js
new file mode 100644
index 0000000000000000000000000000000000000000..d83b3b04809652b31e9a6bdfc016cda0b95b47be
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/compute-common-selectors.js
@@ -0,0 +1,200 @@
+import { matches } from '../../utils/matches.js'
+import { getTypescriptImport } from './get-typescript-import.js'
+import { matchesTsconfigPaths } from './matches-tsconfig-paths.js'
+import { builtinModules } from 'node:module'
+/**
+ * Computes all applicable selectors for an import based on its module path.
+ *
+ * Analyzes an import's module specifier to determine which categories it
+ * belongs to, such as external package, internal module, relative import, or
+ * Node.js builtin. These selectors are used for grouping and sorting imports
+ * according to user configuration.
+ *
+ * @param options - Configuration options.
+ * @param options.tsConfigOutput - TypeScript configuration for path resolution.
+ * @param options.filename - Current file path for relative import resolution.
+ * @param options.options - Rule options including internal patterns and
+ * environment.
+ * @param options.name - Import module specifier to analyze.
+ * @returns Array of matching selectors for the import.
+ */
+function computeCommonSelectors({ tsConfigOutput, filename, options, name }) {
+ function matchesInternalPattern(value) {
+ return options.internalPattern.some(pattern => matches(value, pattern))
+ }
+ let internalExternalGroup =
+ matchesInternalPattern(name) ? 'internal' : (
+ getInternalOrExternalGroup({
+ tsConfigOutput,
+ filename,
+ name,
+ })
+ )
+ let commonSelectors = []
+ if (
+ tsConfigOutput &&
+ matchesTsconfigPaths({
+ tsConfigOutput,
+ name,
+ })
+ ) {
+ commonSelectors.push('tsconfig-path')
+ }
+ if (isIndex(name)) {
+ commonSelectors.push('index')
+ }
+ if (isSibling(name)) {
+ commonSelectors.push('sibling')
+ }
+ if (isParent(name)) {
+ commonSelectors.push('parent')
+ }
+ if (isSubpath(name)) {
+ commonSelectors.push('subpath')
+ }
+ if (internalExternalGroup === 'internal') {
+ commonSelectors.push('internal')
+ }
+ if (isCoreModule(name, options.environment)) {
+ commonSelectors.push('builtin')
+ }
+ if (internalExternalGroup === 'external') {
+ commonSelectors.push('external')
+ }
+ return commonSelectors
+}
+var bunModules = /* @__PURE__ */ new Set([
+ 'detect-libc',
+ 'bun:sqlite',
+ 'bun:test',
+ 'bun:wrap',
+ 'bun:ffi',
+ 'bun:jsc',
+ 'undici',
+ 'bun',
+ 'ws',
+])
+var nodeBuiltinModules = new Set(builtinModules)
+var builtinPrefixOnlyModules = /* @__PURE__ */ new Set([
+ 'node:sqlite',
+ 'node:test',
+ 'node:sea',
+])
+/**
+ * Determines whether an import is internal or external to the project.
+ *
+ * Uses TypeScript's module resolution to accurately classify imports based on
+ * whether they resolve to external libraries (node_modules) or internal project
+ * files. Falls back to path-based heuristics when TypeScript is unavailable.
+ *
+ * @param options - Options for determining the group.
+ * @param options.tsConfigOutput - TypeScript configuration for module
+ * resolution.
+ * @param options.filename - Current file path for resolution context.
+ * @param options.name - Import module specifier to classify.
+ * @returns 'internal' for project modules, 'external' for dependencies, null
+ * for relative imports.
+ */
+function getInternalOrExternalGroup({ tsConfigOutput, filename, name }) {
+ let typescriptImport = getTypescriptImport()
+ if (!typescriptImport) {
+ return !name.startsWith('.') && !name.startsWith('/') ? 'external' : null
+ }
+ if (typescriptImport.isExternalModuleNameRelative(name)) {
+ return null
+ }
+ if (!tsConfigOutput) {
+ return 'external'
+ }
+ let resolution = typescriptImport.resolveModuleName(
+ name,
+ filename,
+ tsConfigOutput.compilerOptions,
+ typescriptImport.sys,
+ tsConfigOutput.cache,
+ )
+ if (typeof resolution.resolvedModule?.isExternalLibraryImport !== 'boolean') {
+ return 'external'
+ }
+ return resolution.resolvedModule.isExternalLibraryImport ?
+ 'external'
+ : 'internal'
+}
+/**
+ * Checks if a module is a Node.js or Bun builtin module.
+ *
+ * Handles various formats including 'node:' prefixed modules and subpath
+ * imports (e.g., 'fs/promises'). Also supports Bun-specific modules when in Bun
+ * environment.
+ *
+ * @param value - Module specifier to check.
+ * @param environment - Runtime environment ('node' or 'bun').
+ * @returns True if the module is a builtin module.
+ */
+function isCoreModule(value, environment) {
+ function clean(string_) {
+ return string_.replace(/^(?:node:){1,2}/u, '')
+ }
+ let [basePath] = value.split('/', 1)
+ let cleanValue = clean(value)
+ let cleanBase = clean(basePath)
+ if (nodeBuiltinModules.has(cleanValue) || nodeBuiltinModules.has(cleanBase)) {
+ return true
+ }
+ if (
+ builtinPrefixOnlyModules.has(value) ||
+ builtinPrefixOnlyModules.has(`node:${cleanValue}`) ||
+ builtinPrefixOnlyModules.has(basePath) ||
+ builtinPrefixOnlyModules.has(`node:${cleanBase}`)
+ ) {
+ return true
+ }
+ return environment === 'bun' && bunModules.has(value)
+}
+/**
+ * Checks if an import is an index file import.
+ *
+ * @param value - Import path to check.
+ * @returns True if importing an index file.
+ */
+function isIndex(value) {
+ return [
+ './index.d.js',
+ './index.d.ts',
+ './index.js',
+ './index.ts',
+ './index',
+ './',
+ '.',
+ ].includes(value)
+}
+/**
+ * Checks if an import is a sibling module (same directory).
+ *
+ * @param value - Import path to check.
+ * @returns True if importing from the same directory.
+ */
+function isSibling(value) {
+ return value.startsWith('./')
+}
+/**
+ * Checks if an import is from a parent directory.
+ *
+ * @param value - Import path to check.
+ * @returns True if importing from a parent directory.
+ */
+function isParent(value) {
+ return value.startsWith('..')
+}
+/**
+ * Checks if an import is a Node.js subpath import.
+ *
+ * Subpath imports start with '#' and are defined in package.json imports field.
+ *
+ * @param value - Import path to check.
+ * @returns True if using subpath import syntax.
+ */
+function isSubpath(value) {
+ return value.startsWith('#')
+}
+export { computeCommonSelectors }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/compute-dependencies.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/compute-dependencies.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..0de1066c29de6aa4bddb5b5547147ac9d1c9be15
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/compute-dependencies.d.ts
@@ -0,0 +1,10 @@
+import { SortImportsNode } from './types.js'
+/**
+ * Computes the dependencies of an import-like AST node.
+ *
+ * @deprecated - To remove when experimental dependency detection is the only
+ * option.
+ * @param node - The AST node representing an import-like declaration.
+ * @returns The names of the dependencies.
+ */
+export declare function computeDependencies(node: SortImportsNode): string[]
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/compute-dependencies.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/compute-dependencies.js
new file mode 100644
index 0000000000000000000000000000000000000000..5982968376b8075397b8473b766de1017837b352
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/compute-dependencies.js
@@ -0,0 +1,57 @@
+import { UnreachableCaseError } from '../../utils/unreachable-case-error.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Computes the dependencies of an import-like AST node.
+ *
+ * @deprecated - To remove when experimental dependency detection is the only
+ * option.
+ * @param node - The AST node representing an import-like declaration.
+ * @returns The names of the dependencies.
+ */
+function computeDependencies(node) {
+ switch (node.type) {
+ case AST_NODE_TYPES.TSImportEqualsDeclaration:
+ return computeImportEqualsDeclarationDependencies(node)
+ case AST_NODE_TYPES.VariableDeclaration:
+ case AST_NODE_TYPES.ImportDeclaration:
+ return []
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(node)
+ }
+}
+function computeImportEqualsDeclarationDependencies(node) {
+ switch (node.moduleReference.type) {
+ case AST_NODE_TYPES.TSExternalModuleReference:
+ case AST_NODE_TYPES.Identifier:
+ return []
+ case AST_NODE_TYPES.TSQualifiedName: {
+ let qualifiedName = getQualifiedNameDependencyName(node.moduleReference)
+ /* v8 ignore if -- @preserve Unsure how we can reach that case */
+ if (!qualifiedName) {
+ return []
+ }
+ return [qualifiedName]
+ }
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(node.moduleReference)
+ }
+}
+function getQualifiedNameDependencyName(node) {
+ let currentNode = node
+ while (currentNode.type === AST_NODE_TYPES.TSQualifiedName) {
+ currentNode = currentNode.left
+ }
+ switch (currentNode.type) {
+ /* v8 ignore next -- @preserve Unsure how we can reach that case */
+ case AST_NODE_TYPES.ThisExpression:
+ return null
+ case AST_NODE_TYPES.Identifier:
+ return currentNode.name
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(currentNode)
+ }
+}
+export { computeDependencies }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/compute-dependency-names.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/compute-dependency-names.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..dd167c4b6038add28a29970c976b092a91caa320
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/compute-dependency-names.d.ts
@@ -0,0 +1,17 @@
+import { TSESLint } from '@typescript-eslint/utils'
+import { SortImportsNode } from './types.js'
+/**
+ * Computes the dependency names of an import-like AST node.
+ *
+ * @param props - The parameters object.
+ * @param props.sourceCode - ESLint source code object for text extraction.
+ * @param props.node - The AST node representing an import-like declaration.
+ * @returns The names of the dependencies.
+ */
+export declare function computeDependencyNames({
+ sourceCode,
+ node,
+}: {
+ sourceCode: TSESLint.SourceCode
+ node: SortImportsNode
+}): string[]
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/compute-dependency-names.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/compute-dependency-names.js
new file mode 100644
index 0000000000000000000000000000000000000000..9248e7658dc98b1919b41ed639207d504521d242
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/compute-dependency-names.js
@@ -0,0 +1,36 @@
+import { UnreachableCaseError } from '../../utils/unreachable-case-error.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Computes the dependency names of an import-like AST node.
+ *
+ * @param props - The parameters object.
+ * @param props.sourceCode - ESLint source code object for text extraction.
+ * @param props.node - The AST node representing an import-like declaration.
+ * @returns The names of the dependencies.
+ */
+function computeDependencyNames({ sourceCode, node }) {
+ switch (node.type) {
+ case AST_NODE_TYPES.TSImportEqualsDeclaration:
+ return [node.id.name]
+ case AST_NODE_TYPES.VariableDeclaration:
+ return []
+ case AST_NODE_TYPES.ImportDeclaration:
+ return node.specifiers.map(computeImportClauseDependencyName)
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(node)
+ }
+ function computeImportClauseDependencyName(specifier) {
+ switch (specifier.type) {
+ case AST_NODE_TYPES.ImportNamespaceSpecifier:
+ case AST_NODE_TYPES.ImportDefaultSpecifier:
+ return sourceCode.getText(specifier.local)
+ case AST_NODE_TYPES.ImportSpecifier:
+ return sourceCode.getText(specifier.imported)
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(specifier)
+ }
+ }
+}
+export { computeDependencyNames }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/compute-node-name.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/compute-node-name.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..00c63394e3a95f1b77e71639fa89fd58f7064b83
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/compute-node-name.d.ts
@@ -0,0 +1,17 @@
+import { TSESLint } from '@typescript-eslint/utils'
+import { SortImportsNode } from './types.js'
+/**
+ * Computes the name of an import-like AST node.
+ *
+ * @param props - The parameters object.
+ * @param props.sourceCode - ESLint source code object for text extraction.
+ * @param props.node - The AST node representing an import-like declaration.
+ * @returns The name of the import.
+ */
+export declare function computeNodeName({
+ sourceCode,
+ node,
+}: {
+ sourceCode: TSESLint.SourceCode
+ node: SortImportsNode
+}): string
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/compute-node-name.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/compute-node-name.js
new file mode 100644
index 0000000000000000000000000000000000000000..6ca311c474cd4ed6f691b6da4f65eda7c4f55242
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/compute-node-name.js
@@ -0,0 +1,38 @@
+import { UnreachableCaseError } from '../../utils/unreachable-case-error.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Computes the name of an import-like AST node.
+ *
+ * @param props - The parameters object.
+ * @param props.sourceCode - ESLint source code object for text extraction.
+ * @param props.node - The AST node representing an import-like declaration.
+ * @returns The name of the import.
+ */
+function computeNodeName({ sourceCode, node }) {
+ switch (node.type) {
+ case AST_NODE_TYPES.TSImportEqualsDeclaration:
+ return computeImportEqualsDeclarationName(node)
+ case AST_NODE_TYPES.VariableDeclaration: {
+ let { value } = node.declarations[0].init.arguments[0]
+ return value.toString()
+ }
+ case AST_NODE_TYPES.ImportDeclaration:
+ return node.source.value
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(node)
+ }
+ function computeImportEqualsDeclarationName(declaration) {
+ switch (declaration.moduleReference.type) {
+ case AST_NODE_TYPES.TSExternalModuleReference:
+ return declaration.moduleReference.expression.value
+ case AST_NODE_TYPES.TSQualifiedName:
+ case AST_NODE_TYPES.Identifier:
+ return sourceCode.getText(declaration.moduleReference)
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(declaration.moduleReference)
+ }
+ }
+}
+export { computeNodeName }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/compute-specifier-modifiers.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/compute-specifier-modifiers.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..07f69e4247c77969146075c73f068b10c908343b
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/compute-specifier-modifiers.d.ts
@@ -0,0 +1,12 @@
+import { SortImportsNode } from './types.js'
+type Modifier = 'wildcard' | 'default' | 'named'
+/**
+ * Computes the specifier modifiers of an import-like AST node.
+ *
+ * @param node - The AST node representing an import-like declaration.
+ * @returns A list of specifier modifiers.
+ */
+export declare function computeSpecifierModifiers(
+ node: SortImportsNode,
+): Modifier[]
+export {}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/compute-specifier-modifiers.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/compute-specifier-modifiers.js
new file mode 100644
index 0000000000000000000000000000000000000000..f948b386b339209406e4f5a3a24f7980fa8cede5
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/compute-specifier-modifiers.js
@@ -0,0 +1,31 @@
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Computes the specifier modifiers of an import-like AST node.
+ *
+ * @param node - The AST node representing an import-like declaration.
+ * @returns A list of specifier modifiers.
+ */
+function computeSpecifierModifiers(node) {
+ if (node.type !== AST_NODE_TYPES.ImportDeclaration) {
+ return []
+ }
+ return computeImportDeclarationModifiers(node)
+}
+function computeImportDeclarationModifiers(node) {
+ let importClauses = node.specifiers
+ return [
+ ...(hasSpecifier(importClauses, AST_NODE_TYPES.ImportDefaultSpecifier) ?
+ ['default']
+ : []),
+ ...(hasSpecifier(importClauses, AST_NODE_TYPES.ImportNamespaceSpecifier) ?
+ ['wildcard']
+ : []),
+ ...(hasSpecifier(importClauses, AST_NODE_TYPES.ImportSpecifier) ?
+ ['named']
+ : []),
+ ]
+}
+function hasSpecifier(importClauses, specifier) {
+ return importClauses.some(importClause => importClause.type === specifier)
+}
+export { computeSpecifierModifiers }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/compute-specifier-name.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/compute-specifier-name.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..44429957df1cd21ba519c715c71d95c78c42c049
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/compute-specifier-name.d.ts
@@ -0,0 +1,9 @@
+import { TSESLint } from '@typescript-eslint/utils'
+import { SortImportsNode } from './types.js'
+export declare function computeSpecifierName({
+ sourceCode,
+ node,
+}: {
+ sourceCode: TSESLint.SourceCode
+ node: SortImportsNode
+}): string | null
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/compute-specifier-name.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/compute-specifier-name.js
new file mode 100644
index 0000000000000000000000000000000000000000..acb8a82401eed92ee80cbb7ee1a472259d43f7c4
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/compute-specifier-name.js
@@ -0,0 +1,64 @@
+import { UnreachableCaseError } from '../../utils/unreachable-case-error.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+function computeSpecifierName({ sourceCode, node }) {
+ switch (node.type) {
+ case AST_NODE_TYPES.TSImportEqualsDeclaration:
+ return node.id.name
+ case AST_NODE_TYPES.VariableDeclaration:
+ return computeVariableDeclarationSpecifierName(node, sourceCode)
+ case AST_NODE_TYPES.ImportDeclaration:
+ return computeImportDeclarationSpecifierName(node)
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(node)
+ }
+}
+function computeVariableDeclarationSpecifierName(node, sourceCode) {
+ let [declaration] = node.declarations
+ switch (declaration.id.type) {
+ case AST_NODE_TYPES.ObjectPattern:
+ return computeObjectPatternPropertyName(declaration.id.properties[0])
+ case AST_NODE_TYPES.ArrayPattern:
+ if (!declaration.id.elements[0]) {
+ return null
+ }
+ return sourceCode.getText(declaration.id.elements[0])
+ case AST_NODE_TYPES.Identifier:
+ return declaration.id.name
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(declaration.id)
+ }
+ function computeObjectPatternPropertyName(property) {
+ if (!property) {
+ return null
+ }
+ switch (property.type) {
+ case AST_NODE_TYPES.RestElement:
+ return sourceCode.getText(property.argument)
+ case AST_NODE_TYPES.Property:
+ return sourceCode.getText(property.value)
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(property)
+ }
+ }
+}
+function computeImportDeclarationSpecifierName(node) {
+ let [specifier] = node.specifiers
+ if (!specifier) {
+ return null
+ }
+ switch (specifier.type) {
+ case AST_NODE_TYPES.ImportNamespaceSpecifier:
+ return specifier.local.name
+ case AST_NODE_TYPES.ImportDefaultSpecifier:
+ return specifier.local.name
+ case AST_NODE_TYPES.ImportSpecifier:
+ return specifier.local.name
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(specifier)
+ }
+}
+export { computeSpecifierName }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/get-typescript-import.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/get-typescript-import.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..5b0dded5327181e0e6c43de61e1fdd40050aa2d7
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/get-typescript-import.d.ts
@@ -0,0 +1,20 @@
+import { default as ts } from 'typescript'
+declare let requiredTypescriptAttributes: [
+ 'createModuleResolutionCache',
+ 'isExternalModuleNameRelative',
+ 'parseJsonConfigFileContent',
+ 'readConfigFile',
+ 'resolveModuleName',
+ 'sys',
+]
+export type TypescriptImport = Pick<
+ typeof ts,
+ (typeof requiredTypescriptAttributes)[number]
+>
+/**
+ * Dynamically loads the typescript module if it's available and caches it.
+ *
+ * @returns The TypeScript module or null if it's not available.
+ */
+export declare function getTypescriptImport(): TypescriptImport | null
+export {}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/get-typescript-import.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/get-typescript-import.js
new file mode 100644
index 0000000000000000000000000000000000000000..93d3ba4d446e950373e7ffb0423952e1d935bccb
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/get-typescript-import.js
@@ -0,0 +1,48 @@
+import { createRequire } from 'node:module'
+/**
+ * Cached reference to the TypeScript module.
+ */
+var cachedImport
+/**
+ * Indicates whether an attempt to load the TypeScript module has already been
+ * made.
+ */
+var hasTriedLoadingTypescript = false
+var requiredTypescriptAttributes = [
+ 'createModuleResolutionCache',
+ 'isExternalModuleNameRelative',
+ 'parseJsonConfigFileContent',
+ 'readConfigFile',
+ 'resolveModuleName',
+ 'sys',
+]
+/**
+ * Dynamically loads the typescript module if it's available and caches it.
+ *
+ * @returns The TypeScript module or null if it's not available.
+ */
+function getTypescriptImport() {
+ if (cachedImport) {
+ return cachedImport
+ }
+ if (hasTriedLoadingTypescript) {
+ return null
+ }
+ hasTriedLoadingTypescript = true
+ try {
+ let tsImport = createRequire(import.meta.url)('typescript')
+ if (!isSupportedTypescriptVersion(tsImport)) {
+ return null
+ }
+ cachedImport = tsImport
+ return cachedImport
+ } catch (_error) {
+ return null
+ }
+}
+function isSupportedTypescriptVersion(typescriptImport) {
+ return requiredTypescriptAttributes.every(attribute =>
+ Object.hasOwn(typescriptImport, attribute),
+ )
+}
+export { getTypescriptImport }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/is-non-external-reference-ts-import-equals.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/is-non-external-reference-ts-import-equals.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..6e8a74c30bcc43d93763836a46e6442ec2e64d20
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/is-non-external-reference-ts-import-equals.d.ts
@@ -0,0 +1,13 @@
+import { TSESTree } from '@typescript-eslint/types'
+import { SortImportsNode } from './types.js'
+/**
+ * Determines whether the given AST node is a non-external-reference TS import
+ * equals declaration.
+ *
+ * @param node - The AST node representing an import-like declaration.
+ * @returns True if the node is a non-external-reference TS import equals
+ * declaration; otherwise, false.
+ */
+export declare function isNonExternalReferenceTsImportEquals(
+ node: SortImportsNode,
+): node is TSESTree.TSImportEqualsDeclaration
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/is-non-external-reference-ts-import-equals.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/is-non-external-reference-ts-import-equals.js
new file mode 100644
index 0000000000000000000000000000000000000000..f78378394edc629c2d74b4652e54784ac43ca4aa
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/is-non-external-reference-ts-import-equals.js
@@ -0,0 +1,16 @@
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Determines whether the given AST node is a non-external-reference TS import
+ * equals declaration.
+ *
+ * @param node - The AST node representing an import-like declaration.
+ * @returns True if the node is a non-external-reference TS import equals
+ * declaration; otherwise, false.
+ */
+function isNonExternalReferenceTsImportEquals(node) {
+ if (node.type !== AST_NODE_TYPES.TSImportEqualsDeclaration) {
+ return false
+ }
+ return node.moduleReference.type !== AST_NODE_TYPES.TSExternalModuleReference
+}
+export { isNonExternalReferenceTsImportEquals }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/is-side-effect-import.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/is-side-effect-import.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..0d0f3962a13ede09cf19fe1e7f13baef1b07b6de
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/is-side-effect-import.d.ts
@@ -0,0 +1,17 @@
+import { TSESLint } from '@typescript-eslint/utils'
+import { SortImportsNode } from './types.js'
+/**
+ * Determines whether the given AST node is a side-effect import.
+ *
+ * @param props - The parameters object.
+ * @param props.sourceCode - ESLint source code object for text extraction.
+ * @param props.node - The AST node representing an import-like declaration.
+ * @returns True if the node is a side-effect import; otherwise, false.
+ */
+export declare function isSideEffectImport({
+ sourceCode,
+ node,
+}: {
+ sourceCode: TSESLint.SourceCode
+ node: SortImportsNode
+}): boolean
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/is-side-effect-import.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/is-side-effect-import.js
new file mode 100644
index 0000000000000000000000000000000000000000..dbb5f5168d8ecbbdc9706f3904dabe698390439c
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/is-side-effect-import.js
@@ -0,0 +1,26 @@
+import { UnreachableCaseError } from '../../utils/unreachable-case-error.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Determines whether the given AST node is a side-effect import.
+ *
+ * @param props - The parameters object.
+ * @param props.sourceCode - ESLint source code object for text extraction.
+ * @param props.node - The AST node representing an import-like declaration.
+ * @returns True if the node is a side-effect import; otherwise, false.
+ */
+function isSideEffectImport({ sourceCode, node }) {
+ switch (node.type) {
+ case AST_NODE_TYPES.TSImportEqualsDeclaration:
+ case AST_NODE_TYPES.VariableDeclaration:
+ return false
+ case AST_NODE_TYPES.ImportDeclaration:
+ return (
+ node.specifiers.length === 0 &&
+ !/\}\s*from\s+/u.test(sourceCode.getText(node))
+ )
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(node)
+ }
+}
+export { isSideEffectImport }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/is-side-effect-only-group.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/is-side-effect-only-group.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..db2bc25f3db42e48fa7b1fe2da9ab12f79d23329
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/is-side-effect-only-group.d.ts
@@ -0,0 +1,14 @@
+import { GroupsOptions } from '../../types/common-groups-options.js'
+/**
+ * Checks if a group is a side-effect-only group.
+ *
+ * A side-effect-only group is one that contains no imports or exports, and is
+ * typically used for modules that only execute code without exporting any
+ * values.
+ *
+ * @param group - The group to check.
+ * @returns True if the group is a side-effect-only group, false otherwise.
+ */
+export declare function isSideEffectOnlyGroup(
+ group: GroupsOptions[0] | undefined,
+): boolean
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/is-side-effect-only-group.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/is-side-effect-only-group.js
new file mode 100644
index 0000000000000000000000000000000000000000..121cc4b801d28169f5f8330e19cf70485b3c5430
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/is-side-effect-only-group.js
@@ -0,0 +1,23 @@
+import { computeGroupsNames } from '../../utils/compute-groups-names.js'
+import { isStringGroupSideEffectOnlyGroup } from './is-string-group-side-effect-only-group.js'
+/**
+ * Checks if a group is a side-effect-only group.
+ *
+ * A side-effect-only group is one that contains no imports or exports, and is
+ * typically used for modules that only execute code without exporting any
+ * values.
+ *
+ * @param group - The group to check.
+ * @returns True if the group is a side-effect-only group, false otherwise.
+ */
+function isSideEffectOnlyGroup(group) {
+ if (!group) {
+ return false
+ }
+ let groupNames = computeGroupsNames([group])
+ if (groupNames.length === 0) {
+ return false
+ }
+ return groupNames.every(isStringGroupSideEffectOnlyGroup)
+}
+export { isSideEffectOnlyGroup }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/is-string-group-side-effect-only-group.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/is-string-group-side-effect-only-group.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..132e78726f141fe74e9b3c1d4b5b93411a00e4c0
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/is-string-group-side-effect-only-group.d.ts
@@ -0,0 +1,12 @@
+/**
+ * Checks if a group name represents a side-effect-only import group.
+ *
+ * Side-effect-only groups are 'side-effect' and 'side-effect-style', which
+ * contain imports executed only for their side effects without bindings.
+ *
+ * @param groupName - The group name to check.
+ * @returns True if the group is a side-effect-only group.
+ */
+export declare function isStringGroupSideEffectOnlyGroup(
+ groupName: string,
+): boolean
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/is-string-group-side-effect-only-group.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/is-string-group-side-effect-only-group.js
new file mode 100644
index 0000000000000000000000000000000000000000..3fb552eba0880807f444724bc99188c4f14c31df
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/is-string-group-side-effect-only-group.js
@@ -0,0 +1,13 @@
+/**
+ * Checks if a group name represents a side-effect-only import group.
+ *
+ * Side-effect-only groups are 'side-effect' and 'side-effect-style', which
+ * contain imports executed only for their side effects without bindings.
+ *
+ * @param groupName - The group name to check.
+ * @returns True if the group is a side-effect-only group.
+ */
+function isStringGroupSideEffectOnlyGroup(groupName) {
+ return groupName === 'side-effect' || groupName === 'side-effect-style'
+}
+export { isStringGroupSideEffectOnlyGroup }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/matches-tsconfig-paths.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/matches-tsconfig-paths.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..77e8403c390596c263891a2a0cc3119773affebb
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/matches-tsconfig-paths.d.ts
@@ -0,0 +1,20 @@
+import { ReadClosestTsConfigByPathValue } from './read-closest-ts-config-by-path.js'
+/**
+ * Checks if an import matches any of the path mappings in tsconfig.json.
+ *
+ * Path mappings allow custom module resolution (e.g., '@/_' → './src/_'). This
+ * function determines if an import uses such a mapped path.
+ *
+ * @param options - Configuration options.
+ * @param options.tsConfigOutput - Parsed TypeScript configuration with path
+ * mappings.
+ * @param options.name - Import module specifier to check.
+ * @returns True if the import matches a tsconfig path mapping.
+ */
+export declare function matchesTsconfigPaths({
+ tsConfigOutput,
+ name,
+}: {
+ tsConfigOutput: ReadClosestTsConfigByPathValue
+ name: string
+}): boolean
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/matches-tsconfig-paths.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/matches-tsconfig-paths.js
new file mode 100644
index 0000000000000000000000000000000000000000..60463ee6ef4fba0d3b0a614927f79c891ebb98b7
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/matches-tsconfig-paths.js
@@ -0,0 +1,53 @@
+/**
+ * Cache for compiled regex patterns from tsconfig paths. Avoids recompiling the
+ * same path patterns repeatedly.
+ */
+var regexByTsconfigPathCache = /* @__PURE__ */ new Map()
+/**
+ * Checks if an import matches any of the path mappings in tsconfig.json.
+ *
+ * Path mappings allow custom module resolution (e.g., '@/_' → './src/_'). This
+ * function determines if an import uses such a mapped path.
+ *
+ * @param options - Configuration options.
+ * @param options.tsConfigOutput - Parsed TypeScript configuration with path
+ * mappings.
+ * @param options.name - Import module specifier to check.
+ * @returns True if the import matches a tsconfig path mapping.
+ */
+function matchesTsconfigPaths({ tsConfigOutput, name }) {
+ if (!tsConfigOutput.compilerOptions.paths) {
+ return false
+ }
+ return Object.keys(tsConfigOutput.compilerOptions.paths).some(key =>
+ getRegexByTsconfigPath(key).test(name),
+ )
+}
+/**
+ * Converts a tsconfig path pattern into a regular expression.
+ *
+ * Handles wildcard patterns (e.g., '@/*' becomes regex that matches
+ * '@/anything'). Results are cached to avoid recompiling the same patterns.
+ *
+ * @param path - TSConfig path pattern with wildcards.
+ * @returns Compiled regex for matching imports.
+ */
+function getRegexByTsconfigPath(path) {
+ let existingRegex = regexByTsconfigPathCache.get(path)
+ if (existingRegex) {
+ return existingRegex
+ }
+ let regex = new RegExp(`^${escapeRegExp(path).replaceAll('*', '(.+)')}$`)
+ regexByTsconfigPathCache.set(path, regex)
+ return regex
+}
+/**
+ * Escapes special regex characters in a string.
+ *
+ * @param value - String to escape for use in regex.
+ * @returns Escaped string safe for regex construction.
+ */
+function escapeRegExp(value) {
+ return value.replaceAll(/[$+.?[\\\]]/gu, String.raw`\$&`)
+}
+export { matchesTsconfigPaths }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/read-closest-ts-config-by-path.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/read-closest-ts-config-by-path.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..f032e05f6a0e360d92b6ca53fa5143e566717c55
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/read-closest-ts-config-by-path.d.ts
@@ -0,0 +1,60 @@
+import { default as ts } from 'typescript'
+/**
+ * Heavily inspired from:
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-estree/src/parseSettings/getProjectConfigFiles.ts.
+ */
+/**
+ * Parsed TypeScript configuration with compiler options and module resolution
+ * cache.
+ */
+export interface ReadClosestTsConfigByPathValue {
+ /**
+ * TypeScript compiler options including path mappings and module resolution
+ * settings.
+ */
+ compilerOptions: ts.CompilerOptions
+ /**
+ * Module resolution cache for efficient repeated resolutions.
+ */
+ cache: ts.ModuleResolutionCache
+}
+/**
+ * Cache mapping directories to their nearest tsconfig file path. Speeds up
+ * config resolution for files in the same directory.
+ */
+export declare let directoryCacheByPath: Map
+/**
+ * Cache mapping file paths to their parsed tsconfig content. Prevents
+ * re-parsing the same config files multiple times.
+ */
+export declare let contentCacheByPath: Map<
+ string,
+ ReadClosestTsConfigByPathValue
+>
+/**
+ * Finds and parses the closest tsconfig.json file in the directory hierarchy.
+ *
+ * Searches upward from the file's directory until finding a tsconfig file or
+ * reaching the configured root directory. Results are cached for performance.
+ *
+ * @param options - Configuration options.
+ * @param options.tsconfigFilename - Name of the config file to search for
+ * (e.g., 'tsconfig.json').
+ * @param options.tsconfigRootDir - Root directory to stop searching at.
+ * @param options.contextCwd - Current working directory for module resolution.
+ * @param options.filePath - Path of the file to find config for.
+ * @returns Parsed TypeScript configuration or null if TypeScript is
+ * unavailable.
+ * @throws {Error} If no tsconfig file is found within the root directory.
+ */
+export declare function readClosestTsConfigByPath({
+ tsconfigFilename,
+ tsconfigRootDir,
+ contextCwd,
+ filePath,
+}: {
+ tsconfigFilename: string
+ tsconfigRootDir: string
+ contextCwd: string
+ filePath: string
+}): ReadClosestTsConfigByPathValue | null
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/read-closest-ts-config-by-path.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/read-closest-ts-config-by-path.js
new file mode 100644
index 0000000000000000000000000000000000000000..06f9ea2133ace296662cb8e3b36b5df59a3d22d2
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/read-closest-ts-config-by-path.js
@@ -0,0 +1,108 @@
+import { getTypescriptImport } from './get-typescript-import.js'
+import * as path from 'node:path'
+import * as fs from 'node:fs'
+/**
+ * Cache mapping directories to their nearest tsconfig file path. Speeds up
+ * config resolution for files in the same directory.
+ */
+var directoryCacheByPath = /* @__PURE__ */ new Map()
+/**
+ * Cache mapping file paths to their parsed tsconfig content. Prevents
+ * re-parsing the same config files multiple times.
+ */
+var contentCacheByPath = /* @__PURE__ */ new Map()
+/**
+ * Finds and parses the closest tsconfig.json file in the directory hierarchy.
+ *
+ * Searches upward from the file's directory until finding a tsconfig file or
+ * reaching the configured root directory. Results are cached for performance.
+ *
+ * @param options - Configuration options.
+ * @param options.tsconfigFilename - Name of the config file to search for
+ * (e.g., 'tsconfig.json').
+ * @param options.tsconfigRootDir - Root directory to stop searching at.
+ * @param options.contextCwd - Current working directory for module resolution.
+ * @param options.filePath - Path of the file to find config for.
+ * @returns Parsed TypeScript configuration or null if TypeScript is
+ * unavailable.
+ * @throws {Error} If no tsconfig file is found within the root directory.
+ */
+function readClosestTsConfigByPath({
+ tsconfigFilename,
+ tsconfigRootDir,
+ contextCwd,
+ filePath,
+}) {
+ let typescriptImport = getTypescriptImport()
+ if (!typescriptImport) {
+ return null
+ }
+ let directory = path.dirname(filePath)
+ let checkedDirectories = [directory]
+ do {
+ let tsconfigPath = path.join(directory, tsconfigFilename)
+ let cachedDirectory = directoryCacheByPath.get(directory)
+ if (!cachedDirectory && fs.existsSync(tsconfigPath)) {
+ cachedDirectory = tsconfigPath
+ }
+ if (cachedDirectory) {
+ for (let checkedDirectory of checkedDirectories) {
+ directoryCacheByPath.set(checkedDirectory, cachedDirectory)
+ }
+ return getCompilerOptions(typescriptImport, contextCwd, cachedDirectory)
+ }
+ directory = path.dirname(directory)
+ checkedDirectories.push(directory)
+ } while (directory.length > 1 && directory.length >= tsconfigRootDir.length)
+ throw new Error(
+ `Couldn't find any ${tsconfigFilename} relative to '${filePath}' within '${tsconfigRootDir}'.`,
+ )
+}
+/**
+ * Parses a TypeScript configuration file and extracts compiler options.
+ *
+ * Reads and validates the tsconfig file, then creates a module resolution cache
+ * for efficient import resolution. Results are cached to avoid re-parsing.
+ *
+ * @param typescriptImport - TypeScript library import.
+ * @param contextCwd - Current working directory for resolution.
+ * @param filePath - Path to the tsconfig file to parse.
+ * @returns Parsed compiler options and resolution cache.
+ * @throws {Error} If the config file cannot be read or parsed.
+ */
+function getCompilerOptions(typescriptImport, contextCwd, filePath) {
+ if (contentCacheByPath.has(filePath)) {
+ return contentCacheByPath.get(filePath)
+ }
+ let configFileRead = typescriptImport.readConfigFile(
+ filePath,
+ typescriptImport.sys.readFile,
+ )
+ if (configFileRead.error) {
+ throw new Error(
+ `Error reading tsconfig file: ${JSON.stringify(configFileRead.error)}`,
+ )
+ }
+ let parsedContent = typescriptImport.parseJsonConfigFileContent(
+ configFileRead.config,
+ typescriptImport.sys,
+ path.dirname(filePath),
+ )
+ if (parsedContent.errors.length > 0) {
+ throw new Error(
+ `Error getting compiler options: ${JSON.stringify(parsedContent.errors)}`,
+ )
+ }
+ let cache = typescriptImport.createModuleResolutionCache(
+ contextCwd,
+ fileName => typescriptImport.sys.resolvePath(fileName),
+ parsedContent.options,
+ )
+ let output = {
+ compilerOptions: parsedContent.options,
+ cache,
+ }
+ contentCacheByPath.set(filePath, output)
+ return output
+}
+export { contentCacheByPath, directoryCacheByPath, readClosestTsConfigByPath }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/types.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/types.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..35305d1be9e591bdda3fae964e5d46a178afadda
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/types.d.ts
@@ -0,0 +1,169 @@
+import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'
+import { TSESTree } from '@typescript-eslint/types'
+import { SortingNodeWithDependencies } from '../../utils/sort-nodes-by-dependencies.js'
+import { RegexOption, TypeOption } from '../../types/common-options.js'
+import { AllCommonOptions } from '../../types/all-common-options.js'
+/**
+ * Configuration options for the sort-imports rule.
+ *
+ * This rule enforces consistent ordering of import statements to improve code
+ * organization, readability, and maintainability.
+ */
+export type Options = Partial<
+ {
+ /**
+ * TypeScript configuration for resolving module paths. Enables path alias
+ * resolution based on tsconfig.json paths configuration.
+ */
+ tsconfig: {
+ /**
+ * Optional filename of the TypeScript config file. `@default`
+ * tsconfig.json'.
+ */
+ filename?: string
+ /**
+ * Root directory where to search for the TypeScript config file.
+ */
+ rootDir: string
+ }
+ /**
+ * Enables experimental dependency detection.
+ */
+ useExperimentalDependencyDetection: boolean
+ /**
+ * Patterns to identify internal imports. Imports matching these patterns
+ * are categorized as 'internal'.
+ */
+ internalPattern: RegexOption[]
+ /**
+ * Runtime environment for resolving built-in modules. Determines which
+ * modules are considered built-in.
+ *
+ * @default 'node'
+ */
+ environment: 'node' | 'bun'
+ /**
+ * Controls whether side-effect imports should be sorted. When false,
+ * side-effect imports remain in their original positions.
+ *
+ * @default false
+ */
+ sortSideEffects: boolean
+ /**
+ * Maximum line length for imports. When exceeded, import names are used for
+ * sorting instead of the entire line.
+ */
+ maxLineLength: number
+ } & AllCommonOptions<
+ CustomTypeOption,
+ AdditionalSortOptions,
+ CustomGroupMatchOptions
+ >
+>[]
+/**
+ * Represents a sorting node for an import statement. Extends the base sorting
+ * node with dependency information and ignore flag.
+ */
+export interface SortImportsSortingNode extends SortingNodeWithDependencies {
+ /**
+ * The name of the import specifier for sorting purposes.
+ */
+ specifierName: string | null
+ /**
+ * Whether this import is a type-only import.
+ */
+ isTypeImport: boolean
+ /**
+ * Whether this import should be ignored during sorting. Typically true for
+ * side-effect imports when sortSideEffects is false.
+ */
+ isIgnored: boolean
+}
+export type SortImportsNode =
+ | TSESTree.TSImportEqualsDeclaration
+ | TSESTree.VariableDeclaration
+ | TSESTree.ImportDeclaration
+/**
+ * Union type of all available import selectors. Used to categorize different
+ * types of import statements.
+ */
+export type Selector = (typeof allSelectors)[number]
+/**
+ * Union type of all available import modifiers. Used to identify specific
+ * characteristics of import statements.
+ */
+export type Modifier = (typeof allModifiers)[number]
+/**
+ * Additional configuration for a single custom group.
+ *
+ * @example
+ *
+ * ```ts
+ * {
+ * "modifiers": ["type"],
+ * "selector": "external"
+ * }
+ * ```
+ */
+interface CustomGroupMatchOptions {
+ /**
+ * List of modifiers that imports must have to be included in this group.
+ */
+ modifiers?: Modifier[]
+ /**
+ * The selector type that imports must match to be included in this group.
+ */
+ selector?: Selector
+}
+interface AdditionalSortOptions {
+ sortBy: SortByOption
+}
+type CustomTypeOption = 'type-import-first' | TypeOption
+/**
+ * Complete list of available active import selectors. Used for validation and
+ * JSON schema generation.
+ */
+export declare let allSelectors: readonly [
+ 'side-effect-style',
+ 'tsconfig-path',
+ 'side-effect',
+ 'external',
+ 'internal',
+ 'builtin',
+ 'sibling',
+ 'subpath',
+ 'import',
+ 'parent',
+ 'index',
+ 'style',
+ 'type',
+]
+/**
+ * Complete list of available import modifiers. Used for validation and JSON
+ * schema generation.
+ */
+export declare let allModifiers: readonly [
+ 'default',
+ 'multiline',
+ 'named',
+ 'require',
+ 'side-effect',
+ 'singleline',
+ 'ts-equals',
+ 'type',
+ 'value',
+ 'wildcard',
+]
+/**
+ * Ideally, we should generate as many schemas as there are selectors, and
+ * ensure that users do not enter invalid modifiers for a given selector.
+ */
+export declare let additionalCustomGroupMatchOptionsJsonSchema: Record<
+ string,
+ JSONSchema4
+>
+declare const SORT_BY_OPTION: readonly ['specifier', 'path']
+type SortByOption = (typeof SORT_BY_OPTION)[number]
+export declare let additionalSortOptionsJsonSchema: Record
+export declare const TYPE_IMPORT_FIRST_TYPE_OPTION = 'type-import-first'
+export {}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/types.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/types.js
new file mode 100644
index 0000000000000000000000000000000000000000..ec698cc7ca7cc90d90c9a2cb3c99b322366a9259
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/types.js
@@ -0,0 +1,61 @@
+import {
+ buildCustomGroupModifiersJsonSchema,
+ buildCustomGroupSelectorJsonSchema,
+} from '../../utils/json-schemas/common-groups-json-schemas.js'
+/**
+ * Complete list of available active import selectors. Used for validation and
+ * JSON schema generation.
+ */
+var allSelectors = [
+ 'side-effect-style',
+ 'tsconfig-path',
+ 'side-effect',
+ 'external',
+ 'internal',
+ 'builtin',
+ 'sibling',
+ 'subpath',
+ 'import',
+ 'parent',
+ 'index',
+ 'style',
+ 'type',
+]
+/**
+ * Complete list of available import modifiers. Used for validation and JSON
+ * schema generation.
+ */
+var allModifiers = [
+ 'default',
+ 'multiline',
+ 'named',
+ 'require',
+ 'side-effect',
+ 'singleline',
+ 'ts-equals',
+ 'type',
+ 'value',
+ 'wildcard',
+]
+/**
+ * Ideally, we should generate as many schemas as there are selectors, and
+ * ensure that users do not enter invalid modifiers for a given selector.
+ */
+var additionalCustomGroupMatchOptionsJsonSchema = {
+ modifiers: buildCustomGroupModifiersJsonSchema(allModifiers),
+ selector: buildCustomGroupSelectorJsonSchema(allSelectors),
+}
+var additionalSortOptionsJsonSchema = {
+ sortBy: {
+ enum: [...['specifier', 'path']],
+ type: 'string',
+ },
+}
+var TYPE_IMPORT_FIRST_TYPE_OPTION = 'type-import-first'
+export {
+ TYPE_IMPORT_FIRST_TYPE_OPTION,
+ additionalCustomGroupMatchOptionsJsonSchema,
+ additionalSortOptionsJsonSchema,
+ allModifiers,
+ allSelectors,
+}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/validate-side-effects-config.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/validate-side-effects-config.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..04e54f7ccd3db4fe56691de080948f622820d6a3
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/validate-side-effects-config.d.ts
@@ -0,0 +1,21 @@
+import { GroupsOptions } from '../../types/common-groups-options.js'
+/**
+ * Validates that side-effect import groups are configured correctly.
+ *
+ * When sortSideEffects is false, side-effect imports must be in standalone
+ * groups, not mixed with regular imports. This prevents unintended reordering
+ * that could break code execution order.
+ *
+ * @param options - Options for validating side-effect groups.
+ * @param options.groups - Import group configuration.
+ * @param options.sortSideEffects - Whether side-effect imports can be sorted.
+ * @throws {Error} If side-effect groups are incorrectly nested with regular
+ * groups.
+ */
+export declare function validateSideEffectsConfig({
+ sortSideEffects,
+ groups,
+}: {
+ sortSideEffects: boolean
+ groups: GroupsOptions
+}): void
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/validate-side-effects-config.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/validate-side-effects-config.js
new file mode 100644
index 0000000000000000000000000000000000000000..193d823ace6d7f999b9b0f8a80a4db54d57df3a2
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-imports/validate-side-effects-config.js
@@ -0,0 +1,38 @@
+import { computeGroupsNames } from '../../utils/compute-groups-names.js'
+import { isStringGroupSideEffectOnlyGroup } from './is-string-group-side-effect-only-group.js'
+import { isSideEffectOnlyGroup } from './is-side-effect-only-group.js'
+/**
+ * Validates that side-effect import groups are configured correctly.
+ *
+ * When sortSideEffects is false, side-effect imports must be in standalone
+ * groups, not mixed with regular imports. This prevents unintended reordering
+ * that could break code execution order.
+ *
+ * @param options - Options for validating side-effect groups.
+ * @param options.groups - Import group configuration.
+ * @param options.sortSideEffects - Whether side-effect imports can be sorted.
+ * @throws {Error} If side-effect groups are incorrectly nested with regular
+ * groups.
+ */
+function validateSideEffectsConfig({ sortSideEffects, groups }) {
+ if (sortSideEffects) {
+ return
+ }
+ if (
+ groups
+ .map(group => computeGroupsNames([group]))
+ .some(
+ nestedGroup =>
+ hasSideEffectGroup(nestedGroup) &&
+ !isSideEffectOnlyGroup(nestedGroup),
+ )
+ ) {
+ throw new Error(
+ "Side effect groups cannot be nested with non side effect groups when 'sortSideEffects' is 'false'.",
+ )
+ }
+}
+function hasSideEffectGroup(stringGroups) {
+ return stringGroups.some(isStringGroupSideEffectOnlyGroup)
+}
+export { validateSideEffectsConfig }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-interfaces.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-interfaces.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..07082473834f420ba24dcadd7268d9027f4ec7ff
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-interfaces.d.ts
@@ -0,0 +1,20 @@
+declare const ORDER_ERROR_ID = 'unexpectedInterfacePropertiesOrder'
+declare const GROUP_ORDER_ERROR_ID = 'unexpectedInterfacePropertiesGroupOrder'
+declare const EXTRA_SPACING_ERROR_ID = 'extraSpacingBetweenInterfaceMembers'
+declare const MISSED_SPACING_ERROR_ID = 'missedSpacingBetweenInterfaceMembers'
+type MessageId =
+ | typeof MISSED_SPACING_ERROR_ID
+ | typeof EXTRA_SPACING_ERROR_ID
+ | typeof GROUP_ORDER_ERROR_ID
+ | typeof ORDER_ERROR_ID
+declare const _default: import('@typescript-eslint/utils/ts-eslint').RuleModule<
+ MessageId,
+ import('...js').SortObjectTypesOptions,
+ {
+ recommended?: boolean
+ },
+ import('@typescript-eslint/utils/ts-eslint').RuleListener
+> & {
+ name: string
+}
+export default _default
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-interfaces.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-interfaces.js
new file mode 100644
index 0000000000000000000000000000000000000000..622f22a87b8671d8a838f96b6bf8b6604203ee39
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-interfaces.js
@@ -0,0 +1,56 @@
+import {
+ EXTRA_SPACING_ERROR,
+ GROUP_ORDER_ERROR,
+ MISSED_SPACING_ERROR,
+ ORDER_ERROR,
+} from '../utils/report-errors.js'
+import { buildAstListeners } from '../utils/build-ast-listeners.js'
+import { createEslintRule } from '../utils/create-eslint-rule.js'
+import { sortObjectTypeElements } from './sort-object-types/sort-object-type-elements.js'
+import { defaultOptions, jsonSchema } from './sort-object-types.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+var ORDER_ERROR_ID = 'unexpectedInterfacePropertiesOrder'
+var GROUP_ORDER_ERROR_ID = 'unexpectedInterfacePropertiesGroupOrder'
+var EXTRA_SPACING_ERROR_ID = 'extraSpacingBetweenInterfaceMembers'
+var MISSED_SPACING_ERROR_ID = 'missedSpacingBetweenInterfaceMembers'
+var sort_interfaces_default = createEslintRule({
+ meta: {
+ messages: {
+ [MISSED_SPACING_ERROR_ID]: MISSED_SPACING_ERROR,
+ [EXTRA_SPACING_ERROR_ID]: EXTRA_SPACING_ERROR,
+ [GROUP_ORDER_ERROR_ID]: GROUP_ORDER_ERROR,
+ [ORDER_ERROR_ID]: ORDER_ERROR,
+ },
+ docs: {
+ url: 'https://perfectionist.dev/rules/sort-interfaces',
+ description: 'Enforce sorted interface properties.',
+ recommended: true,
+ },
+ schema: jsonSchema,
+ type: 'suggestion',
+ fixable: 'code',
+ },
+ create: context =>
+ buildAstListeners({
+ nodeTypes: [AST_NODE_TYPES.TSInterfaceDeclaration],
+ sorter: sortInterface,
+ context,
+ }),
+ defaultOptions: [defaultOptions],
+ name: 'sort-interfaces',
+})
+function sortInterface({ matchedAstSelectors, context, node }) {
+ sortObjectTypeElements({
+ availableMessageIds: {
+ missedSpacingBetweenMembers: MISSED_SPACING_ERROR_ID,
+ extraSpacingBetweenMembers: EXTRA_SPACING_ERROR_ID,
+ unexpectedGroupOrder: GROUP_ORDER_ERROR_ID,
+ unexpectedOrder: ORDER_ERROR_ID,
+ },
+ elements: node.body.body,
+ matchedAstSelectors,
+ parentNodes: [node],
+ context,
+ })
+}
+export { sort_interfaces_default as default }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-interfaces/types.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-interfaces/types.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..6cb89224d0d54aa4b61a4f4d76f9563838a0a15c
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-interfaces/types.d.ts
@@ -0,0 +1,2 @@
+import { Options as SortObjectTypesOptions } from '../sort-object-types/types.js'
+export type Options = SortObjectTypesOptions
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-intersection-types.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-intersection-types.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..ca4a7ecb6eb07ca8ac5f5130e93141614f752da3
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-intersection-types.d.ts
@@ -0,0 +1,21 @@
+import { Options } from './sort-intersection-types/types.js'
+declare const ORDER_ERROR_ID = 'unexpectedIntersectionTypesOrder'
+declare const GROUP_ORDER_ERROR_ID = 'unexpectedIntersectionTypesGroupOrder'
+declare const EXTRA_SPACING_ERROR_ID = 'extraSpacingBetweenIntersectionTypes'
+declare const MISSED_SPACING_ERROR_ID = 'missedSpacingBetweenIntersectionTypes'
+type MessageId =
+ | typeof MISSED_SPACING_ERROR_ID
+ | typeof EXTRA_SPACING_ERROR_ID
+ | typeof GROUP_ORDER_ERROR_ID
+ | typeof ORDER_ERROR_ID
+declare const _default: import('@typescript-eslint/utils/ts-eslint').RuleModule<
+ MessageId,
+ Options,
+ {
+ recommended?: boolean
+ },
+ import('@typescript-eslint/utils/ts-eslint').RuleListener
+> & {
+ name: string
+}
+export default _default
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-intersection-types.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-intersection-types.js
new file mode 100644
index 0000000000000000000000000000000000000000..0d53136389d8b6f7930bb4cbec25b0d788c036ae
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-intersection-types.js
@@ -0,0 +1,79 @@
+import {
+ EXTRA_SPACING_ERROR,
+ GROUP_ORDER_ERROR,
+ MISSED_SPACING_ERROR,
+ ORDER_ERROR,
+} from '../utils/report-errors.js'
+import { buildAstListeners } from '../utils/build-ast-listeners.js'
+import { createEslintRule } from '../utils/create-eslint-rule.js'
+import { sortUnionOrIntersectionTypes } from './sort-union-or-intersection-types/sort-union-or-intersection-types.js'
+import { buildJsonSchema } from './sort-union-or-intersection-types/build-json-schema.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Cache computed groups by modifiers and selectors for performance.
+ */
+var cachedGroupsByModifiersAndSelectors = /* @__PURE__ */ new Map()
+var ORDER_ERROR_ID = 'unexpectedIntersectionTypesOrder'
+var GROUP_ORDER_ERROR_ID = 'unexpectedIntersectionTypesGroupOrder'
+var EXTRA_SPACING_ERROR_ID = 'extraSpacingBetweenIntersectionTypes'
+var MISSED_SPACING_ERROR_ID = 'missedSpacingBetweenIntersectionTypes'
+var defaultOptions = {
+ fallbackSort: { type: 'unsorted' },
+ newlinesInside: 'newlinesBetween',
+ ignoreCallableTypes: true,
+ specialCharacters: 'keep',
+ newlinesBetween: 'ignore',
+ partitionByComment: false,
+ partitionByNewLine: false,
+ useConfigurationIf: {},
+ type: 'alphabetical',
+ ignoreCase: true,
+ locales: 'en-US',
+ customGroups: [],
+ alphabet: '',
+ order: 'asc',
+ groups: [],
+}
+var sort_intersection_types_default = createEslintRule({
+ meta: {
+ messages: {
+ [MISSED_SPACING_ERROR_ID]: MISSED_SPACING_ERROR,
+ [EXTRA_SPACING_ERROR_ID]: EXTRA_SPACING_ERROR,
+ [GROUP_ORDER_ERROR_ID]: GROUP_ORDER_ERROR,
+ [ORDER_ERROR_ID]: ORDER_ERROR,
+ },
+ docs: {
+ url: 'https://perfectionist.dev/rules/sort-intersection-types',
+ description: 'Enforce sorted intersection types.',
+ recommended: true,
+ },
+ schema: buildJsonSchema({ ignoreCallableTypes: true }),
+ type: 'suggestion',
+ fixable: 'code',
+ },
+ create: context =>
+ buildAstListeners({
+ nodeTypes: [AST_NODE_TYPES.TSIntersectionType],
+ sorter: sortIntersectionType,
+ context,
+ }),
+ defaultOptions: [defaultOptions],
+ name: 'sort-intersection-types',
+})
+function sortIntersectionType({ matchedAstSelectors, context, node }) {
+ sortUnionOrIntersectionTypes({
+ availableMessageIds: {
+ missedSpacingBetweenMembers: MISSED_SPACING_ERROR_ID,
+ extraSpacingBetweenMembers: EXTRA_SPACING_ERROR_ID,
+ unexpectedGroupOrder: GROUP_ORDER_ERROR_ID,
+ unexpectedOrder: ORDER_ERROR_ID,
+ },
+ cachedGroupsByModifiersAndSelectors,
+ tokenValueToIgnoreBefore: '&',
+ matchedAstSelectors,
+ defaultOptions,
+ context,
+ node,
+ })
+}
+export { sort_intersection_types_default as default }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-intersection-types/types.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-intersection-types/types.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..2c6e833ed4ccac1a3bc12e4d79ba1ce6f0d95007
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-intersection-types/types.d.ts
@@ -0,0 +1,10 @@
+import { Options as SortUnionTypesOptions } from '../sort-union-types/types.js'
+export type Options = (Partial<{
+ /**
+ * When true, skips sorting intersection members that contain callable types
+ * (function types, constructor types, or objects with call/method
+ * signatures) to preserve TypeScript's overload resolution order.
+ */
+ ignoreCallableTypes: boolean
+}> &
+ SortUnionTypesOptions[number])[]
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-jsx-props.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-jsx-props.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..a69b8570e12a604b12e90fd514a09e0fcdd6d371
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-jsx-props.d.ts
@@ -0,0 +1,12 @@
+import { MessageId, Options } from './sort-jsx-props/types.js'
+declare const _default: import('@typescript-eslint/utils/ts-eslint').RuleModule<
+ MessageId,
+ Options,
+ {
+ recommended?: boolean
+ },
+ import('@typescript-eslint/utils/ts-eslint').RuleListener
+> & {
+ name: string
+}
+export default _default
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-jsx-props.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-jsx-props.js
new file mode 100644
index 0000000000000000000000000000000000000000..ad5f06989204ec3879ae207b20aa8cbccf559ec7
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-jsx-props.js
@@ -0,0 +1,76 @@
+import {
+ buildCommonJsonSchemas,
+ buildRegexJsonSchema,
+ buildUseConfigIfJsonSchema,
+ matchesAstSelectorJsonSchema,
+} from '../utils/json-schemas/common-json-schemas.js'
+import { buildCommonGroupsJsonSchemas } from '../utils/json-schemas/common-groups-json-schemas.js'
+import {
+ EXTRA_SPACING_ERROR,
+ GROUP_ORDER_ERROR,
+ MISSED_SPACING_ERROR,
+ ORDER_ERROR,
+} from '../utils/report-errors.js'
+import { partitionByNewlineJsonSchema } from '../utils/json-schemas/common-partition-json-schemas.js'
+import { buildAstListeners } from '../utils/build-ast-listeners.js'
+import { createEslintRule } from '../utils/create-eslint-rule.js'
+import {
+ EXTRA_SPACING_ERROR_ID,
+ GROUP_ORDER_ERROR_ID,
+ MISSED_SPACING_ERROR_ID,
+ ORDER_ERROR_ID,
+ additionalCustomGroupMatchOptionsJsonSchema,
+} from './sort-jsx-props/types.js'
+import {
+ defaultOptions,
+ sortJsxObject,
+} from './sort-jsx-props/sort-jsx-object.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+var sort_jsx_props_default = createEslintRule({
+ meta: {
+ schema: {
+ items: {
+ properties: {
+ ...buildCommonJsonSchemas(),
+ ...buildCommonGroupsJsonSchemas({
+ additionalCustomGroupMatchProperties:
+ additionalCustomGroupMatchOptionsJsonSchema,
+ }),
+ useConfigurationIf: buildUseConfigIfJsonSchema({
+ additionalProperties: {
+ matchesAstSelector: matchesAstSelectorJsonSchema,
+ tagMatchesPattern: buildRegexJsonSchema(),
+ },
+ }),
+ partitionByNewLine: partitionByNewlineJsonSchema,
+ },
+ additionalProperties: false,
+ type: 'object',
+ },
+ uniqueItems: true,
+ type: 'array',
+ },
+ messages: {
+ [MISSED_SPACING_ERROR_ID]: MISSED_SPACING_ERROR,
+ [EXTRA_SPACING_ERROR_ID]: EXTRA_SPACING_ERROR,
+ [GROUP_ORDER_ERROR_ID]: GROUP_ORDER_ERROR,
+ [ORDER_ERROR_ID]: ORDER_ERROR,
+ },
+ docs: {
+ url: 'https://perfectionist.dev/rules/sort-jsx-props',
+ description: 'Enforce sorted JSX props.',
+ recommended: true,
+ },
+ type: 'suggestion',
+ fixable: 'code',
+ },
+ create: context =>
+ buildAstListeners({
+ nodeTypes: [AST_NODE_TYPES.JSXElement],
+ sorter: sortJsxObject,
+ context,
+ }),
+ defaultOptions: [defaultOptions],
+ name: 'sort-jsx-props',
+})
+export { sort_jsx_props_default as default }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-jsx-props/compute-matched-context-options.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-jsx-props/compute-matched-context-options.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..439570edcf85c84a2e4f593a2e080064a03969d1
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-jsx-props/compute-matched-context-options.d.ts
@@ -0,0 +1,24 @@
+import { TSESTree } from '@typescript-eslint/types'
+import { TSESLint } from '@typescript-eslint/utils'
+import { Options } from './types.js'
+/**
+ * Computes the matched context options for a given JSX element node.
+ *
+ * @param params - Parameters.
+ * @param params.matchedAstSelectors - The matched AST selectors for a JSX node.
+ * @param params.sourceCode - The source code object.
+ * @param params.node - The JSX element node to evaluate.
+ * @param params.context - The rule context.
+ * @returns The matched context options or undefined if none match.
+ */
+export declare function computeMatchedContextOptions({
+ matchedAstSelectors,
+ sourceCode,
+ context,
+ node,
+}: {
+ context: TSESLint.RuleContext
+ matchedAstSelectors: ReadonlySet
+ sourceCode: TSESLint.SourceCode
+ node: TSESTree.JSXElement
+}): Options[number] | undefined
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-jsx-props/compute-matched-context-options.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-jsx-props/compute-matched-context-options.js
new file mode 100644
index 0000000000000000000000000000000000000000..336e3ffcee35d68359e3219cb7973179f61cba8e
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-jsx-props/compute-matched-context-options.js
@@ -0,0 +1,74 @@
+import { matches } from '../../utils/matches.js'
+import { passesAllNamesMatchPatternFilter } from '../../utils/context-matching/passes-all-names-match-pattern-filter.js'
+import { passesAstSelectorFilter } from '../../utils/context-matching/passes-ast-selector-filter.js'
+import { computeNodeName } from './compute-node-name.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Computes the matched context options for a given JSX element node.
+ *
+ * @param params - Parameters.
+ * @param params.matchedAstSelectors - The matched AST selectors for a JSX node.
+ * @param params.sourceCode - The source code object.
+ * @param params.node - The JSX element node to evaluate.
+ * @param params.context - The rule context.
+ * @returns The matched context options or undefined if none match.
+ */
+function computeMatchedContextOptions({
+ matchedAstSelectors,
+ sourceCode,
+ context,
+ node,
+}) {
+ let nodeNames = node.openingElement.attributes
+ .filter(attribute => attribute.type !== AST_NODE_TYPES.JSXSpreadAttribute)
+ .map(attribute => computeNodeName(attribute))
+ return context.options.find(options =>
+ isContextOptionMatching({
+ matchedAstSelectors,
+ sourceCode,
+ nodeNames,
+ options,
+ node,
+ }),
+ )
+}
+function isContextOptionMatching({
+ matchedAstSelectors,
+ sourceCode,
+ nodeNames,
+ options,
+ node,
+}) {
+ if (!options.useConfigurationIf) {
+ return true
+ }
+ return (
+ passesAllNamesMatchPatternFilter({
+ allNamesMatchPattern: options.useConfigurationIf.allNamesMatchPattern,
+ nodeNames,
+ }) &&
+ passesTagMatchesPatternFilter({
+ tagMatchesPattern: options.useConfigurationIf.tagMatchesPattern,
+ sourceCode,
+ node,
+ }) &&
+ passesAstSelectorFilter({
+ matchesAstSelector: options.useConfigurationIf.matchesAstSelector,
+ matchedAstSelectors,
+ })
+ )
+}
+function passesTagMatchesPatternFilter({
+ tagMatchesPattern,
+ sourceCode,
+ node,
+}) {
+ if (!tagMatchesPattern) {
+ return true
+ }
+ return matches(
+ sourceCode.getText(node.openingElement.name),
+ tagMatchesPattern,
+ )
+}
+export { computeMatchedContextOptions }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-jsx-props/compute-node-name.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-jsx-props/compute-node-name.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..ce495a3285a143d4d65e78d0136109b19a09a47f
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-jsx-props/compute-node-name.d.ts
@@ -0,0 +1,8 @@
+import { TSESTree } from '@typescript-eslint/types'
+/**
+ * Computes the name of a JSX attribute node.
+ *
+ * @param node - The JSX attribute node.
+ * @returns The computed name of the JSX attribute.
+ */
+export declare function computeNodeName(node: TSESTree.JSXAttribute): string
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-jsx-props/compute-node-name.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-jsx-props/compute-node-name.js
new file mode 100644
index 0000000000000000000000000000000000000000..94d97b0250aa2435c3800452e5df16ae1b38ee7f
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-jsx-props/compute-node-name.js
@@ -0,0 +1,20 @@
+import { UnreachableCaseError } from '../../utils/unreachable-case-error.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Computes the name of a JSX attribute node.
+ *
+ * @param node - The JSX attribute node.
+ * @returns The computed name of the JSX attribute.
+ */
+function computeNodeName(node) {
+ switch (node.name.type) {
+ case AST_NODE_TYPES.JSXNamespacedName:
+ return `${node.name.namespace.name}:${node.name.name.name}`
+ case AST_NODE_TYPES.JSXIdentifier:
+ return node.name.name
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(node.name)
+ }
+}
+export { computeNodeName }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-jsx-props/sort-jsx-object.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-jsx-props/sort-jsx-object.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..dd78565aeb70b53d106375751b5ac59d94389f86
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-jsx-props/sort-jsx-object.d.ts
@@ -0,0 +1,13 @@
+import { TSESTree } from '@typescript-eslint/types'
+import { TSESLint } from '@typescript-eslint/utils'
+import { MessageId, Options } from './types.js'
+export declare let defaultOptions: Required
+export declare function sortJsxObject({
+ matchedAstSelectors,
+ context,
+ node,
+}: {
+ context: Readonly>
+ matchedAstSelectors: ReadonlySet
+ node: TSESTree.JSXElement
+}): void
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-jsx-props/sort-jsx-object.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-jsx-props/sort-jsx-object.js
new file mode 100644
index 0000000000000000000000000000000000000000..2a08d6021df4bfbfdb2282f4c24dc75a66c2b16d
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-jsx-props/sort-jsx-object.js
@@ -0,0 +1,167 @@
+import { defaultComparatorByOptionsComputer } from '../../utils/compare/default-comparator-by-options-computer.js'
+import { validateNewlinesAndPartitionConfig } from '../../utils/validate-newlines-and-partition-config.js'
+import { buildOptionsByGroupIndexComputer } from '../../utils/build-options-by-group-index-computer.js'
+import { validateCustomSortConfig } from '../../utils/validate-custom-sort-config.js'
+import { generatePredefinedGroups } from '../../utils/generate-predefined-groups.js'
+import { getEslintDisabledLines } from '../../utils/get-eslint-disabled-lines.js'
+import { doesCustomGroupMatch } from '../../utils/does-custom-group-match.js'
+import { isNodeEslintDisabled } from '../../utils/is-node-eslint-disabled.js'
+import { validateGroupsConfig } from '../../utils/validate-groups-config.js'
+import { sortNodesByGroups } from '../../utils/sort-nodes-by-groups.js'
+import { reportAllErrors } from '../../utils/report-all-errors.js'
+import { shouldPartition } from '../../utils/should-partition.js'
+import { computeGroup } from '../../utils/compute-group.js'
+import { rangeToDiff } from '../../utils/range-to-diff.js'
+import { getSettings } from '../../utils/get-settings.js'
+import { isSortable } from '../../utils/is-sortable.js'
+import { complete } from '../../utils/complete.js'
+import { isNodeOnSingleLine } from '../../utils/is-node-on-single-line.js'
+import {
+ EXTRA_SPACING_ERROR_ID,
+ GROUP_ORDER_ERROR_ID,
+ MISSED_SPACING_ERROR_ID,
+ ORDER_ERROR_ID,
+ allModifiers,
+ allSelectors,
+} from './types.js'
+import { computeNodeName } from './compute-node-name.js'
+import { computeMatchedContextOptions } from './compute-matched-context-options.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Cache computed groups by modifiers and selectors for performance.
+ */
+var cachedGroupsByModifiersAndSelectors = /* @__PURE__ */ new Map()
+var defaultOptions = {
+ fallbackSort: { type: 'unsorted' },
+ newlinesInside: 'newlinesBetween',
+ specialCharacters: 'keep',
+ newlinesBetween: 'ignore',
+ partitionByNewLine: false,
+ useConfigurationIf: {},
+ type: 'alphabetical',
+ ignoreCase: true,
+ customGroups: [],
+ locales: 'en-US',
+ alphabet: '',
+ order: 'asc',
+ groups: [],
+}
+function sortJsxObject({ matchedAstSelectors, context, node }) {
+ if (!isSortable(node.openingElement.attributes)) {
+ return
+ }
+ let { sourceCode, id } = context
+ let settings = getSettings(context.settings)
+ let matchedContextOptions = computeMatchedContextOptions({
+ matchedAstSelectors,
+ sourceCode,
+ context,
+ node,
+ })
+ let options = complete(matchedContextOptions, settings, defaultOptions)
+ validateCustomSortConfig(options)
+ validateGroupsConfig({
+ selectors: allSelectors,
+ modifiers: allModifiers,
+ options,
+ })
+ validateNewlinesAndPartitionConfig(options)
+ let eslintDisabledLines = getEslintDisabledLines({
+ ruleName: id,
+ sourceCode,
+ })
+ let optionsByGroupIndexComputer = buildOptionsByGroupIndexComputer(options)
+ let formattedMembers = node.openingElement.attributes.reduce(
+ (accumulator, attribute) => {
+ if (attribute.type === AST_NODE_TYPES.JSXSpreadAttribute) {
+ accumulator.push([])
+ return accumulator
+ }
+ let name = computeNodeName(attribute)
+ let selectors = []
+ let modifiers = []
+ if (attribute.value === null) {
+ modifiers.push('shorthand')
+ }
+ if (!isNodeOnSingleLine(attribute)) {
+ modifiers.push('multiline')
+ }
+ selectors.push('prop')
+ let predefinedGroups = generatePredefinedGroups({
+ cache: cachedGroupsByModifiersAndSelectors,
+ selectors,
+ modifiers,
+ })
+ let group = computeGroup({
+ customGroupMatcher: customGroup =>
+ doesCustomGroupMatch({
+ elementValue:
+ attribute.value ? sourceCode.getText(attribute.value) : null,
+ elementName: name,
+ customGroup,
+ selectors,
+ modifiers,
+ }),
+ predefinedGroups,
+ options,
+ })
+ let sortingNode = {
+ isEslintDisabled: isNodeEslintDisabled(attribute, eslintDisabledLines),
+ size: rangeToDiff(attribute, sourceCode),
+ node: attribute,
+ group,
+ name,
+ }
+ let lastSortingNode = accumulator.at(-1)?.at(-1)
+ if (
+ shouldPartition({
+ options: {
+ partitionByNewLine: options.partitionByNewLine,
+ partitionByComment: false,
+ },
+ lastSortingNode,
+ sortingNode,
+ sourceCode,
+ })
+ ) {
+ accumulator.push([])
+ }
+ accumulator.at(-1).push({
+ ...sortingNode,
+ partitionId: accumulator.length,
+ })
+ return accumulator
+ },
+ [[]],
+ )
+ for (let currentNodes of formattedMembers) {
+ function createSortNodesExcludingEslintDisabled(nodes) {
+ return function (ignoreEslintDisabledNodes) {
+ return sortNodesByGroups({
+ comparatorByOptionsComputer: defaultComparatorByOptionsComputer,
+ optionsByGroupIndexComputer,
+ ignoreEslintDisabledNodes,
+ groups: options.groups,
+ nodes,
+ })
+ }
+ }
+ reportAllErrors({
+ availableMessageIds: {
+ missedSpacingBetweenMembers: MISSED_SPACING_ERROR_ID,
+ extraSpacingBetweenMembers: EXTRA_SPACING_ERROR_ID,
+ unexpectedGroupOrder: GROUP_ORDER_ERROR_ID,
+ unexpectedOrder: ORDER_ERROR_ID,
+ },
+ sortNodesExcludingEslintDisabled:
+ createSortNodesExcludingEslintDisabled(currentNodes),
+ options: {
+ ...options,
+ partitionByComment: false,
+ },
+ nodes: currentNodes,
+ context,
+ })
+ }
+}
+export { defaultOptions, sortJsxObject }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-jsx-props/types.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-jsx-props/types.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..7b56514887295877dbc3c2d2844069aeb775a895
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-jsx-props/types.d.ts
@@ -0,0 +1,111 @@
+import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'
+import { RegexOption, TypeOption } from '../../types/common-options.js'
+import { AllCommonOptions } from '../../types/all-common-options.js'
+export type MessageId =
+ | typeof MISSED_SPACING_ERROR_ID
+ | typeof EXTRA_SPACING_ERROR_ID
+ | typeof GROUP_ORDER_ERROR_ID
+ | typeof ORDER_ERROR_ID
+export declare const ORDER_ERROR_ID = 'unexpectedJSXPropsOrder'
+export declare const GROUP_ORDER_ERROR_ID = 'unexpectedJSXPropsGroupOrder'
+export declare const EXTRA_SPACING_ERROR_ID =
+ 'extraSpacingBetweenJSXPropsMembers'
+export declare const MISSED_SPACING_ERROR_ID =
+ 'missedSpacingBetweenJSXPropsMembers'
+/**
+ * Configuration options for the sort-jsx-props rule.
+ *
+ * This rule enforces consistent ordering of JSX element props/attributes to
+ * improve code readability and maintainability.
+ */
+export type Options = Partial<
+ {
+ /**
+ * Conditional configuration based on pattern matching. Allows applying the
+ * rule only to specific JSX elements.
+ */
+ useConfigurationIf: {
+ /**
+ * Regular expression pattern to match against all prop names. The rule
+ * is only applied when all prop names match this pattern.
+ */
+ allNamesMatchPattern?: RegexOption
+ /**
+ * Regular expression pattern to match against JSX element tag names.
+ * The rule is only applied to elements with matching tag names.
+ */
+ tagMatchesPattern?: RegexOption
+ /**
+ * AST selector to match against JSXElement nodes.
+ */
+ matchesAstSelector?: string
+ }
+ } & Omit<
+ AllCommonOptions<
+ TypeOption,
+ AdditionalSortOptions,
+ CustomGroupMatchOptions
+ >,
+ 'partitionByComment'
+ >
+>[]
+/**
+ * Union type of all available JSX prop modifiers. Used to identify specific
+ * characteristics of JSX props.
+ */
+export type Modifier = (typeof allModifiers)[number]
+/**
+ * Union type of all available JSX prop selectors. Used to categorize different
+ * types of JSX props.
+ */
+export type Selector = (typeof allSelectors)[number]
+/**
+ * Additional configuration for a single custom group.
+ *
+ * @example
+ *
+ * ```ts
+ * {
+ * "selector": "prop",
+ * "modifiers": ["shorthand"]
+ * }
+ * ```
+ */
+interface CustomGroupMatchOptions {
+ /**
+ * Regular expression pattern to match prop values. Props with values
+ * matching this pattern will be included in this custom group.
+ */
+ elementValuePattern?: RegexOption
+ /**
+ * List of modifiers that props must have to be included in this group. Can
+ * include 'shorthand' for props without values or 'multiline' for
+ * multi-line props.
+ */
+ modifiers?: Modifier[]
+ /**
+ * The selector type for this group. Can be 'prop' for regular props,
+ * 'multiline' for multi-line props, or 'shorthand' for shorthand props.
+ */
+ selector?: Selector
+}
+type AdditionalSortOptions = object
+/**
+ * Complete list of available JSX prop selectors. Used for validation and JSON
+ * schema generation.
+ */
+export declare let allSelectors: readonly ['prop']
+/**
+ * Complete list of available JSX prop modifiers. Used for validation and JSON
+ * schema generation.
+ */
+export declare let allModifiers: readonly ['shorthand', 'multiline']
+/**
+ * Additional custom group match options JSON schema. Used by ESLint to validate
+ * rule options at configuration time.
+ */
+export declare let additionalCustomGroupMatchOptionsJsonSchema: Record<
+ string,
+ JSONSchema4
+>
+export {}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-jsx-props/types.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-jsx-props/types.js
new file mode 100644
index 0000000000000000000000000000000000000000..bf55eaacbf6bbde7187027b7c615c6ddafaff3cc
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-jsx-props/types.js
@@ -0,0 +1,37 @@
+import { buildRegexJsonSchema } from '../../utils/json-schemas/common-json-schemas.js'
+import {
+ buildCustomGroupModifiersJsonSchema,
+ buildCustomGroupSelectorJsonSchema,
+} from '../../utils/json-schemas/common-groups-json-schemas.js'
+var ORDER_ERROR_ID = 'unexpectedJSXPropsOrder'
+var GROUP_ORDER_ERROR_ID = 'unexpectedJSXPropsGroupOrder'
+var EXTRA_SPACING_ERROR_ID = 'extraSpacingBetweenJSXPropsMembers'
+var MISSED_SPACING_ERROR_ID = 'missedSpacingBetweenJSXPropsMembers'
+/**
+ * Complete list of available JSX prop selectors. Used for validation and JSON
+ * schema generation.
+ */
+var allSelectors = ['prop']
+/**
+ * Complete list of available JSX prop modifiers. Used for validation and JSON
+ * schema generation.
+ */
+var allModifiers = ['shorthand', 'multiline']
+/**
+ * Additional custom group match options JSON schema. Used by ESLint to validate
+ * rule options at configuration time.
+ */
+var additionalCustomGroupMatchOptionsJsonSchema = {
+ modifiers: buildCustomGroupModifiersJsonSchema(allModifiers),
+ selector: buildCustomGroupSelectorJsonSchema(allSelectors),
+ elementValuePattern: buildRegexJsonSchema(),
+}
+export {
+ EXTRA_SPACING_ERROR_ID,
+ GROUP_ORDER_ERROR_ID,
+ MISSED_SPACING_ERROR_ID,
+ ORDER_ERROR_ID,
+ additionalCustomGroupMatchOptionsJsonSchema,
+ allModifiers,
+ allSelectors,
+}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-maps.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-maps.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..647f0dbe5c9f5e5d76cbb29c93cdd85126f851bd
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-maps.d.ts
@@ -0,0 +1,12 @@
+import { MessageId, Options } from './sort-maps/types.js'
+declare const _default: import('@typescript-eslint/utils/ts-eslint').RuleModule<
+ MessageId,
+ Options,
+ {
+ recommended?: boolean
+ },
+ import('@typescript-eslint/utils/ts-eslint').RuleListener
+> & {
+ name: string
+}
+export default _default
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-maps.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-maps.js
new file mode 100644
index 0000000000000000000000000000000000000000..b52e1053ca7df8d9d6c3ca273418791e498508e5
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-maps.js
@@ -0,0 +1,74 @@
+import {
+ buildCommonJsonSchemas,
+ buildUseConfigIfJsonSchema,
+ matchesAstSelectorJsonSchema,
+} from '../utils/json-schemas/common-json-schemas.js'
+import { buildCommonGroupsJsonSchemas } from '../utils/json-schemas/common-groups-json-schemas.js'
+import {
+ EXTRA_SPACING_ERROR,
+ GROUP_ORDER_ERROR,
+ MISSED_SPACING_ERROR,
+ ORDER_ERROR,
+} from '../utils/report-errors.js'
+import {
+ partitionByCommentJsonSchema,
+ partitionByNewlineJsonSchema,
+} from '../utils/json-schemas/common-partition-json-schemas.js'
+import { buildAstListeners } from '../utils/build-ast-listeners.js'
+import { createEslintRule } from '../utils/create-eslint-rule.js'
+import {
+ EXTRA_SPACING_ERROR_ID,
+ GROUP_ORDER_ERROR_ID,
+ MISSED_SPACING_ERROR_ID,
+ ORDER_ERROR_ID,
+} from './sort-maps/types.js'
+import {
+ defaultOptions,
+ sortPotentialMap,
+} from './sort-maps/sort-potential-map.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+var sort_maps_default = createEslintRule({
+ meta: {
+ schema: {
+ items: {
+ properties: {
+ ...buildCommonJsonSchemas(),
+ ...buildCommonGroupsJsonSchemas(),
+ useConfigurationIf: buildUseConfigIfJsonSchema({
+ additionalProperties: {
+ matchesAstSelector: matchesAstSelectorJsonSchema,
+ },
+ }),
+ partitionByComment: partitionByCommentJsonSchema,
+ partitionByNewLine: partitionByNewlineJsonSchema,
+ },
+ additionalProperties: false,
+ type: 'object',
+ },
+ uniqueItems: true,
+ type: 'array',
+ },
+ messages: {
+ [MISSED_SPACING_ERROR_ID]: MISSED_SPACING_ERROR,
+ [EXTRA_SPACING_ERROR_ID]: EXTRA_SPACING_ERROR,
+ [GROUP_ORDER_ERROR_ID]: GROUP_ORDER_ERROR,
+ [ORDER_ERROR_ID]: ORDER_ERROR,
+ },
+ docs: {
+ url: 'https://perfectionist.dev/rules/sort-maps',
+ description: 'Enforce sorted Map elements.',
+ recommended: true,
+ },
+ type: 'suggestion',
+ fixable: 'code',
+ },
+ create: context =>
+ buildAstListeners({
+ nodeTypes: [AST_NODE_TYPES.NewExpression],
+ sorter: sortPotentialMap,
+ context,
+ }),
+ defaultOptions: [defaultOptions],
+ name: 'sort-maps',
+})
+export { sort_maps_default as default }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-maps/compute-matched-context-options.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-maps/compute-matched-context-options.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..962b0e3db6fe923494a271915bf6a70ffc941a34
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-maps/compute-matched-context-options.d.ts
@@ -0,0 +1,21 @@
+import { RuleContext } from '@typescript-eslint/utils/ts-eslint'
+import { TSESTree } from '@typescript-eslint/types'
+import { MessageId, Options } from './types.js'
+/**
+ * Computes the matched context options for a given map node.
+ *
+ * @param params - Parameters.
+ * @param params.matchedAstSelectors - The matched AST selectors for a map node.
+ * @param params.elements - The map elements to compute the context options for.
+ * @param params.context - The rule context.
+ * @returns The matched context options or undefined if none match.
+ */
+export declare function computeMatchedContextOptions({
+ matchedAstSelectors,
+ elements,
+ context,
+}: {
+ elements: (TSESTree.SpreadElement | TSESTree.Expression | null)[]
+ context: Readonly>
+ matchedAstSelectors: ReadonlySet
+}): Options[number] | undefined
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-maps/compute-matched-context-options.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-maps/compute-matched-context-options.js
new file mode 100644
index 0000000000000000000000000000000000000000..0c0f0b693c1b7dd055dcb687ee866ba9ec7872d5
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-maps/compute-matched-context-options.js
@@ -0,0 +1,53 @@
+import { passesAllNamesMatchPatternFilter } from '../../utils/context-matching/passes-all-names-match-pattern-filter.js'
+import { passesAstSelectorFilter } from '../../utils/context-matching/passes-ast-selector-filter.js'
+import { computeNodeName } from './compute-node-name.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Computes the matched context options for a given map node.
+ *
+ * @param params - Parameters.
+ * @param params.matchedAstSelectors - The matched AST selectors for a map node.
+ * @param params.elements - The map elements to compute the context options for.
+ * @param params.context - The rule context.
+ * @returns The matched context options or undefined if none match.
+ */
+function computeMatchedContextOptions({
+ matchedAstSelectors,
+ elements,
+ context,
+}) {
+ let nodeNames = elements
+ .filter(
+ element =>
+ element !== null && element.type !== AST_NODE_TYPES.SpreadElement,
+ )
+ .map(element =>
+ computeNodeName({
+ sourceCode: context.sourceCode,
+ node: element,
+ }),
+ )
+ return context.options.find(options =>
+ isContextOptionMatching({
+ matchedAstSelectors,
+ nodeNames,
+ options,
+ }),
+ )
+}
+function isContextOptionMatching({ matchedAstSelectors, nodeNames, options }) {
+ if (!options.useConfigurationIf) {
+ return true
+ }
+ return (
+ passesAllNamesMatchPatternFilter({
+ allNamesMatchPattern: options.useConfigurationIf.allNamesMatchPattern,
+ nodeNames,
+ }) &&
+ passesAstSelectorFilter({
+ matchesAstSelector: options.useConfigurationIf.matchesAstSelector,
+ matchedAstSelectors,
+ })
+ )
+}
+export { computeMatchedContextOptions }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-maps/compute-node-name.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-maps/compute-node-name.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..3f1f484b69cbc97c34cce684917553fedae2bee9
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-maps/compute-node-name.d.ts
@@ -0,0 +1,21 @@
+import { TSESLint } from '@typescript-eslint/utils'
+import { TSESTree } from '@typescript-eslint/types'
+/**
+ * Extracts the name of a Map element for sorting purposes.
+ *
+ * For array expressions (key-value pairs), extracts the first element as the
+ * key. Returns the literal raw value for literals, or the source code text for
+ * other expressions.
+ *
+ * @param params - Parameters object.
+ * @param params.sourceCode - The ESLint source code object.
+ * @param params.node - The Map element expression to get the name from.
+ * @returns The name to use for sorting this Map element.
+ */
+export declare function computeNodeName({
+ sourceCode,
+ node,
+}: {
+ sourceCode: TSESLint.SourceCode
+ node: TSESTree.Expression
+}): string
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-maps/compute-node-name.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-maps/compute-node-name.js
new file mode 100644
index 0000000000000000000000000000000000000000..0f3540ada626db8d1ae947b369d482cba962f4f4
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-maps/compute-node-name.js
@@ -0,0 +1,26 @@
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Extracts the name of a Map element for sorting purposes.
+ *
+ * For array expressions (key-value pairs), extracts the first element as the
+ * key. Returns the literal raw value for literals, or the source code text for
+ * other expressions.
+ *
+ * @param params - Parameters object.
+ * @param params.sourceCode - The ESLint source code object.
+ * @param params.node - The Map element expression to get the name from.
+ * @returns The name to use for sorting this Map element.
+ */
+function computeNodeName({ sourceCode, node }) {
+ if (node.type !== AST_NODE_TYPES.ArrayExpression) {
+ return sourceCode.getText(node)
+ }
+ let [left] = node.elements
+ if (!left) {
+ return 'undefined'
+ }
+ return left.type === AST_NODE_TYPES.Literal ?
+ left.raw
+ : sourceCode.getText(left)
+}
+export { computeNodeName }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-maps/sort-potential-map.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-maps/sort-potential-map.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..6cee9cc1bdfd5dcfc27aa3a1296a3536733e4590
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-maps/sort-potential-map.d.ts
@@ -0,0 +1,13 @@
+import { TSESTree } from '@typescript-eslint/types'
+import { TSESLint } from '@typescript-eslint/utils'
+import { MessageId, Options } from './types.js'
+export declare let defaultOptions: Required
+export declare function sortPotentialMap({
+ matchedAstSelectors,
+ context,
+ node,
+}: {
+ context: TSESLint.RuleContext
+ matchedAstSelectors: ReadonlySet
+ node: TSESTree.NewExpression
+}): void
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-maps/sort-potential-map.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-maps/sort-potential-map.js
new file mode 100644
index 0000000000000000000000000000000000000000..2ca140ba396430105d4412e157e36eaa191b527f
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-maps/sort-potential-map.js
@@ -0,0 +1,153 @@
+import { defaultComparatorByOptionsComputer } from '../../utils/compare/default-comparator-by-options-computer.js'
+import { buildOptionsByGroupIndexComputer } from '../../utils/build-options-by-group-index-computer.js'
+import { validateCustomSortConfig } from '../../utils/validate-custom-sort-config.js'
+import { getEslintDisabledLines } from '../../utils/get-eslint-disabled-lines.js'
+import { doesCustomGroupMatch } from '../../utils/does-custom-group-match.js'
+import { isNodeEslintDisabled } from '../../utils/is-node-eslint-disabled.js'
+import { validateGroupsConfig } from '../../utils/validate-groups-config.js'
+import { sortNodesByGroups } from '../../utils/sort-nodes-by-groups.js'
+import { reportAllErrors } from '../../utils/report-all-errors.js'
+import { shouldPartition } from '../../utils/should-partition.js'
+import { computeGroup } from '../../utils/compute-group.js'
+import { rangeToDiff } from '../../utils/range-to-diff.js'
+import { getSettings } from '../../utils/get-settings.js'
+import { isSortable } from '../../utils/is-sortable.js'
+import { complete } from '../../utils/complete.js'
+import {
+ EXTRA_SPACING_ERROR_ID,
+ GROUP_ORDER_ERROR_ID,
+ MISSED_SPACING_ERROR_ID,
+ ORDER_ERROR_ID,
+} from './types.js'
+import { computeNodeName } from './compute-node-name.js'
+import { computeMatchedContextOptions } from './compute-matched-context-options.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+var defaultOptions = {
+ fallbackSort: { type: 'unsorted' },
+ newlinesInside: 'newlinesBetween',
+ specialCharacters: 'keep',
+ partitionByComment: false,
+ partitionByNewLine: false,
+ newlinesBetween: 'ignore',
+ useConfigurationIf: {},
+ type: 'alphabetical',
+ ignoreCase: true,
+ customGroups: [],
+ locales: 'en-US',
+ alphabet: '',
+ order: 'asc',
+ groups: [],
+}
+function sortPotentialMap({ matchedAstSelectors, context, node }) {
+ if (
+ node.callee.type !== AST_NODE_TYPES.Identifier ||
+ node.callee.name !== 'Map' ||
+ node.arguments.length === 0 ||
+ node.arguments[0]?.type !== AST_NODE_TYPES.ArrayExpression
+ ) {
+ return
+ }
+ let [{ elements }] = node.arguments
+ if (!isSortable(elements)) {
+ return
+ }
+ let { sourceCode, id } = context
+ let settings = getSettings(context.settings)
+ let matchedContextOptions = computeMatchedContextOptions({
+ matchedAstSelectors,
+ elements,
+ context,
+ })
+ let options = complete(matchedContextOptions, settings, defaultOptions)
+ validateCustomSortConfig(options)
+ validateGroupsConfig({
+ selectors: [],
+ modifiers: [],
+ options,
+ })
+ let eslintDisabledLines = getEslintDisabledLines({
+ ruleName: id,
+ sourceCode,
+ })
+ let optionsByGroupIndexComputer = buildOptionsByGroupIndexComputer(options)
+ let parts = elements.reduce(
+ (accumulator, element) => {
+ if (element === null || element.type === AST_NODE_TYPES.SpreadElement) {
+ accumulator.push([])
+ } else {
+ accumulator.at(-1).push(element)
+ }
+ return accumulator
+ },
+ [[]],
+ )
+ for (let part of parts) {
+ let formattedMembers = [[]]
+ for (let element of part) {
+ let name = computeNodeName({
+ node: element,
+ sourceCode,
+ })
+ let lastSortingNode = formattedMembers.at(-1)?.at(-1)
+ let group = computeGroup({
+ customGroupMatcher: customGroup =>
+ doesCustomGroupMatch({
+ elementName: name,
+ selectors: [],
+ modifiers: [],
+ customGroup,
+ }),
+ predefinedGroups: [],
+ options,
+ })
+ let sortingNode = {
+ isEslintDisabled: isNodeEslintDisabled(element, eslintDisabledLines),
+ size: rangeToDiff(element, sourceCode),
+ node: element,
+ group,
+ name,
+ }
+ if (
+ shouldPartition({
+ lastSortingNode,
+ sortingNode,
+ sourceCode,
+ options,
+ })
+ ) {
+ formattedMembers.push([])
+ }
+ formattedMembers.at(-1).push({
+ ...sortingNode,
+ partitionId: formattedMembers.length,
+ })
+ }
+ for (let nodes of formattedMembers) {
+ function createSortNodesExcludingEslintDisabled(sortingNodes) {
+ return function (ignoreEslintDisabledNodes) {
+ return sortNodesByGroups({
+ comparatorByOptionsComputer: defaultComparatorByOptionsComputer,
+ optionsByGroupIndexComputer,
+ ignoreEslintDisabledNodes,
+ groups: options.groups,
+ nodes: sortingNodes,
+ })
+ }
+ }
+ reportAllErrors({
+ availableMessageIds: {
+ missedSpacingBetweenMembers: MISSED_SPACING_ERROR_ID,
+ extraSpacingBetweenMembers: EXTRA_SPACING_ERROR_ID,
+ unexpectedGroupOrder: GROUP_ORDER_ERROR_ID,
+ unexpectedOrder: ORDER_ERROR_ID,
+ },
+ sortNodesExcludingEslintDisabled:
+ createSortNodesExcludingEslintDisabled(nodes),
+ options,
+ context,
+ nodes,
+ })
+ }
+ }
+}
+export { defaultOptions, sortPotentialMap }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-maps/types.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-maps/types.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..e9ddb07dbc3c9a674596747068fd75979b36fc60
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-maps/types.d.ts
@@ -0,0 +1,49 @@
+import { RegexOption, TypeOption } from '../../types/common-options.js'
+import { AllCommonOptions } from '../../types/all-common-options.js'
+export type MessageId =
+ | typeof MISSED_SPACING_ERROR_ID
+ | typeof EXTRA_SPACING_ERROR_ID
+ | typeof GROUP_ORDER_ERROR_ID
+ | typeof ORDER_ERROR_ID
+export declare const ORDER_ERROR_ID = 'unexpectedMapElementsOrder'
+export declare const GROUP_ORDER_ERROR_ID = 'unexpectedMapElementsGroupOrder'
+export declare const EXTRA_SPACING_ERROR_ID =
+ 'extraSpacingBetweenMapElementsMembers'
+export declare const MISSED_SPACING_ERROR_ID =
+ 'missedSpacingBetweenMapElementsMembers'
+/**
+ * Configuration options for the sort-maps rule.
+ *
+ * This rule enforces consistent ordering of Map elements to improve code
+ * readability and maintainability.
+ */
+export type Options = Partial<
+ {
+ /**
+ * Conditional configuration based on pattern matching. Allows applying the
+ * rule only when specific conditions are met.
+ */
+ useConfigurationIf: {
+ /**
+ * Regular expression pattern to match against all Map element keys. The
+ * rule is only applied when all keys match this pattern.
+ */
+ allNamesMatchPattern?: RegexOption
+ /**
+ * AST selector to match against NewExpression nodes targeting Map
+ * constructions.
+ */
+ matchesAstSelector?: string
+ }
+ } & AllCommonOptions<
+ TypeOption,
+ AdditionalSortOptions,
+ CustomGroupMatchOptions
+ >
+>[]
+/**
+ * Match options for a custom group.
+ */
+type CustomGroupMatchOptions = object
+type AdditionalSortOptions = object
+export {}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-maps/types.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-maps/types.js
new file mode 100644
index 0000000000000000000000000000000000000000..8508cfc6943e7417046da619e3502cc51f9bd221
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-maps/types.js
@@ -0,0 +1,10 @@
+var ORDER_ERROR_ID = 'unexpectedMapElementsOrder'
+var GROUP_ORDER_ERROR_ID = 'unexpectedMapElementsGroupOrder'
+var EXTRA_SPACING_ERROR_ID = 'extraSpacingBetweenMapElementsMembers'
+var MISSED_SPACING_ERROR_ID = 'missedSpacingBetweenMapElementsMembers'
+export {
+ EXTRA_SPACING_ERROR_ID,
+ GROUP_ORDER_ERROR_ID,
+ MISSED_SPACING_ERROR_ID,
+ ORDER_ERROR_ID,
+}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..fa75ba96a02de61b175b84eab7adaa108e4c255f
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules.d.ts
@@ -0,0 +1,24 @@
+import { TSESLint } from '@typescript-eslint/utils'
+import { Options } from './sort-modules/types.js'
+declare const ORDER_ERROR_ID = 'unexpectedModulesOrder'
+declare const GROUP_ORDER_ERROR_ID = 'unexpectedModulesGroupOrder'
+declare const EXTRA_SPACING_ERROR_ID = 'extraSpacingBetweenModulesMembers'
+declare const MISSED_SPACING_ERROR_ID = 'missedSpacingBetweenModulesMembers'
+declare const DEPENDENCY_ORDER_ERROR_ID = 'unexpectedModulesDependencyOrder'
+type MessageId =
+ | typeof DEPENDENCY_ORDER_ERROR_ID
+ | typeof MISSED_SPACING_ERROR_ID
+ | typeof EXTRA_SPACING_ERROR_ID
+ | typeof GROUP_ORDER_ERROR_ID
+ | typeof ORDER_ERROR_ID
+declare const _default: TSESLint.RuleModule<
+ MessageId,
+ Options,
+ {
+ recommended?: boolean
+ },
+ TSESLint.RuleListener
+> & {
+ name: string
+}
+export default _default
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules.js
new file mode 100644
index 0000000000000000000000000000000000000000..c5516f62f93b1f26ce4229b69d12c839cd9b054a
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules.js
@@ -0,0 +1,355 @@
+import {
+ buildCommonJsonSchemas,
+ useExperimentalDependencyDetectionJsonSchema,
+} from '../utils/json-schemas/common-json-schemas.js'
+import {
+ buildCommonGroupsJsonSchemas,
+ newlinesBetweenJsonSchema,
+} from '../utils/json-schemas/common-groups-json-schemas.js'
+import { getGroupIndex } from '../utils/get-group-index.js'
+import {
+ DEPENDENCY_ORDER_ERROR,
+ EXTRA_SPACING_ERROR,
+ GROUP_ORDER_ERROR,
+ MISSED_SPACING_ERROR,
+ ORDER_ERROR,
+} from '../utils/report-errors.js'
+import {
+ partitionByCommentJsonSchema,
+ partitionByNewlineJsonSchema,
+} from '../utils/json-schemas/common-partition-json-schemas.js'
+import { populateSortingNodeGroupsWithDependencies } from '../utils/populate-sorting-node-groups-with-dependencies.js'
+import { validateNewlinesAndPartitionConfig } from '../utils/validate-newlines-and-partition-config.js'
+import { buildOptionsByGroupIndexComputer } from '../utils/build-options-by-group-index-computer.js'
+import { validateCustomSortConfig } from '../utils/validate-custom-sort-config.js'
+import { generatePredefinedGroups } from '../utils/generate-predefined-groups.js'
+import { sortNodesByDependencies } from '../utils/sort-nodes-by-dependencies.js'
+import { getEslintDisabledLines } from '../utils/get-eslint-disabled-lines.js'
+import { doesCustomGroupMatch } from '../utils/does-custom-group-match.js'
+import { isNodeEslintDisabled } from '../utils/is-node-eslint-disabled.js'
+import { validateGroupsConfig } from '../utils/validate-groups-config.js'
+import { sortNodesByGroups } from '../utils/sort-nodes-by-groups.js'
+import { reportAllErrors } from '../utils/report-all-errors.js'
+import { shouldPartition } from '../utils/should-partition.js'
+import { computeGroup } from '../utils/compute-group.js'
+import { rangeToDiff } from '../utils/range-to-diff.js'
+import { getSettings } from '../utils/get-settings.js'
+import { complete } from '../utils/complete.js'
+import { createEslintRule } from '../utils/create-eslint-rule.js'
+import { getDecoratorName } from '../utils/get-decorator-name.js'
+import { buildOverloadSignatureNewlinesBetweenValueGetter } from '../utils/overload-signature/build-overload-signature-newlines-between-value-getter.js'
+import { populateSortingNodeGroupsWithOverloadSignature } from '../utils/overload-signature/populate-sorting-node-groups-with-overload-signature.js'
+import '../utils/assert-is-never.js'
+import {
+ USAGE_TYPE_OPTION,
+ additionalCustomGroupMatchOptionsJsonSchema,
+ allModifiers,
+ allSelectors,
+} from './sort-modules/types.js'
+import { computeDependenciesBySortingNode } from './sort-modules/compute-dependencies-by-sorting-node.js'
+import { buildComparatorByOptionsComputer } from './sort-modules/build-comparator-by-options-computer.js'
+import { computeOverloadSignatureGroups } from './sort-modules/compute-overload-signature-groups.js'
+import { computeNodeDetails } from './sort-modules/compute-node-details.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Cache computed groups by modifiers and selectors for performance.
+ */
+var cachedGroupsByModifiersAndSelectors = /* @__PURE__ */ new Map()
+var ORDER_ERROR_ID = 'unexpectedModulesOrder'
+var GROUP_ORDER_ERROR_ID = 'unexpectedModulesGroupOrder'
+var EXTRA_SPACING_ERROR_ID = 'extraSpacingBetweenModulesMembers'
+var MISSED_SPACING_ERROR_ID = 'missedSpacingBetweenModulesMembers'
+var DEPENDENCY_ORDER_ERROR_ID = 'unexpectedModulesDependencyOrder'
+var defaultOptions = {
+ groups: [
+ 'declare-enum',
+ 'export-enum',
+ 'enum',
+ ['declare-interface', 'declare-type'],
+ ['export-interface', 'export-type'],
+ ['interface', 'type'],
+ 'declare-class',
+ 'class',
+ 'export-class',
+ 'declare-function',
+ 'export-function',
+ 'function',
+ ],
+ useExperimentalDependencyDetection: true,
+ newlinesBetweenOverloadSignatures: 0,
+ fallbackSort: { type: 'unsorted' },
+ newlinesInside: 'newlinesBetween',
+ partitionByComment: false,
+ partitionByNewLine: false,
+ newlinesBetween: 'ignore',
+ specialCharacters: 'keep',
+ type: 'alphabetical',
+ ignoreCase: true,
+ customGroups: [],
+ locales: 'en-US',
+ alphabet: '',
+ order: 'asc',
+}
+var sort_modules_default = createEslintRule({
+ meta: {
+ schema: [
+ {
+ properties: {
+ ...buildCommonJsonSchemas({
+ allowedAdditionalTypeValues: [USAGE_TYPE_OPTION],
+ }),
+ ...buildCommonGroupsJsonSchemas({
+ additionalCustomGroupMatchProperties:
+ additionalCustomGroupMatchOptionsJsonSchema,
+ allowedAdditionalTypeValues: [USAGE_TYPE_OPTION],
+ }),
+ useExperimentalDependencyDetection:
+ useExperimentalDependencyDetectionJsonSchema,
+ newlinesBetweenOverloadSignatures: newlinesBetweenJsonSchema,
+ partitionByComment: partitionByCommentJsonSchema,
+ partitionByNewLine: partitionByNewlineJsonSchema,
+ },
+ additionalProperties: false,
+ type: 'object',
+ },
+ ],
+ messages: {
+ [DEPENDENCY_ORDER_ERROR_ID]: DEPENDENCY_ORDER_ERROR,
+ [MISSED_SPACING_ERROR_ID]: MISSED_SPACING_ERROR,
+ [EXTRA_SPACING_ERROR_ID]: EXTRA_SPACING_ERROR,
+ [GROUP_ORDER_ERROR_ID]: GROUP_ORDER_ERROR,
+ [ORDER_ERROR_ID]: ORDER_ERROR,
+ },
+ docs: {
+ url: 'https://perfectionist.dev/rules/sort-modules',
+ description: 'Enforce sorted modules.',
+ recommended: true,
+ },
+ type: 'suggestion',
+ fixable: 'code',
+ },
+ create: context => {
+ let settings = getSettings(context.settings)
+ let options = complete(context.options.at(0), settings, defaultOptions)
+ validateCustomSortConfig(options)
+ validateGroupsConfig({
+ modifiers: allModifiers,
+ selectors: allSelectors,
+ options,
+ })
+ validateNewlinesAndPartitionConfig(options)
+ let { sourceCode, id } = context
+ let eslintDisabledLines = getEslintDisabledLines({
+ ruleName: id,
+ sourceCode,
+ })
+ return {
+ Program: program =>
+ analyzeModule({
+ eslintDisabledLines,
+ module: program,
+ sourceCode,
+ options,
+ context,
+ }),
+ }
+ },
+ defaultOptions: [defaultOptions],
+ name: 'sort-modules',
+})
+function analyzeModule({
+ eslintDisabledLines,
+ sourceCode,
+ options,
+ context,
+ module,
+}) {
+ let optionsByGroupIndexComputer = buildOptionsByGroupIndexComputer(options)
+ let overloadSignatureNewlinesBetweenValueGetter =
+ buildOverloadSignatureNewlinesBetweenValueGetter(
+ options.newlinesBetweenOverloadSignatures,
+ )
+ let sortingNodeGroupsWithoutOverloadSignature = [[]]
+ for (let node of module.body) {
+ switch (node.type) {
+ case AST_NODE_TYPES.TSNamespaceExportDeclaration:
+ case AST_NODE_TYPES.ExportAllDeclaration:
+ case AST_NODE_TYPES.ImportDeclaration:
+ case AST_NODE_TYPES.DebuggerStatement:
+ case AST_NODE_TYPES.ContinueStatement:
+ case AST_NODE_TYPES.ReturnStatement:
+ case AST_NODE_TYPES.EmptyStatement:
+ case AST_NODE_TYPES.BreakStatement:
+ case AST_NODE_TYPES.WithStatement:
+ continue
+ case AST_NODE_TYPES.ExportDefaultDeclaration:
+ case AST_NODE_TYPES.ExportNamedDeclaration:
+ case AST_NODE_TYPES.TSInterfaceDeclaration:
+ case AST_NODE_TYPES.TSTypeAliasDeclaration:
+ case AST_NODE_TYPES.FunctionDeclaration:
+ case AST_NODE_TYPES.TSModuleDeclaration:
+ break
+ case AST_NODE_TYPES.TSImportEqualsDeclaration:
+ case AST_NODE_TYPES.VariableDeclaration:
+ case AST_NODE_TYPES.ExpressionStatement:
+ case AST_NODE_TYPES.TSExportAssignment:
+ case AST_NODE_TYPES.DoWhileStatement:
+ case AST_NODE_TYPES.LabeledStatement:
+ case AST_NODE_TYPES.SwitchStatement:
+ case AST_NODE_TYPES.WhileStatement:
+ case AST_NODE_TYPES.ForInStatement:
+ case AST_NODE_TYPES.ForOfStatement:
+ case AST_NODE_TYPES.ThrowStatement:
+ case AST_NODE_TYPES.BlockStatement:
+ case AST_NODE_TYPES.ForStatement:
+ case AST_NODE_TYPES.TryStatement:
+ case AST_NODE_TYPES.IfStatement:
+ sortingNodeGroupsWithoutOverloadSignature.push([])
+ continue
+ case AST_NODE_TYPES.TSDeclareFunction:
+ case AST_NODE_TYPES.TSEnumDeclaration:
+ case AST_NODE_TYPES.ClassDeclaration:
+ break
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ continue
+ }
+ let details = computeNodeDetails({
+ useExperimentalDependencyDetection:
+ options.useExperimentalDependencyDetection,
+ node,
+ })
+ if (!details.nodeDetails) {
+ if (details.shouldPartitionAfterNode) {
+ sortingNodeGroupsWithoutOverloadSignature.push([])
+ }
+ if (details.moduleBlock) {
+ analyzeModule({
+ module: details.moduleBlock,
+ eslintDisabledLines,
+ sourceCode,
+ options,
+ context,
+ })
+ }
+ continue
+ }
+ let {
+ addSafetySemicolonWhenInline,
+ dependencyDetection,
+ dependencies,
+ decorators,
+ modifiers,
+ selector,
+ name,
+ } = details.nodeDetails
+ let predefinedGroups = generatePredefinedGroups({
+ cache: cachedGroupsByModifiersAndSelectors,
+ selectors: [selector],
+ modifiers,
+ })
+ let decoratorNames = decorators.map(decorator =>
+ getDecoratorName({
+ sourceCode,
+ decorator,
+ }),
+ )
+ let group = computeGroup({
+ customGroupMatcher: customGroup =>
+ doesCustomGroupMatch({
+ selectors: [selector],
+ elementName: name,
+ decoratorNames,
+ customGroup,
+ modifiers,
+ }),
+ predefinedGroups,
+ options,
+ })
+ let sortingNode = {
+ isEslintDisabled: isNodeEslintDisabled(node, eslintDisabledLines),
+ size: rangeToDiff(node, sourceCode),
+ implicitDecorators: decorators,
+ addSafetySemicolonWhenInline,
+ dependencyNames: [name],
+ dependencyDetection,
+ dependencies,
+ group,
+ name,
+ node,
+ }
+ let lastSortingNode = sortingNodeGroupsWithoutOverloadSignature
+ .at(-1)
+ ?.at(-1)
+ if (
+ shouldPartition({
+ lastSortingNode,
+ sortingNode,
+ sourceCode,
+ options,
+ })
+ ) {
+ sortingNodeGroupsWithoutOverloadSignature.push([])
+ }
+ sortingNodeGroupsWithoutOverloadSignature.at(-1)?.push({
+ ...sortingNode,
+ partitionId: sortingNodeGroupsWithoutOverloadSignature.length,
+ })
+ }
+ let overloadSignatureGroups = computeOverloadSignatureGroups(
+ sortingNodeGroupsWithoutOverloadSignature.flat().map(({ node }) => node),
+ )
+ let sortingNodeGroups = populateSortingNodeGroupsWithOverloadSignature({
+ sortingNodeGroups: sortingNodeGroupsWithoutOverloadSignature,
+ overloadSignatureGroups,
+ })
+ if (options.useExperimentalDependencyDetection) {
+ let dependenciesBySortingNode = computeDependenciesBySortingNode({
+ sortingNodes: sortingNodeGroups.flat(),
+ dependencyDetection: 'hard',
+ sourceCode,
+ })
+ sortingNodeGroups = populateSortingNodeGroupsWithDependencies({
+ dependenciesBySortingNode,
+ sortingNodeGroups,
+ })
+ }
+ let sortingNodes = sortingNodeGroups.flat()
+ reportAllErrors({
+ availableMessageIds: {
+ missedSpacingBetweenMembers: MISSED_SPACING_ERROR_ID,
+ unexpectedDependencyOrder: DEPENDENCY_ORDER_ERROR_ID,
+ extraSpacingBetweenMembers: EXTRA_SPACING_ERROR_ID,
+ unexpectedGroupOrder: GROUP_ORDER_ERROR_ID,
+ unexpectedOrder: ORDER_ERROR_ID,
+ },
+ newlinesBetweenValueGetter: overloadSignatureNewlinesBetweenValueGetter,
+ sortNodesExcludingEslintDisabled,
+ nodes: sortingNodes,
+ options,
+ context,
+ })
+ function sortNodesExcludingEslintDisabled(ignoreEslintDisabledNodes) {
+ let nodesSortedByGroups = sortingNodeGroups.flatMap(sortingNodeGroup =>
+ sortNodesByGroups({
+ comparatorByOptionsComputer: buildComparatorByOptionsComputer({
+ useExperimentalDependencyDetection:
+ options.useExperimentalDependencyDetection,
+ sortingNodes: sortingNodeGroup,
+ ignoreEslintDisabledNodes,
+ sourceCode,
+ }),
+ isNodeIgnored: sortingNode =>
+ getGroupIndex(options.groups, sortingNode) === options.groups.length,
+ optionsByGroupIndexComputer,
+ ignoreEslintDisabledNodes,
+ nodes: sortingNodeGroup,
+ groups: options.groups,
+ }),
+ )
+ return sortNodesByDependencies(nodesSortedByGroups, {
+ ignoreEslintDisabledNodes,
+ })
+ }
+}
+export { sort_modules_default as default }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules/build-comparator-by-options-computer.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules/build-comparator-by-options-computer.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..db630d1c2225b68a33baf87fae12e2f2f345c318
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules/build-comparator-by-options-computer.d.ts
@@ -0,0 +1,17 @@
+import { TSESLint } from '@typescript-eslint/utils'
+import { ComparatorByOptionsComputer } from '../../utils/compare/default-comparator-by-options-computer.js'
+import { SortModulesSortingNode, Options } from './types.js'
+export declare function buildComparatorByOptionsComputer({
+ useExperimentalDependencyDetection,
+ ignoreEslintDisabledNodes,
+ sortingNodes,
+ sourceCode,
+}: {
+ useExperimentalDependencyDetection: boolean
+ sortingNodes: SortModulesSortingNode[]
+ ignoreEslintDisabledNodes: boolean
+ sourceCode: TSESLint.SourceCode
+}): ComparatorByOptionsComputer<
+ Required,
+ SortModulesSortingNode
+>
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules/build-comparator-by-options-computer.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules/build-comparator-by-options-computer.js
new file mode 100644
index 0000000000000000000000000000000000000000..ae92e07d2a8d46e665442813913a9d1f0bb42449
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules/build-comparator-by-options-computer.js
@@ -0,0 +1,35 @@
+import { UnreachableCaseError } from '../../utils/unreachable-case-error.js'
+import { defaultComparatorByOptionsComputer } from '../../utils/compare/default-comparator-by-options-computer.js'
+import { buildUsageComparator } from './build-usage-comparator.js'
+function buildComparatorByOptionsComputer({
+ useExperimentalDependencyDetection,
+ ignoreEslintDisabledNodes,
+ sortingNodes,
+ sourceCode,
+}) {
+ return options => {
+ switch (options.type) {
+ case 'subgroup-order':
+ case 'alphabetical':
+ case 'line-length':
+ case 'unsorted':
+ case 'natural':
+ case 'custom':
+ return defaultComparatorByOptionsComputer({
+ ...options,
+ type: options.type,
+ })
+ case 'usage':
+ return buildUsageComparator({
+ useExperimentalDependencyDetection,
+ ignoreEslintDisabledNodes,
+ sortingNodes,
+ sourceCode,
+ })
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(options.type)
+ }
+ }
+}
+export { buildComparatorByOptionsComputer }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules/build-usage-comparator.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules/build-usage-comparator.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..c66784e6e433d45d31e26bf16582647a8cda824b
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules/build-usage-comparator.d.ts
@@ -0,0 +1,26 @@
+import { TSESLint } from '@typescript-eslint/utils'
+import { Comparator } from '../../utils/compare/default-comparator-by-options-computer.js'
+import { SortModulesSortingNode } from './types.js'
+/**
+ * Builds a comparator function for sorting module nodes based on their usage.
+ *
+ * @param params - The parameters object.
+ * @param params.ignoreEslintDisabledNodes - Whether to ignore ESLint disabled
+ * nodes.
+ * @param params.sortingNodes - The module sorting nodes.
+ * @param params.useExperimentalDependencyDetection - Whether to use
+ * experimental dependency detection.
+ * @param params.sourceCode - The source code object.
+ * @returns A comparator function for sorting module nodes by usage.
+ */
+export declare function buildUsageComparator({
+ useExperimentalDependencyDetection,
+ ignoreEslintDisabledNodes,
+ sortingNodes,
+ sourceCode,
+}: {
+ useExperimentalDependencyDetection: boolean
+ sortingNodes: SortModulesSortingNode[]
+ ignoreEslintDisabledNodes: boolean
+ sourceCode: TSESLint.SourceCode
+}): Comparator
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules/build-usage-comparator.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules/build-usage-comparator.js
new file mode 100644
index 0000000000000000000000000000000000000000..ccc63b109bdc906e47ac38857270d1b53a8d738f
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules/build-usage-comparator.js
@@ -0,0 +1,127 @@
+import { populateSortingNodeGroupsWithDependencies } from '../../utils/populate-sorting-node-groups-with-dependencies.js'
+import { isNodeDependentOnOtherNode } from '../../utils/is-node-dependent-on-other-node.js'
+import { sortNodesByDependencies } from '../../utils/sort-nodes-by-dependencies.js'
+import { buildSortingNodeByNodeMap } from '../../utils/build-sorting-node-by-node-map.js'
+import { computeDependenciesBySortingNode } from './compute-dependencies-by-sorting-node.js'
+import { computeDependencies } from './compute-dependencies.js'
+/**
+ * Builds a comparator function for sorting module nodes based on their usage.
+ *
+ * @param params - The parameters object.
+ * @param params.ignoreEslintDisabledNodes - Whether to ignore ESLint disabled
+ * nodes.
+ * @param params.sortingNodes - The module sorting nodes.
+ * @param params.useExperimentalDependencyDetection - Whether to use
+ * experimental dependency detection.
+ * @param params.sourceCode - The source code object.
+ * @returns A comparator function for sorting module nodes by usage.
+ */
+function buildUsageComparator({
+ useExperimentalDependencyDetection,
+ ignoreEslintDisabledNodes,
+ sortingNodes,
+ sourceCode,
+}) {
+ let { updatedSortingNodeByNode, orderByUnsortedNode, orderBySortedNode } =
+ buildOrderByNodeMaps({
+ useExperimentalDependencyDetection,
+ ignoreEslintDisabledNodes,
+ sortingNodes,
+ sourceCode,
+ })
+ return (a, b) => {
+ let nodeA = a.node
+ let nodeB = b.node
+ let sortedOrderA = orderBySortedNode.get(nodeA)
+ let unsortedOrderA = orderByUnsortedNode.get(nodeA)
+ let sortedOrderB = orderBySortedNode.get(nodeB)
+ let unsortedOrderB = orderByUnsortedNode.get(nodeB)
+ let sortedOrderedValue = sortedOrderA - sortedOrderB
+ let unsortedOrderedValue = unsortedOrderA - unsortedOrderB
+ if (Math.sign(sortedOrderedValue) !== Math.sign(unsortedOrderedValue)) {
+ return sortedOrderedValue
+ }
+ let aWithUpdatedDependencies = updatedSortingNodeByNode.get(nodeA)
+ let bWithUpdatedDependencies = updatedSortingNodeByNode.get(nodeB)
+ if (
+ isNodeDependentOnOtherNode(
+ aWithUpdatedDependencies,
+ bWithUpdatedDependencies,
+ ) ||
+ isNodeDependentOnOtherNode(
+ bWithUpdatedDependencies,
+ aWithUpdatedDependencies,
+ )
+ ) {
+ return sortedOrderedValue
+ }
+ return 0
+ }
+}
+function buildOrderByNodeMaps({
+ useExperimentalDependencyDetection,
+ ignoreEslintDisabledNodes,
+ sortingNodes,
+ sourceCode,
+}) {
+ let sortingNodesWithUpdatedDependencies
+ if (useExperimentalDependencyDetection) {
+ let dependenciesBySortingNode = computeDependenciesBySortingNode({
+ dependencyDetection: 'soft',
+ sortingNodes,
+ sourceCode,
+ })
+ sortingNodesWithUpdatedDependencies =
+ populateSortingNodeGroupsWithDependencies({
+ sortingNodeGroups: [sortingNodes],
+ dependenciesBySortingNode,
+ })[0]
+ } else {
+ sortingNodesWithUpdatedDependencies = sortingNodes.map(
+ computeSortingNodeWithUpdatedDependencies,
+ )
+ }
+ let sortedSortingNodes = sortNodesByDependencies(
+ sortingNodesWithUpdatedDependencies,
+ { ignoreEslintDisabledNodes },
+ )
+ return {
+ updatedSortingNodeByNode: buildSortingNodeByNodeMap(
+ sortingNodesWithUpdatedDependencies,
+ ),
+ orderBySortedNode: buildOrderByNodeMap(sortedSortingNodes),
+ orderByUnsortedNode: buildOrderByNodeMap(sortingNodes),
+ }
+ /**
+ * Computes a sorting node with updated dependencies.
+ *
+ * @deprecated - To remove when experimental dependency detection is the only
+ * option.
+ * @param params - The parameters object.
+ * @returns The sorting node populated with updated dependencies.
+ */
+ function computeSortingNodeWithUpdatedDependencies({
+ isEslintDisabled,
+ dependencyNames,
+ node,
+ }) {
+ let dependencies = computeDependencies(node, { type: 'soft' })
+ let dependencyNamesSet = new Set(dependencyNames)
+ return {
+ dependencies: dependencies.filter(
+ dependency => !dependencyNamesSet.has(dependency),
+ ),
+ isEslintDisabled,
+ dependencyNames,
+ node,
+ }
+ }
+}
+function buildOrderByNodeMap(sortingNodes) {
+ let returnValue = /* @__PURE__ */ new Map()
+ for (let [i, { node }] of sortingNodes.entries()) {
+ returnValue.set(node, i)
+ }
+ return returnValue
+}
+export { buildUsageComparator }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules/compute-dependencies-by-sorting-node.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules/compute-dependencies-by-sorting-node.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..425443ec252f26a954d0113d7f8f0f633b167f8b
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules/compute-dependencies-by-sorting-node.d.ts
@@ -0,0 +1,16 @@
+import { TSESLint } from '@typescript-eslint/utils'
+import { SortModulesSortingNode, DependencyDetection } from './types.js'
+type SortingNodeWithoutDependencies = Omit<
+ SortModulesSortingNode,
+ 'dependencies'
+>
+export declare function computeDependenciesBySortingNode({
+ dependencyDetection,
+ sortingNodes,
+ sourceCode,
+}: {
+ sortingNodes: SortingNodeWithoutDependencies[]
+ dependencyDetection: DependencyDetection
+ sourceCode: TSESLint.SourceCode
+}): Map
+export {}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules/compute-dependencies-by-sorting-node.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules/compute-dependencies-by-sorting-node.js
new file mode 100644
index 0000000000000000000000000000000000000000..788761427a7d3bd4c07c93989559bc11826102e5
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules/compute-dependencies-by-sorting-node.js
@@ -0,0 +1,129 @@
+import { UnreachableCaseError } from '../../utils/unreachable-case-error.js'
+import { computeDependenciesBySortingNode as computeDependenciesBySortingNode$1 } from '../../utils/compute-dependencies-by-sorting-node.js'
+import { computeParentNodesWithTypes } from '../../utils/compute-parent-nodes-with-types.js'
+import { doesSortingNodeHaveOneOfDependencyNames } from '../../utils/does-sorting-node-have-one-of-dependency-names.js'
+import { isPropertyOrAccessorNode } from './is-property-or-accessor-node.js'
+import { isArrowFunctionNode } from './is-arrow-function-node.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+function computeDependenciesBySortingNode({
+ dependencyDetection,
+ sortingNodes,
+ sourceCode,
+}) {
+ return computeDependenciesBySortingNode$1({
+ additionalIdentifierDependenciesComputer:
+ buildAdditionalIdentifierDependenciesComputer({ sortingNodes }),
+ shouldIgnoreSortingNodeComputer:
+ buildShouldIgnoreSortingNodeComputer(dependencyDetection),
+ shouldIgnoreIdentifierComputer:
+ buildShouldIgnoreIdentifierComputer(dependencyDetection),
+ sortingNodes,
+ sourceCode,
+ })
+}
+function buildShouldIgnoreIdentifierComputer(dependencyDetection) {
+ return ({ referencingSortingNode, identifier }) => {
+ switch (dependencyDetection) {
+ case 'soft':
+ return false
+ case 'hard':
+ return !isInRelevantClassContext()
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(dependencyDetection)
+ }
+ function isInRelevantClassContext() {
+ let relevantParentNodes = computeParentNodesWithTypes({
+ allowedTypes: [
+ AST_NODE_TYPES.ClassBody,
+ AST_NODE_TYPES.PropertyDefinition,
+ AST_NODE_TYPES.AccessorProperty,
+ AST_NODE_TYPES.MethodDefinition,
+ AST_NODE_TYPES.ArrowFunctionExpression,
+ ],
+ maxParent: referencingSortingNode.node,
+ consecutiveOnly: false,
+ node: identifier,
+ })
+ let firstClassBodyParent = relevantParentNodes.findIndex(
+ parentNode => parentNode.type === AST_NODE_TYPES.ClassBody,
+ )
+ if (firstClassBodyParent < 0) {
+ return true
+ }
+ let searchStaticMethodsAndFunctionProperties = relevantParentNodes[
+ firstClassBodyParent
+ ].body.some(
+ classElement =>
+ classElement.type === AST_NODE_TYPES.StaticBlock ||
+ (classElement.static &&
+ isPropertyOrAccessorNode(classElement) &&
+ !isArrowFunctionNode(classElement)),
+ )
+ return relevantParentNodes
+ .slice(0, firstClassBodyParent)
+ .every(otherParent =>
+ isClassElementRelevant(
+ otherParent,
+ searchStaticMethodsAndFunctionProperties,
+ ),
+ )
+ }
+ function isClassElementRelevant(
+ classElement,
+ searchStaticMethodsAndFunctionProperties,
+ ) {
+ if (
+ classElement.type !== AST_NODE_TYPES.MethodDefinition &&
+ !isArrowFunctionNode(classElement)
+ ) {
+ return true
+ }
+ return classElement.static && searchStaticMethodsAndFunctionProperties
+ }
+ }
+}
+function buildAdditionalIdentifierDependenciesComputer({ sortingNodes }) {
+ return ({ referencingSortingNode, reference }) => {
+ let relatedIdentifiers = [
+ ...computeMemberExpressionIdentifiers(),
+ ...computeQualifiedNameIdentifiers(),
+ ]
+ return sortingNodes.filter(sortingNode =>
+ doesSortingNodeHaveOneOfDependencyNames(sortingNode, relatedIdentifiers),
+ )
+ function computeMemberExpressionIdentifiers() {
+ return computeParentNodesWithTypes({
+ allowedTypes: [AST_NODE_TYPES.MemberExpression],
+ maxParent: referencingSortingNode.node,
+ node: reference.identifier,
+ consecutiveOnly: true,
+ })
+ .map(node => node.property)
+ .filter(property => property.type === AST_NODE_TYPES.Identifier)
+ .map(property => property.name)
+ }
+ function computeQualifiedNameIdentifiers() {
+ return computeParentNodesWithTypes({
+ allowedTypes: [AST_NODE_TYPES.TSQualifiedName],
+ maxParent: referencingSortingNode.node,
+ node: reference.identifier,
+ consecutiveOnly: true,
+ }).map(node => node.right.name)
+ }
+ }
+}
+function buildShouldIgnoreSortingNodeComputer(dependencyDetection) {
+ return sortingNode => {
+ switch (dependencyDetection) {
+ case 'hard':
+ return sortingNode.dependencyDetection !== 'hard'
+ case 'soft':
+ return false
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(dependencyDetection)
+ }
+ }
+}
+export { computeDependenciesBySortingNode }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules/compute-dependencies.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules/compute-dependencies.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..9988c807f5b75fa346ae86f8e279b4bcaf8b3625
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules/compute-dependencies.d.ts
@@ -0,0 +1,26 @@
+import { SortModulesNode } from './types.js'
+interface HardDependencyDetection {
+ searchStaticMethodsAndFunctionProperties: boolean
+ type: 'hard'
+}
+interface SoftDependencyDetection {
+ searchStaticMethodsAndFunctionProperties?: never
+ type: 'soft'
+}
+type DependencyDetection = HardDependencyDetection | SoftDependencyDetection
+/**
+ * Computes the dependencies of a given AST node.
+ *
+ * @deprecated - To remove when experimental dependency detection is the only
+ * option.
+ * @param node - The AST node to analyze.
+ * @param dependencyDetection - The dependency detection strategy. Hard
+ * dependencies consider dependencies impacting compilation, while soft
+ * dependencies also consider type references.
+ * @returns The names of the dependencies.
+ */
+export declare function computeDependencies(
+ node: SortModulesNode,
+ dependencyDetection: DependencyDetection,
+): string[]
+export {}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules/compute-dependencies.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules/compute-dependencies.js
new file mode 100644
index 0000000000000000000000000000000000000000..27dbc05f9ac7cd0f0b4b4b4a9e6e70c087c1b8e3
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules/compute-dependencies.js
@@ -0,0 +1,215 @@
+import { UnreachableCaseError } from '../../utils/unreachable-case-error.js'
+import { isArrowFunctionNode } from './is-arrow-function-node.js'
+import { getEnumMembers } from '../../utils/get-enum-members.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Computes the dependencies of a given AST node.
+ *
+ * @deprecated - To remove when experimental dependency detection is the only
+ * option.
+ * @param node - The AST node to analyze.
+ * @param dependencyDetection - The dependency detection strategy. Hard
+ * dependencies consider dependencies impacting compilation, while soft
+ * dependencies also consider type references.
+ * @returns The names of the dependencies.
+ */
+function computeDependencies(node, dependencyDetection) {
+ let dependencies = []
+ checkNode(node)
+ return dependencies
+ function checkNode(nodeToCheck, options) {
+ switch (dependencyDetection.type) {
+ case 'hard':
+ if (
+ (nodeToCheck.type === AST_NODE_TYPES.MethodDefinition ||
+ isArrowFunctionNode(nodeToCheck)) &&
+ (!nodeToCheck.static ||
+ !dependencyDetection.searchStaticMethodsAndFunctionProperties)
+ ) {
+ return
+ }
+ break
+ case 'soft':
+ checkNodesForSoftDependencies()
+ break
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(dependencyDetection)
+ }
+ checkNodesForCommonDependencies()
+ function checkNodesForCommonDependencies() {
+ if (
+ !options?.ignoreNextIdentifier &&
+ nodeToCheck.type === AST_NODE_TYPES.Identifier
+ ) {
+ dependencies.push(nodeToCheck.name)
+ }
+ if ('alternate' in nodeToCheck && nodeToCheck.alternate) {
+ checkNode(nodeToCheck.alternate)
+ }
+ if ('argument' in nodeToCheck && nodeToCheck.argument) {
+ checkNode(nodeToCheck.argument)
+ }
+ if ('arguments' in nodeToCheck) {
+ traverseNode(nodeToCheck.arguments)
+ }
+ if (
+ 'body' in nodeToCheck &&
+ nodeToCheck.body &&
+ nodeToCheck.type !== AST_NODE_TYPES.TSEnumDeclaration
+ ) {
+ traverseNode(nodeToCheck.body)
+ }
+ if ('callee' in nodeToCheck) {
+ checkNode(nodeToCheck.callee)
+ }
+ if ('consequent' in nodeToCheck) {
+ traverseNode(nodeToCheck.consequent)
+ }
+ if ('declarations' in nodeToCheck) {
+ traverseNode(nodeToCheck.declarations)
+ }
+ if ('decorators' in nodeToCheck) {
+ traverseNode(nodeToCheck.decorators)
+ }
+ if ('elements' in nodeToCheck) {
+ traverseNode(
+ nodeToCheck.elements.filter(currentNode => currentNode !== null),
+ )
+ }
+ if (
+ 'expression' in nodeToCheck &&
+ typeof nodeToCheck.expression !== 'boolean'
+ ) {
+ checkNode(nodeToCheck.expression)
+ }
+ if ('expressions' in nodeToCheck) {
+ traverseNode(nodeToCheck.expressions)
+ }
+ if ('init' in nodeToCheck && nodeToCheck.init) {
+ checkNode(nodeToCheck.init)
+ }
+ if ('initializer' in nodeToCheck && nodeToCheck.initializer) {
+ checkNode(nodeToCheck.initializer)
+ }
+ if ('left' in nodeToCheck) {
+ checkNode(nodeToCheck.left)
+ }
+ if (nodeToCheck.type === AST_NODE_TYPES.TSEnumDeclaration) {
+ traverseNode(getEnumMembers(nodeToCheck))
+ } else if ('members' in nodeToCheck) {
+ traverseNode(nodeToCheck.members)
+ }
+ if ('object' in nodeToCheck) {
+ checkNode(nodeToCheck.object)
+ }
+ if ('properties' in nodeToCheck) {
+ traverseNode(nodeToCheck.properties)
+ }
+ if ('property' in nodeToCheck) {
+ checkNode(nodeToCheck.property)
+ }
+ if ('right' in nodeToCheck) {
+ checkNode(nodeToCheck.right)
+ }
+ if ('superClass' in nodeToCheck && nodeToCheck.superClass) {
+ checkNode(nodeToCheck.superClass)
+ }
+ if ('test' in nodeToCheck && nodeToCheck.test) {
+ checkNode(nodeToCheck.test)
+ }
+ if (
+ 'value' in nodeToCheck &&
+ nodeToCheck.value &&
+ typeof nodeToCheck.value === 'object' &&
+ 'type' in nodeToCheck.value
+ ) {
+ checkNode(nodeToCheck.value)
+ }
+ }
+ function checkNodesForSoftDependencies() {
+ if ('checkType' in nodeToCheck) {
+ checkNode(nodeToCheck.checkType)
+ }
+ if ('constraint' in nodeToCheck && nodeToCheck.constraint) {
+ checkNode(nodeToCheck.constraint)
+ }
+ if ('declaration' in nodeToCheck && nodeToCheck.declaration) {
+ checkNode(nodeToCheck.declaration)
+ }
+ if ('elementTypes' in nodeToCheck) {
+ traverseNode(nodeToCheck.elementTypes)
+ }
+ if ('elementType' in nodeToCheck) {
+ checkNode(nodeToCheck.elementType)
+ }
+ if ('extends' in nodeToCheck) {
+ traverseNode(nodeToCheck.extends)
+ }
+ if ('extendsType' in nodeToCheck) {
+ checkNode(nodeToCheck.extendsType)
+ }
+ if ('exprName' in nodeToCheck) {
+ checkNode(nodeToCheck.exprName)
+ }
+ if ('falseType' in nodeToCheck) {
+ checkNode(nodeToCheck.falseType)
+ }
+ if ('key' in nodeToCheck) {
+ checkNode(nodeToCheck.key, { ignoreNextIdentifier: true })
+ }
+ if ('id' in nodeToCheck && nodeToCheck.id) {
+ checkNode(nodeToCheck.id)
+ }
+ if ('implements' in nodeToCheck) {
+ traverseNode(nodeToCheck.implements)
+ }
+ if ('indexType' in nodeToCheck) {
+ checkNode(nodeToCheck.indexType)
+ }
+ if ('name' in nodeToCheck && typeof nodeToCheck.name !== 'string') {
+ checkNode(nodeToCheck.name)
+ }
+ if ('objectType' in nodeToCheck) {
+ checkNode(nodeToCheck.objectType)
+ }
+ if ('params' in nodeToCheck) {
+ traverseNode(nodeToCheck.params, { ignoreNextIdentifier: true })
+ }
+ if ('returnType' in nodeToCheck && nodeToCheck.returnType) {
+ checkNode(nodeToCheck.returnType)
+ }
+ if ('trueType' in nodeToCheck) {
+ checkNode(nodeToCheck.trueType)
+ }
+ if ('typeAnnotation' in nodeToCheck && nodeToCheck.typeAnnotation) {
+ checkNode(nodeToCheck.typeAnnotation)
+ }
+ if ('typeArguments' in nodeToCheck && nodeToCheck.typeArguments) {
+ checkNode(nodeToCheck.typeArguments)
+ }
+ if ('typeName' in nodeToCheck) {
+ checkNode(nodeToCheck.typeName)
+ }
+ if ('typeParameters' in nodeToCheck && nodeToCheck.typeParameters) {
+ traverseNode(nodeToCheck.typeParameters)
+ }
+ if ('typeParameter' in nodeToCheck) {
+ checkNode(nodeToCheck.typeParameter)
+ }
+ if ('types' in nodeToCheck) {
+ traverseNode(nodeToCheck.types)
+ }
+ }
+ }
+ function traverseNode(nodeToTraverse, options) {
+ if (Array.isArray(nodeToTraverse)) {
+ for (let nodeItem of nodeToTraverse) {
+ traverseNode(nodeItem, options)
+ }
+ } else {
+ checkNode(nodeToTraverse, options)
+ }
+ }
+}
+export { computeDependencies }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules/compute-node-details.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules/compute-node-details.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..f5b07a5b3e62b9ca36750699d134c821fd6330d1
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules/compute-node-details.d.ts
@@ -0,0 +1,44 @@
+import { TSESTree } from '@typescript-eslint/types'
+import {
+ DependencyDetection,
+ SortModulesNode,
+ Modifier,
+ Selector,
+} from './types.js'
+interface ParsableNodeDetails {
+ nodeDetails: {
+ dependencyDetection: DependencyDetection
+ addSafetySemicolonWhenInline: boolean
+ decorators: TSESTree.Decorator[]
+ dependencies: string[]
+ modifiers: Modifier[]
+ selector: Selector
+ name: string
+ }
+ shouldPartitionAfterNode?: never
+ moduleBlock?: never
+}
+interface NonParsableNodeDetails {
+ moduleBlock: TSESTree.TSModuleBlock | null
+ shouldPartitionAfterNode: boolean
+ nodeDetails?: never
+}
+type Details = NonParsableNodeDetails | ParsableNodeDetails
+/**
+ * Compute details about a module-related node.
+ *
+ * @param params - The parameters object.
+ * @param params.node - The AST node to compute details for.
+ * @param params.useExperimentalDependencyDetection - Whether to use
+ * experimental dependency detection.
+ * @returns The computed details about the node, such as whether it should be
+ * ignored, if a module block was found, and information about the node.
+ */
+export declare function computeNodeDetails({
+ useExperimentalDependencyDetection,
+ node,
+}: {
+ useExperimentalDependencyDetection: boolean
+ node: SortModulesNode
+}): Details
+export {}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules/compute-node-details.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules/compute-node-details.js
new file mode 100644
index 0000000000000000000000000000000000000000..7f0d8e50a0ffce9c382772228d556ed2a1a31d9c
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules/compute-node-details.js
@@ -0,0 +1,153 @@
+import { getNodeDecorators } from '../../utils/get-node-decorators.js'
+import { isPropertyOrAccessorNode } from './is-property-or-accessor-node.js'
+import { isArrowFunctionNode } from './is-arrow-function-node.js'
+import { computeDependencies } from './compute-dependencies.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Compute details about a module-related node.
+ *
+ * @param params - The parameters object.
+ * @param params.node - The AST node to compute details for.
+ * @param params.useExperimentalDependencyDetection - Whether to use
+ * experimental dependency detection.
+ * @returns The computed details about the node, such as whether it should be
+ * ignored, if a module block was found, and information about the node.
+ */
+function computeNodeDetails({ useExperimentalDependencyDetection, node }) {
+ let selector
+ let name
+ let modifiers = []
+ let dependencies = []
+ let decorators = []
+ let addSafetySemicolonWhenInline = false
+ let moduleBlock = null
+ let shouldPartitionAfterNode = false
+ let dependencyDetection = 'soft'
+ function parseNode(nodeToParse) {
+ if ('declare' in nodeToParse && nodeToParse.declare) {
+ modifiers.push('declare')
+ }
+ switch (nodeToParse.type) {
+ case AST_NODE_TYPES.ExportDefaultDeclaration:
+ modifiers.push('default', 'export')
+ if ('decorators' in nodeToParse.declaration) {
+ decorators = getNodeDecorators(nodeToParse.declaration)
+ }
+ parseNode(nodeToParse.declaration)
+ break
+ case AST_NODE_TYPES.ExportNamedDeclaration:
+ if (nodeToParse.declaration) {
+ if ('decorators' in nodeToParse.declaration) {
+ decorators = getNodeDecorators(nodeToParse.declaration)
+ }
+ parseNode(nodeToParse.declaration)
+ }
+ modifiers.push('export')
+ break
+ case AST_NODE_TYPES.TSInterfaceDeclaration:
+ selector = 'interface'
+ ;({ name } = nodeToParse.id)
+ break
+ case AST_NODE_TYPES.TSTypeAliasDeclaration:
+ selector = 'type'
+ ;({ name } = nodeToParse.id)
+ addSafetySemicolonWhenInline = true
+ break
+ case AST_NODE_TYPES.FunctionDeclaration:
+ case AST_NODE_TYPES.TSDeclareFunction:
+ selector = 'function'
+ if (nodeToParse.async) {
+ modifiers.push('async')
+ }
+ if (modifiers.includes('declare')) {
+ addSafetySemicolonWhenInline = true
+ }
+ name = nodeToParse.id?.name
+ break
+ case AST_NODE_TYPES.TSModuleDeclaration:
+ shouldPartitionAfterNode = true
+ moduleBlock = nodeToParse.body ?? null
+ break
+ case AST_NODE_TYPES.VariableDeclaration:
+ shouldPartitionAfterNode = true
+ break
+ case AST_NODE_TYPES.TSEnumDeclaration:
+ selector = 'enum'
+ ;({ name } = nodeToParse.id)
+ dependencyDetection = 'hard'
+ dependencies.push(
+ ...extractDependencies(
+ nodeToParse,
+ useExperimentalDependencyDetection,
+ ),
+ )
+ break
+ case AST_NODE_TYPES.ClassDeclaration:
+ selector = 'class'
+ name = nodeToParse.id?.name
+ let nodeDecorators = getNodeDecorators(nodeToParse)
+ if (nodeDecorators[0]) {
+ modifiers.push('decorated')
+ }
+ decorators = nodeDecorators
+ dependencyDetection = 'hard'
+ dependencies.push(
+ ...extractDependencies(
+ nodeToParse,
+ useExperimentalDependencyDetection,
+ ),
+ )
+ }
+ }
+ parseNode(node)
+ if (!selector || !name) {
+ return {
+ shouldPartitionAfterNode,
+ moduleBlock,
+ }
+ }
+ return {
+ nodeDetails: {
+ addSafetySemicolonWhenInline,
+ dependencyDetection,
+ dependencies,
+ decorators,
+ modifiers,
+ selector,
+ name,
+ },
+ }
+}
+/**
+ * Extract dependencies from an enum or class declaration.
+ *
+ * @deprecated - To remove when experimental dependency detection is the only
+ * option.
+ * @param expression - The enum or class declaration node.
+ * @param useExperimentalDependencyDetection - Whether to use experimental
+ * dependency detection.
+ * @returns The list of dependencies.
+ */
+function extractDependencies(expression, useExperimentalDependencyDetection) {
+ if (useExperimentalDependencyDetection) {
+ return []
+ }
+ /**
+ * Search static methods only if there is a static block or a static property
+ * that is not an arrow function.
+ */
+ let searchStaticMethodsAndFunctionProperties =
+ expression.type === AST_NODE_TYPES.ClassDeclaration &&
+ expression.body.body.some(
+ classElement =>
+ classElement.type === AST_NODE_TYPES.StaticBlock ||
+ (classElement.static &&
+ isPropertyOrAccessorNode(classElement) &&
+ !isArrowFunctionNode(classElement)),
+ )
+ return computeDependencies(expression, {
+ searchStaticMethodsAndFunctionProperties,
+ type: 'hard',
+ })
+}
+export { computeNodeDetails }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules/compute-overload-signature-groups.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules/compute-overload-signature-groups.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..614893fb972cbb67daa9daba30aed79cc93742c2
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules/compute-overload-signature-groups.d.ts
@@ -0,0 +1,11 @@
+import { SortModulesNode } from './types.js'
+import { OverloadSignatureGroup } from '../../utils/overload-signature/overload-signature-group.js'
+/**
+ * Returns a list of groups of overload signatures.
+ *
+ * @param nodes - The nodes to process.
+ * @returns A list of overload signature groups.
+ */
+export declare function computeOverloadSignatureGroups(
+ nodes: SortModulesNode[],
+): OverloadSignatureGroup[]
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules/compute-overload-signature-groups.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules/compute-overload-signature-groups.js
new file mode 100644
index 0000000000000000000000000000000000000000..f6c11d1af916c1a57254d952796cc38c9eae4b56
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules/compute-overload-signature-groups.js
@@ -0,0 +1,85 @@
+import { isSortable } from '../../utils/is-sortable.js'
+import { OverloadSignatureGroup } from '../../utils/overload-signature/overload-signature-group.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Returns a list of groups of overload signatures.
+ *
+ * @param nodes - The nodes to process.
+ * @returns A list of overload signature groups.
+ */
+function computeOverloadSignatureGroups(nodes) {
+ let functionDetailsByName = /* @__PURE__ */ new Map()
+ for (let node of nodes) {
+ let functionDetails = computeNodeFunctionDetails(node)
+ if (!functionDetails) {
+ continue
+ }
+ let functionDetailsArray = functionDetailsByName.get(functionDetails.name)
+ if (!functionDetailsArray) {
+ functionDetailsArray = []
+ functionDetailsByName.set(functionDetails.name, functionDetailsArray)
+ }
+ functionDetailsArray.push({
+ ...functionDetails,
+ node,
+ })
+ }
+ let overloadSignatureGroups = []
+ for (let functionDetailsArray of functionDetailsByName.values()) {
+ if (isSortable(functionDetailsArray)) {
+ overloadSignatureGroups.push(
+ buildOverloadSignatureGroup(functionDetailsArray),
+ )
+ }
+ }
+ return overloadSignatureGroups
+}
+function computeNodeFunctionDetails(node) {
+ let currentNode = node
+ while (
+ currentNode.type === AST_NODE_TYPES.ExportDefaultDeclaration ||
+ currentNode.type === AST_NODE_TYPES.ExportNamedDeclaration
+ ) {
+ /* v8 ignore start -- @preserve Unsure how we can reach that case */
+ if (!currentNode.declaration) {
+ return null
+ }
+ /* v8 ignore stop -- @preserve Unsure how we can reach that case */
+ currentNode = currentNode.declaration
+ }
+ switch (currentNode.type) {
+ case AST_NODE_TYPES.FunctionDeclaration:
+ case AST_NODE_TYPES.TSDeclareFunction:
+ return computeFunctionDetails(currentNode)
+ default:
+ return null
+ }
+ function computeFunctionDetails(functionNode) {
+ /* v8 ignore if -- @preserve Unsure how we can reach that case */
+ if (!functionNode.id) {
+ return null
+ }
+ return {
+ isImplementation:
+ functionNode.type === AST_NODE_TYPES.FunctionDeclaration,
+ name: functionNode.id.name,
+ }
+ }
+}
+function buildOverloadSignatureGroup(functionDetailsArray) {
+ let implementation = (
+ functionDetailsArray.find(isFunctionImplementation) ??
+ functionDetailsArray.at(-1)
+ ).node
+ let overloadSignatures = functionDetailsArray
+ .filter(functionDetails => !isFunctionImplementation(functionDetails))
+ .map(functionDetails => functionDetails.node)
+ return new OverloadSignatureGroup({
+ overloadSignatures,
+ implementation,
+ })
+ function isFunctionImplementation(functionDetails) {
+ return functionDetails.isImplementation
+ }
+}
+export { computeOverloadSignatureGroups }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules/is-arrow-function-node.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules/is-arrow-function-node.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..586190e880e6f56e58cf314b19787221b3fec92e
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules/is-arrow-function-node.d.ts
@@ -0,0 +1,12 @@
+import { TSESTree } from '@typescript-eslint/types'
+/**
+ * Checks whether a node is a property or accessor node with an
+ * ArrowFunctionExpression value.
+ *
+ * @param node - The AST node to check.
+ * @returns True if the node is a property or accessor node with an
+ * ArrowFunctionExpression value, false otherwise.
+ */
+export declare function isArrowFunctionNode(
+ node: TSESTree.Node,
+): node is TSESTree.PropertyDefinition | TSESTree.AccessorProperty
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules/is-arrow-function-node.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules/is-arrow-function-node.js
new file mode 100644
index 0000000000000000000000000000000000000000..f9590605b93261166a5880c00eedd4151dd587de
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules/is-arrow-function-node.js
@@ -0,0 +1,18 @@
+import { isPropertyOrAccessorNode } from './is-property-or-accessor-node.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Checks whether a node is a property or accessor node with an
+ * ArrowFunctionExpression value.
+ *
+ * @param node - The AST node to check.
+ * @returns True if the node is a property or accessor node with an
+ * ArrowFunctionExpression value, false otherwise.
+ */
+function isArrowFunctionNode(node) {
+ return (
+ isPropertyOrAccessorNode(node) &&
+ node.value !== null &&
+ node.value.type === AST_NODE_TYPES.ArrowFunctionExpression
+ )
+}
+export { isArrowFunctionNode }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules/is-property-or-accessor-node.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules/is-property-or-accessor-node.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..209c101aace48b2d3695255dddf52856a0328b16
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules/is-property-or-accessor-node.d.ts
@@ -0,0 +1,11 @@
+import { TSESTree } from '@typescript-eslint/types'
+/**
+ * Checks whether a node is a PropertyDefinition or AccessorProperty.
+ *
+ * @param node - The AST node to check.
+ * @returns True if the node is a PropertyDefinition or AccessorProperty, false
+ * otherwise.
+ */
+export declare function isPropertyOrAccessorNode(
+ node: TSESTree.Node,
+): node is TSESTree.PropertyDefinition | TSESTree.AccessorProperty
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules/is-property-or-accessor-node.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules/is-property-or-accessor-node.js
new file mode 100644
index 0000000000000000000000000000000000000000..c85be07fbf37c84502ad0c4b6c277f9345199d7b
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules/is-property-or-accessor-node.js
@@ -0,0 +1,15 @@
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Checks whether a node is a PropertyDefinition or AccessorProperty.
+ *
+ * @param node - The AST node to check.
+ * @returns True if the node is a PropertyDefinition or AccessorProperty, false
+ * otherwise.
+ */
+function isPropertyOrAccessorNode(node) {
+ return (
+ node.type === AST_NODE_TYPES.PropertyDefinition ||
+ node.type === AST_NODE_TYPES.AccessorProperty
+ )
+}
+export { isPropertyOrAccessorNode }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules/types.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules/types.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..a0df96463c3ecf547ae9c0bc8404bfc05de56342
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules/types.d.ts
@@ -0,0 +1,114 @@
+import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'
+import { TSESTree } from '@typescript-eslint/types'
+import { SortingNodeWithDependencies } from '../../utils/sort-nodes-by-dependencies.js'
+import { NewlinesBetweenOption } from '../../types/common-groups-options.js'
+import { RegexOption, TypeOption } from '../../types/common-options.js'
+import { AllCommonOptions } from '../../types/all-common-options.js'
+/**
+ * Configuration options for the sort-modules rule.
+ *
+ * This rule enforces consistent ordering of module-level declarations (classes,
+ * interfaces, functions, types, enums) to improve code organization.
+ */
+export type Options = [
+ Partial<
+ {
+ /**
+ * Determines how many newlines should be placed between overload
+ * signatures of the same function.
+ */
+ newlinesBetweenOverloadSignatures: NewlinesBetweenOption
+ /**
+ * Enables experimental dependency detection.
+ */
+ useExperimentalDependencyDetection: boolean
+ } & AllCommonOptions<
+ CustomTypeOption,
+ AdditionalSortOptions,
+ CustomGroupMatchOptions
+ >
+ >,
+]
+export type SortModulesNode =
+ | TSESTree.ExportDefaultDeclaration
+ | TSESTree.ExportNamedDeclaration
+ | TSESTree.TSInterfaceDeclaration
+ | TSESTree.TSTypeAliasDeclaration
+ | TSESTree.FunctionDeclaration
+ | TSESTree.TSModuleDeclaration
+ | TSESTree.TSDeclareFunction
+ | TSESTree.TSEnumDeclaration
+ | TSESTree.ClassDeclaration
+/**
+ * Represents a sorting node for a module statement.
+ */
+export type SortModulesSortingNode = {
+ overloadSignatureImplementation: SortModulesNode | null
+ dependencyDetection: DependencyDetection
+} & SortingNodeWithDependencies
+/**
+ * Union type of all available module member selectors. Used to categorize
+ * different types of module-level declarations.
+ */
+export type Selector = (typeof allSelectors)[number]
+/**
+ * Union type of all available module member modifiers. Used to identify
+ * specific characteristics of module declarations.
+ */
+export type Modifier = (typeof allModifiers)[number]
+export type DependencyDetection = 'soft' | 'hard'
+/**
+ * Additional configuration for a single custom group.
+ *
+ * Custom groups allow fine-grained control over how module members are grouped
+ * and sorted based on their types, modifiers, and patterns.
+ */
+interface CustomGroupMatchOptions {
+ /**
+ * Regular expression pattern to match decorator names. Members with
+ * decorators matching this pattern will be included in this custom group.
+ */
+ decoratorNamePattern?: RegexOption
+ /**
+ * List of modifiers that members must have to be included in this group.
+ */
+ modifiers?: Modifier[]
+ /**
+ * The type of module member this group applies to.
+ */
+ selector?: Selector
+}
+type CustomTypeOption = typeof USAGE_TYPE_OPTION | TypeOption
+type AdditionalSortOptions = object
+/**
+ * Complete list of available module member selectors. Used for validation and
+ * JSON schema generation.
+ */
+export declare let allSelectors: readonly [
+ 'enum',
+ 'function',
+ 'interface',
+ 'type',
+ 'class',
+]
+/**
+ * Complete list of available module member modifiers. Used for validation and
+ * JSON schema generation.
+ */
+export declare let allModifiers: readonly [
+ 'async',
+ 'declare',
+ 'decorated',
+ 'default',
+ 'export',
+]
+/**
+ * Ideally, we should generate as many schemas as there are selectors, and
+ * ensure that users do not enter invalid modifiers for a given selector.
+ */
+export declare let additionalCustomGroupMatchOptionsJsonSchema: Record<
+ string,
+ JSONSchema4
+>
+export declare const USAGE_TYPE_OPTION = 'usage'
+export {}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules/types.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules/types.js
new file mode 100644
index 0000000000000000000000000000000000000000..479b4390222047ff966419c1f732467aeabf50a6
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-modules/types.js
@@ -0,0 +1,31 @@
+import { buildRegexJsonSchema } from '../../utils/json-schemas/common-json-schemas.js'
+import {
+ buildCustomGroupModifiersJsonSchema,
+ buildCustomGroupSelectorJsonSchema,
+} from '../../utils/json-schemas/common-groups-json-schemas.js'
+/**
+ * Complete list of available module member selectors. Used for validation and
+ * JSON schema generation.
+ */
+var allSelectors = ['enum', 'function', 'interface', 'type', 'class']
+/**
+ * Complete list of available module member modifiers. Used for validation and
+ * JSON schema generation.
+ */
+var allModifiers = ['async', 'declare', 'decorated', 'default', 'export']
+/**
+ * Ideally, we should generate as many schemas as there are selectors, and
+ * ensure that users do not enter invalid modifiers for a given selector.
+ */
+var additionalCustomGroupMatchOptionsJsonSchema = {
+ modifiers: buildCustomGroupModifiersJsonSchema(allModifiers),
+ selector: buildCustomGroupSelectorJsonSchema(allSelectors),
+ decoratorNamePattern: buildRegexJsonSchema(),
+}
+var USAGE_TYPE_OPTION = 'usage'
+export {
+ USAGE_TYPE_OPTION,
+ additionalCustomGroupMatchOptionsJsonSchema,
+ allModifiers,
+ allSelectors,
+}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-exports.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-exports.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..96958be6e9dc71a6407b00389644aceeaaaac6ea
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-exports.d.ts
@@ -0,0 +1,12 @@
+import { MessageId, Options } from './sort-named-exports/types.js'
+declare const _default: import('@typescript-eslint/utils/ts-eslint').RuleModule<
+ MessageId,
+ Options,
+ {
+ recommended?: boolean
+ },
+ import('@typescript-eslint/utils/ts-eslint').RuleListener
+> & {
+ name: string
+}
+export default _default
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-exports.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-exports.js
new file mode 100644
index 0000000000000000000000000000000000000000..5ee52bc0841235cbcda74e360d4d47ffd9aa48b4
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-exports.js
@@ -0,0 +1,82 @@
+import {
+ buildCommonJsonSchemas,
+ buildUseConfigIfJsonSchema,
+ matchesAstSelectorJsonSchema,
+} from '../utils/json-schemas/common-json-schemas.js'
+import { buildCommonGroupsJsonSchemas } from '../utils/json-schemas/common-groups-json-schemas.js'
+import {
+ EXTRA_SPACING_ERROR,
+ GROUP_ORDER_ERROR,
+ MISSED_SPACING_ERROR,
+ ORDER_ERROR,
+} from '../utils/report-errors.js'
+import {
+ partitionByCommentJsonSchema,
+ partitionByNewlineJsonSchema,
+} from '../utils/json-schemas/common-partition-json-schemas.js'
+import { buildAstListeners } from '../utils/build-ast-listeners.js'
+import { createEslintRule } from '../utils/create-eslint-rule.js'
+import {
+ EXTRA_SPACING_ERROR_ID,
+ GROUP_ORDER_ERROR_ID,
+ MISSED_SPACING_ERROR_ID,
+ ORDER_ERROR_ID,
+ additionalCustomGroupMatchOptionsJsonSchema,
+} from './sort-named-exports/types.js'
+import {
+ defaultOptions,
+ sortNamedExport,
+} from './sort-named-exports/sort-named-export.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+var sort_named_exports_default = createEslintRule({
+ meta: {
+ schema: {
+ items: {
+ properties: {
+ ...buildCommonJsonSchemas(),
+ ...buildCommonGroupsJsonSchemas({
+ additionalCustomGroupMatchProperties:
+ additionalCustomGroupMatchOptionsJsonSchema,
+ }),
+ useConfigurationIf: buildUseConfigIfJsonSchema({
+ additionalProperties: {
+ matchesAstSelector: matchesAstSelectorJsonSchema,
+ },
+ }),
+ ignoreAlias: {
+ description: 'Controls whether to ignore alias names.',
+ type: 'boolean',
+ },
+ partitionByComment: partitionByCommentJsonSchema,
+ partitionByNewLine: partitionByNewlineJsonSchema,
+ },
+ additionalProperties: false,
+ type: 'object',
+ },
+ uniqueItems: true,
+ type: 'array',
+ },
+ messages: {
+ [MISSED_SPACING_ERROR_ID]: MISSED_SPACING_ERROR,
+ [EXTRA_SPACING_ERROR_ID]: EXTRA_SPACING_ERROR,
+ [GROUP_ORDER_ERROR_ID]: GROUP_ORDER_ERROR,
+ [ORDER_ERROR_ID]: ORDER_ERROR,
+ },
+ docs: {
+ url: 'https://perfectionist.dev/rules/sort-named-exports',
+ description: 'Enforce sorted named exports.',
+ recommended: true,
+ },
+ type: 'suggestion',
+ fixable: 'code',
+ },
+ create: context =>
+ buildAstListeners({
+ nodeTypes: [AST_NODE_TYPES.ExportNamedDeclaration],
+ sorter: sortNamedExport,
+ context,
+ }),
+ defaultOptions: [defaultOptions],
+ name: 'sort-named-exports',
+})
+export { sort_named_exports_default as default }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-exports/compute-export-kind-modifier.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-exports/compute-export-kind-modifier.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..00eff981239360f533a8b1e3c48831dc02a25a11
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-exports/compute-export-kind-modifier.d.ts
@@ -0,0 +1,4 @@
+import { TSESTree } from '@typescript-eslint/types'
+export declare function computeExportKindModifier(
+ node: TSESTree.ExportSpecifier,
+): 'value' | 'type'
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-exports/compute-export-kind-modifier.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-exports/compute-export-kind-modifier.js
new file mode 100644
index 0000000000000000000000000000000000000000..f3a599e62730105d371cd8f69fea2c3745f27ac3
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-exports/compute-export-kind-modifier.js
@@ -0,0 +1,15 @@
+import { UnreachableCaseError } from '../../utils/unreachable-case-error.js'
+function computeExportKindModifier(node) {
+ let exportKind = 'exportKind' in node ? node.exportKind : void 0
+ switch (exportKind) {
+ case void 0:
+ case 'value':
+ return 'value'
+ case 'type':
+ return 'type'
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(exportKind)
+ }
+}
+export { computeExportKindModifier }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-exports/compute-matched-context-options.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-exports/compute-matched-context-options.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..3ccb45b0e117bc0a3ed569efec285614370f03e7
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-exports/compute-matched-context-options.d.ts
@@ -0,0 +1,23 @@
+import { RuleContext } from '@typescript-eslint/utils/ts-eslint'
+import { TSESTree } from '@typescript-eslint/types'
+import { MessageId, Options } from './types.js'
+/**
+ * Computes the matched context options for a given named export node.
+ *
+ * @param params - Parameters.
+ * @param params.node - The named export node to compute the context options
+ * for.
+ * @param params.matchedAstSelectors - The matched AST selectors for a named
+ * export node.
+ * @param params.context - The rule context.
+ * @returns The matched context options or undefined if none match.
+ */
+export declare function computeMatchedContextOptions({
+ matchedAstSelectors,
+ context,
+ node,
+}: {
+ context: Readonly>
+ matchedAstSelectors: ReadonlySet
+ node: TSESTree.ExportNamedDeclaration
+}): Options[number] | undefined
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-exports/compute-matched-context-options.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-exports/compute-matched-context-options.js
new file mode 100644
index 0000000000000000000000000000000000000000..1ae2518bbdbd6ab6a335df285bbc1a87f5d1d05b
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-exports/compute-matched-context-options.js
@@ -0,0 +1,42 @@
+import { passesAllNamesMatchPatternFilter } from '../../utils/context-matching/passes-all-names-match-pattern-filter.js'
+import { passesAstSelectorFilter } from '../../utils/context-matching/passes-ast-selector-filter.js'
+import { computeNodeName } from './compute-node-name.js'
+/**
+ * Computes the matched context options for a given named export node.
+ *
+ * @param params - Parameters.
+ * @param params.node - The named export node to compute the context options
+ * for.
+ * @param params.matchedAstSelectors - The matched AST selectors for a named
+ * export node.
+ * @param params.context - The rule context.
+ * @returns The matched context options or undefined if none match.
+ */
+function computeMatchedContextOptions({ matchedAstSelectors, context, node }) {
+ return context.options.find(options =>
+ isContextOptionMatching({
+ matchedAstSelectors,
+ options,
+ node,
+ }),
+ )
+}
+function isContextOptionMatching({ matchedAstSelectors, options, node }) {
+ if (!options.useConfigurationIf) {
+ return true
+ }
+ let nodeNames = node.specifiers.map(specifier =>
+ computeNodeName(specifier, !!options.ignoreAlias),
+ )
+ return (
+ passesAllNamesMatchPatternFilter({
+ allNamesMatchPattern: options.useConfigurationIf.allNamesMatchPattern,
+ nodeNames,
+ }) &&
+ passesAstSelectorFilter({
+ matchesAstSelector: options.useConfigurationIf.matchesAstSelector,
+ matchedAstSelectors,
+ })
+ )
+}
+export { computeMatchedContextOptions }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-exports/compute-node-name.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-exports/compute-node-name.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..9b1ad5f79bf5ca1db4a77fecd3863e5b68d42147
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-exports/compute-node-name.d.ts
@@ -0,0 +1,12 @@
+import { TSESTree } from '@typescript-eslint/types'
+/**
+ * Computes the name of an export specifier node.
+ *
+ * @param node - The export specifier node.
+ * @param ignoreAlias - Whether to ignore the alias and use the local name.
+ * @returns The computed name of the export specifier.
+ */
+export declare function computeNodeName(
+ node: TSESTree.ExportSpecifier,
+ ignoreAlias: boolean,
+): string
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-exports/compute-node-name.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-exports/compute-node-name.js
new file mode 100644
index 0000000000000000000000000000000000000000..022b1f12cefeb986040ab5ec778a058771c42a24
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-exports/compute-node-name.js
@@ -0,0 +1,22 @@
+import { UnreachableCaseError } from '../../utils/unreachable-case-error.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Computes the name of an export specifier node.
+ *
+ * @param node - The export specifier node.
+ * @param ignoreAlias - Whether to ignore the alias and use the local name.
+ * @returns The computed name of the export specifier.
+ */
+function computeNodeName(node, ignoreAlias) {
+ let identifierToCheck = ignoreAlias ? node.local : node.exported
+ switch (identifierToCheck.type) {
+ case AST_NODE_TYPES.Identifier:
+ return identifierToCheck.name
+ case AST_NODE_TYPES.Literal:
+ return identifierToCheck.value
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(identifierToCheck)
+ }
+}
+export { computeNodeName }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-exports/sort-named-export.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-exports/sort-named-export.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..88914e1f136aef993937248236f132df7232898b
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-exports/sort-named-export.d.ts
@@ -0,0 +1,13 @@
+import { TSESLint } from '@typescript-eslint/utils'
+import { TSESTree } from '@typescript-eslint/types'
+import { MessageId, Options } from './types.js'
+export declare let defaultOptions: Required
+export declare function sortNamedExport({
+ matchedAstSelectors,
+ context,
+ node,
+}: {
+ context: TSESLint.RuleContext
+ matchedAstSelectors: ReadonlySet
+ node: TSESTree.ExportNamedDeclaration
+}): void
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-exports/sort-named-export.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-exports/sort-named-export.js
new file mode 100644
index 0000000000000000000000000000000000000000..d8d745d8dfa2a22057c9cda2dda43b8db51b9ecf
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-exports/sort-named-export.js
@@ -0,0 +1,143 @@
+import { defaultComparatorByOptionsComputer } from '../../utils/compare/default-comparator-by-options-computer.js'
+import { validateNewlinesAndPartitionConfig } from '../../utils/validate-newlines-and-partition-config.js'
+import { buildOptionsByGroupIndexComputer } from '../../utils/build-options-by-group-index-computer.js'
+import { validateCustomSortConfig } from '../../utils/validate-custom-sort-config.js'
+import { generatePredefinedGroups } from '../../utils/generate-predefined-groups.js'
+import { getEslintDisabledLines } from '../../utils/get-eslint-disabled-lines.js'
+import { doesCustomGroupMatch } from '../../utils/does-custom-group-match.js'
+import { isNodeEslintDisabled } from '../../utils/is-node-eslint-disabled.js'
+import { validateGroupsConfig } from '../../utils/validate-groups-config.js'
+import { sortNodesByGroups } from '../../utils/sort-nodes-by-groups.js'
+import { reportAllErrors } from '../../utils/report-all-errors.js'
+import { shouldPartition } from '../../utils/should-partition.js'
+import { computeGroup } from '../../utils/compute-group.js'
+import { rangeToDiff } from '../../utils/range-to-diff.js'
+import { getSettings } from '../../utils/get-settings.js'
+import { isSortable } from '../../utils/is-sortable.js'
+import { complete } from '../../utils/complete.js'
+import {
+ EXTRA_SPACING_ERROR_ID,
+ GROUP_ORDER_ERROR_ID,
+ MISSED_SPACING_ERROR_ID,
+ ORDER_ERROR_ID,
+ allModifiers,
+ allSelectors,
+} from './types.js'
+import { computeNodeName } from './compute-node-name.js'
+import { computeMatchedContextOptions } from './compute-matched-context-options.js'
+import { computeExportKindModifier } from './compute-export-kind-modifier.js'
+/**
+ * Cache computed groups by modifiers and selectors for performance.
+ */
+var cachedGroupsByModifiersAndSelectors = /* @__PURE__ */ new Map()
+var defaultOptions = {
+ fallbackSort: { type: 'unsorted' },
+ newlinesInside: 'newlinesBetween',
+ specialCharacters: 'keep',
+ partitionByNewLine: false,
+ partitionByComment: false,
+ newlinesBetween: 'ignore',
+ useConfigurationIf: {},
+ type: 'alphabetical',
+ ignoreAlias: false,
+ customGroups: [],
+ ignoreCase: true,
+ locales: 'en-US',
+ alphabet: '',
+ order: 'asc',
+ groups: [],
+}
+function sortNamedExport({ matchedAstSelectors, context, node }) {
+ if (!isSortable(node.specifiers)) {
+ return
+ }
+ let settings = getSettings(context.settings)
+ let matchedContextOptions = computeMatchedContextOptions({
+ matchedAstSelectors,
+ context,
+ node,
+ })
+ let options = complete(matchedContextOptions, settings, defaultOptions)
+ validateCustomSortConfig(options)
+ validateGroupsConfig({
+ modifiers: allModifiers,
+ selectors: allSelectors,
+ options,
+ })
+ validateNewlinesAndPartitionConfig(options)
+ let { sourceCode, id } = context
+ let eslintDisabledLines = getEslintDisabledLines({
+ ruleName: id,
+ sourceCode,
+ })
+ let optionsByGroupIndexComputer = buildOptionsByGroupIndexComputer(options)
+ let formattedMembers = [[]]
+ for (let specifier of node.specifiers) {
+ let name = computeNodeName(specifier, options.ignoreAlias)
+ let selector = 'export'
+ let modifiers = [computeExportKindModifier(specifier)]
+ let predefinedGroups = generatePredefinedGroups({
+ cache: cachedGroupsByModifiersAndSelectors,
+ selectors: [selector],
+ modifiers,
+ })
+ let group = computeGroup({
+ customGroupMatcher: customGroup =>
+ doesCustomGroupMatch({
+ selectors: [selector],
+ elementName: name,
+ customGroup,
+ modifiers,
+ }),
+ predefinedGroups,
+ options,
+ })
+ let sortingNode = {
+ isEslintDisabled: isNodeEslintDisabled(specifier, eslintDisabledLines),
+ size: rangeToDiff(specifier, sourceCode),
+ node: specifier,
+ group,
+ name,
+ }
+ let lastSortingNode = formattedMembers.at(-1)?.at(-1)
+ if (
+ shouldPartition({
+ lastSortingNode,
+ sortingNode,
+ sourceCode,
+ options,
+ })
+ ) {
+ formattedMembers.push([])
+ }
+ formattedMembers.at(-1).push({
+ ...sortingNode,
+ partitionId: formattedMembers.length,
+ })
+ }
+ function sortNodesExcludingEslintDisabled(ignoreEslintDisabledNodes) {
+ return formattedMembers.flatMap(groupedNodes =>
+ sortNodesByGroups({
+ comparatorByOptionsComputer: defaultComparatorByOptionsComputer,
+ optionsByGroupIndexComputer,
+ ignoreEslintDisabledNodes,
+ groups: options.groups,
+ nodes: groupedNodes,
+ }),
+ )
+ }
+ let nodes = formattedMembers.flat()
+ reportAllErrors({
+ availableMessageIds: {
+ missedSpacingBetweenMembers: MISSED_SPACING_ERROR_ID,
+ extraSpacingBetweenMembers: EXTRA_SPACING_ERROR_ID,
+ unexpectedGroupOrder: GROUP_ORDER_ERROR_ID,
+ unexpectedOrder: ORDER_ERROR_ID,
+ },
+ sortNodesExcludingEslintDisabled,
+ options,
+ context,
+ nodes,
+ })
+}
+export { defaultOptions, sortNamedExport }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-exports/types.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-exports/types.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..5960915340f7d4ff93587cbec84126ce3ab4274e
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-exports/types.d.ts
@@ -0,0 +1,102 @@
+import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'
+import { TSESTree } from '@typescript-eslint/types'
+import { RegexOption, TypeOption } from '../../types/common-options.js'
+import { AllCommonOptions } from '../../types/all-common-options.js'
+import { SortingNode } from '../../types/sorting-node.js'
+export type MessageId =
+ | typeof MISSED_SPACING_ERROR_ID
+ | typeof EXTRA_SPACING_ERROR_ID
+ | typeof GROUP_ORDER_ERROR_ID
+ | typeof ORDER_ERROR_ID
+export declare const ORDER_ERROR_ID = 'unexpectedNamedExportsOrder'
+export declare const GROUP_ORDER_ERROR_ID = 'unexpectedNamedExportsGroupOrder'
+export declare const EXTRA_SPACING_ERROR_ID = 'extraSpacingBetweenNamedExports'
+export declare const MISSED_SPACING_ERROR_ID =
+ 'missedSpacingBetweenNamedExports'
+/**
+ * Configuration options for the sort-named-exports rule.
+ *
+ * Controls how named exports are sorted within export statements.
+ */
+export type Options = Partial<
+ {
+ /**
+ * Conditional configuration based on pattern matching.
+ */
+ useConfigurationIf: {
+ /**
+ * Regular expression pattern to match against all named export element
+ * names. The rule is only applied when all names match this pattern.
+ */
+ allNamesMatchPattern?: RegexOption
+ /**
+ * AST selector to match against ExportNamedDeclaration nodes.
+ */
+ matchesAstSelector?: string
+ }
+ /**
+ * Whether to ignore export aliases when sorting. When true, sorts by the
+ * original name rather than the alias.
+ *
+ * @default false
+ */
+ ignoreAlias: boolean
+ } & AllCommonOptions<
+ TypeOption,
+ AdditionalSortOptions,
+ CustomGroupMatchOptions
+ >
+>[]
+/**
+ * Extended sorting node for named export specifiers.
+ */
+export type SortNamedExportsSortingNode = SortingNode
+/**
+ * Union type of all available modifiers for named exports.
+ *
+ * Modifiers distinguish between type exports and value exports.
+ */
+export type Modifier = (typeof allModifiers)[number]
+/**
+ * Union type of all available selectors for named exports.
+ *
+ * Currently only includes the 'export' selector.
+ */
+export type Selector = (typeof allSelectors)[number]
+/**
+ * Match options for a custom group.
+ */
+interface CustomGroupMatchOptions {
+ /**
+ * Array of modifiers that exports must have to match this group. Can
+ * include 'type' for type exports or 'value' for value exports.
+ */
+ modifiers?: Modifier[]
+ /**
+ * The selector type this group matches. Currently only 'export' is
+ * available for named exports.
+ */
+ selector?: Selector
+}
+type AdditionalSortOptions = object
+/**
+ * Array of all available selectors for named exports.
+ *
+ * Used for validation and configuration in the ESLint rule.
+ */
+export declare let allSelectors: readonly ['export']
+/**
+ * Array of all available modifiers for named exports.
+ *
+ * Used for validation and configuration in the ESLint rule.
+ */
+export declare let allModifiers: readonly ['value', 'type']
+/**
+ * Additional custom group match options JSON schema. Used by ESLint to validate
+ * rule options at configuration time.
+ */
+export declare let additionalCustomGroupMatchOptionsJsonSchema: Record<
+ string,
+ JSONSchema4
+>
+export {}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-exports/types.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-exports/types.js
new file mode 100644
index 0000000000000000000000000000000000000000..f0b76fa34769f681fcb4f04daa222b7f453ce662
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-exports/types.js
@@ -0,0 +1,37 @@
+import {
+ buildCustomGroupModifiersJsonSchema,
+ buildCustomGroupSelectorJsonSchema,
+} from '../../utils/json-schemas/common-groups-json-schemas.js'
+var ORDER_ERROR_ID = 'unexpectedNamedExportsOrder'
+var GROUP_ORDER_ERROR_ID = 'unexpectedNamedExportsGroupOrder'
+var EXTRA_SPACING_ERROR_ID = 'extraSpacingBetweenNamedExports'
+var MISSED_SPACING_ERROR_ID = 'missedSpacingBetweenNamedExports'
+/**
+ * Array of all available selectors for named exports.
+ *
+ * Used for validation and configuration in the ESLint rule.
+ */
+var allSelectors = ['export']
+/**
+ * Array of all available modifiers for named exports.
+ *
+ * Used for validation and configuration in the ESLint rule.
+ */
+var allModifiers = ['value', 'type']
+/**
+ * Additional custom group match options JSON schema. Used by ESLint to validate
+ * rule options at configuration time.
+ */
+var additionalCustomGroupMatchOptionsJsonSchema = {
+ modifiers: buildCustomGroupModifiersJsonSchema(allModifiers),
+ selector: buildCustomGroupSelectorJsonSchema(allSelectors),
+}
+export {
+ EXTRA_SPACING_ERROR_ID,
+ GROUP_ORDER_ERROR_ID,
+ MISSED_SPACING_ERROR_ID,
+ ORDER_ERROR_ID,
+ additionalCustomGroupMatchOptionsJsonSchema,
+ allModifiers,
+ allSelectors,
+}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-imports.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-imports.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..b80baa0983530f21854bd188fd733b30a3ada285
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-imports.d.ts
@@ -0,0 +1,12 @@
+import { MessageId, Options } from './sort-named-imports/types.js'
+declare const _default: import('@typescript-eslint/utils/ts-eslint').RuleModule<
+ MessageId,
+ Options,
+ {
+ recommended?: boolean
+ },
+ import('@typescript-eslint/utils/ts-eslint').RuleListener
+> & {
+ name: string
+}
+export default _default
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-imports.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-imports.js
new file mode 100644
index 0000000000000000000000000000000000000000..704064a4c2e9173fbdbb62482fd4e24ed5516d77
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-imports.js
@@ -0,0 +1,82 @@
+import {
+ buildCommonJsonSchemas,
+ buildUseConfigIfJsonSchema,
+ matchesAstSelectorJsonSchema,
+} from '../utils/json-schemas/common-json-schemas.js'
+import { buildCommonGroupsJsonSchemas } from '../utils/json-schemas/common-groups-json-schemas.js'
+import {
+ EXTRA_SPACING_ERROR,
+ GROUP_ORDER_ERROR,
+ MISSED_SPACING_ERROR,
+ ORDER_ERROR,
+} from '../utils/report-errors.js'
+import {
+ partitionByCommentJsonSchema,
+ partitionByNewlineJsonSchema,
+} from '../utils/json-schemas/common-partition-json-schemas.js'
+import { buildAstListeners } from '../utils/build-ast-listeners.js'
+import { createEslintRule } from '../utils/create-eslint-rule.js'
+import {
+ EXTRA_SPACING_ERROR_ID,
+ GROUP_ORDER_ERROR_ID,
+ MISSED_SPACING_ERROR_ID,
+ ORDER_ERROR_ID,
+ additionalCustomGroupMatchOptionsJsonSchema,
+} from './sort-named-imports/types.js'
+import {
+ defaultOptions,
+ sortNamedImport,
+} from './sort-named-imports/sort-named-import.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+var sort_named_imports_default = createEslintRule({
+ meta: {
+ schema: {
+ items: {
+ properties: {
+ ...buildCommonJsonSchemas(),
+ ...buildCommonGroupsJsonSchemas({
+ additionalCustomGroupMatchProperties:
+ additionalCustomGroupMatchOptionsJsonSchema,
+ }),
+ useConfigurationIf: buildUseConfigIfJsonSchema({
+ additionalProperties: {
+ matchesAstSelector: matchesAstSelectorJsonSchema,
+ },
+ }),
+ ignoreAlias: {
+ description: 'Controls whether to ignore alias names.',
+ type: 'boolean',
+ },
+ partitionByComment: partitionByCommentJsonSchema,
+ partitionByNewLine: partitionByNewlineJsonSchema,
+ },
+ additionalProperties: false,
+ type: 'object',
+ },
+ uniqueItems: true,
+ type: 'array',
+ },
+ messages: {
+ [MISSED_SPACING_ERROR_ID]: MISSED_SPACING_ERROR,
+ [EXTRA_SPACING_ERROR_ID]: EXTRA_SPACING_ERROR,
+ [GROUP_ORDER_ERROR_ID]: GROUP_ORDER_ERROR,
+ [ORDER_ERROR_ID]: ORDER_ERROR,
+ },
+ docs: {
+ url: 'https://perfectionist.dev/rules/sort-named-imports',
+ description: 'Enforce sorted named imports.',
+ recommended: true,
+ },
+ type: 'suggestion',
+ fixable: 'code',
+ },
+ create: context =>
+ buildAstListeners({
+ nodeTypes: [AST_NODE_TYPES.ImportDeclaration],
+ sorter: sortNamedImport,
+ context,
+ }),
+ defaultOptions: [defaultOptions],
+ name: 'sort-named-imports',
+})
+export { sort_named_imports_default as default }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-imports/compute-import-kind-modifier.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-imports/compute-import-kind-modifier.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..12729c93ddc724f91b6f27020254838bc9d0370e
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-imports/compute-import-kind-modifier.d.ts
@@ -0,0 +1,4 @@
+import { TSESTree } from '@typescript-eslint/types'
+export declare function computeImportKindModifier(
+ node: TSESTree.ImportSpecifier,
+): 'value' | 'type'
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-imports/compute-import-kind-modifier.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-imports/compute-import-kind-modifier.js
new file mode 100644
index 0000000000000000000000000000000000000000..6f1053d10a7d168cfcdfbf578644dd877a7b15c2
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-imports/compute-import-kind-modifier.js
@@ -0,0 +1,15 @@
+import { UnreachableCaseError } from '../../utils/unreachable-case-error.js'
+function computeImportKindModifier(node) {
+ let importKind = 'importKind' in node ? node.importKind : void 0
+ switch (importKind) {
+ case void 0:
+ case 'value':
+ return 'value'
+ case 'type':
+ return 'type'
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(importKind)
+ }
+}
+export { computeImportKindModifier }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-imports/compute-matched-context-options.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-imports/compute-matched-context-options.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..8d32e4347faf85182f4173a7f0cf10d01da9856e
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-imports/compute-matched-context-options.d.ts
@@ -0,0 +1,23 @@
+import { RuleContext } from '@typescript-eslint/utils/ts-eslint'
+import { TSESTree } from '@typescript-eslint/types'
+import { MessageId, Options } from './types.js'
+/**
+ * Computes the matched context options for a given named import node.
+ *
+ * @param params - Parameters.
+ * @param params.node - The named import node to compute the context options
+ * for.
+ * @param params.matchedAstSelectors - The matched AST selectors for a named
+ * export node.
+ * @param params.context - The rule context.
+ * @returns The matched context options or undefined if none match.
+ */
+export declare function computeMatchedContextOptions({
+ matchedAstSelectors,
+ context,
+ node,
+}: {
+ context: Readonly>
+ matchedAstSelectors: ReadonlySet
+ node: TSESTree.ImportDeclaration
+}): Options[number] | undefined
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-imports/compute-matched-context-options.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-imports/compute-matched-context-options.js
new file mode 100644
index 0000000000000000000000000000000000000000..0ea41e17b26ded8547a775155981155eaefec0ee
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-imports/compute-matched-context-options.js
@@ -0,0 +1,43 @@
+import { passesAllNamesMatchPatternFilter } from '../../utils/context-matching/passes-all-names-match-pattern-filter.js'
+import { passesAstSelectorFilter } from '../../utils/context-matching/passes-ast-selector-filter.js'
+import { computeNodeName } from './compute-node-name.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Computes the matched context options for a given named import node.
+ *
+ * @param params - Parameters.
+ * @param params.node - The named import node to compute the context options
+ * for.
+ * @param params.matchedAstSelectors - The matched AST selectors for a named
+ * export node.
+ * @param params.context - The rule context.
+ * @returns The matched context options or undefined if none match.
+ */
+function computeMatchedContextOptions({ matchedAstSelectors, context, node }) {
+ return context.options.find(options =>
+ isContextOptionMatching({
+ matchedAstSelectors,
+ options,
+ node,
+ }),
+ )
+}
+function isContextOptionMatching({ matchedAstSelectors, options, node }) {
+ if (!options.useConfigurationIf) {
+ return true
+ }
+ let nodeNames = node.specifiers
+ .filter(specifier => specifier.type === AST_NODE_TYPES.ImportSpecifier)
+ .map(specifier => computeNodeName(specifier, !!options.ignoreAlias))
+ return (
+ passesAllNamesMatchPatternFilter({
+ allNamesMatchPattern: options.useConfigurationIf.allNamesMatchPattern,
+ nodeNames,
+ }) &&
+ passesAstSelectorFilter({
+ matchesAstSelector: options.useConfigurationIf.matchesAstSelector,
+ matchedAstSelectors,
+ })
+ )
+}
+export { computeMatchedContextOptions }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-imports/compute-node-name.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-imports/compute-node-name.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..51dfb726de5a2b244e0f08c752e1d0f025ee7fef
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-imports/compute-node-name.d.ts
@@ -0,0 +1,12 @@
+import { TSESTree } from '@typescript-eslint/types'
+/**
+ * Computes the name of an import specifier node.
+ *
+ * @param node - The import specifier node.
+ * @param ignoreAlias - Whether to ignore the alias and use the local name.
+ * @returns The computed name of the import specifier.
+ */
+export declare function computeNodeName(
+ node: TSESTree.ImportSpecifier,
+ ignoreAlias: boolean,
+): string
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-imports/compute-node-name.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-imports/compute-node-name.js
new file mode 100644
index 0000000000000000000000000000000000000000..0c2b193921227a431e9ca084aa5428a02a0219b8
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-imports/compute-node-name.js
@@ -0,0 +1,24 @@
+import { UnreachableCaseError } from '../../utils/unreachable-case-error.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Computes the name of an import specifier node.
+ *
+ * @param node - The import specifier node.
+ * @param ignoreAlias - Whether to ignore the alias and use the local name.
+ * @returns The computed name of the import specifier.
+ */
+function computeNodeName(node, ignoreAlias) {
+ if (!ignoreAlias) {
+ return node.local.name
+ }
+ switch (node.imported.type) {
+ case AST_NODE_TYPES.Identifier:
+ return node.imported.name
+ case AST_NODE_TYPES.Literal:
+ return node.imported.value
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(node.imported)
+ }
+}
+export { computeNodeName }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-imports/sort-named-import.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-imports/sort-named-import.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..f0aa2b077649cf8d1d9fd7c0c6442e7e9ffda382
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-imports/sort-named-import.d.ts
@@ -0,0 +1,13 @@
+import { TSESLint } from '@typescript-eslint/utils'
+import { TSESTree } from '@typescript-eslint/types'
+import { MessageId, Options } from './types.js'
+export declare let defaultOptions: Required
+export declare function sortNamedImport({
+ matchedAstSelectors,
+ context,
+ node,
+}: {
+ context: TSESLint.RuleContext
+ matchedAstSelectors: ReadonlySet
+ node: TSESTree.ImportDeclaration
+}): void
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-imports/sort-named-import.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-imports/sort-named-import.js
new file mode 100644
index 0000000000000000000000000000000000000000..b9ec4578fa581235efa1afc74f2484a701c804d5
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-imports/sort-named-import.js
@@ -0,0 +1,147 @@
+import { defaultComparatorByOptionsComputer } from '../../utils/compare/default-comparator-by-options-computer.js'
+import { validateNewlinesAndPartitionConfig } from '../../utils/validate-newlines-and-partition-config.js'
+import { buildOptionsByGroupIndexComputer } from '../../utils/build-options-by-group-index-computer.js'
+import { validateCustomSortConfig } from '../../utils/validate-custom-sort-config.js'
+import { generatePredefinedGroups } from '../../utils/generate-predefined-groups.js'
+import { getEslintDisabledLines } from '../../utils/get-eslint-disabled-lines.js'
+import { doesCustomGroupMatch } from '../../utils/does-custom-group-match.js'
+import { isNodeEslintDisabled } from '../../utils/is-node-eslint-disabled.js'
+import { validateGroupsConfig } from '../../utils/validate-groups-config.js'
+import { sortNodesByGroups } from '../../utils/sort-nodes-by-groups.js'
+import { reportAllErrors } from '../../utils/report-all-errors.js'
+import { shouldPartition } from '../../utils/should-partition.js'
+import { computeGroup } from '../../utils/compute-group.js'
+import { rangeToDiff } from '../../utils/range-to-diff.js'
+import { getSettings } from '../../utils/get-settings.js'
+import { isSortable } from '../../utils/is-sortable.js'
+import { complete } from '../../utils/complete.js'
+import {
+ EXTRA_SPACING_ERROR_ID,
+ GROUP_ORDER_ERROR_ID,
+ MISSED_SPACING_ERROR_ID,
+ ORDER_ERROR_ID,
+ allModifiers,
+ allSelectors,
+} from './types.js'
+import { computeNodeName } from './compute-node-name.js'
+import { computeMatchedContextOptions } from './compute-matched-context-options.js'
+import { computeImportKindModifier } from './compute-import-kind-modifier.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Cache computed groups by modifiers and selectors for performance.
+ */
+var cachedGroupsByModifiersAndSelectors = /* @__PURE__ */ new Map()
+var defaultOptions = {
+ fallbackSort: { type: 'unsorted' },
+ newlinesInside: 'newlinesBetween',
+ specialCharacters: 'keep',
+ partitionByNewLine: false,
+ partitionByComment: false,
+ newlinesBetween: 'ignore',
+ useConfigurationIf: {},
+ type: 'alphabetical',
+ ignoreAlias: false,
+ customGroups: [],
+ ignoreCase: true,
+ locales: 'en-US',
+ alphabet: '',
+ order: 'asc',
+ groups: [],
+}
+function sortNamedImport({ matchedAstSelectors, context, node }) {
+ let specifiers = node.specifiers.filter(
+ importClause => importClause.type === AST_NODE_TYPES.ImportSpecifier,
+ )
+ if (!isSortable(specifiers)) {
+ return
+ }
+ let settings = getSettings(context.settings)
+ let matchedContextOptions = computeMatchedContextOptions({
+ matchedAstSelectors,
+ context,
+ node,
+ })
+ let options = complete(matchedContextOptions, settings, defaultOptions)
+ validateCustomSortConfig(options)
+ validateGroupsConfig({
+ modifiers: allModifiers,
+ selectors: allSelectors,
+ options,
+ })
+ validateNewlinesAndPartitionConfig(options)
+ let { sourceCode, id } = context
+ let eslintDisabledLines = getEslintDisabledLines({
+ ruleName: id,
+ sourceCode,
+ })
+ let optionsByGroupIndexComputer = buildOptionsByGroupIndexComputer(options)
+ let formattedMembers = [[]]
+ for (let specifier of specifiers) {
+ let name = computeNodeName(specifier, options.ignoreAlias)
+ let selector = 'import'
+ let modifiers = [computeImportKindModifier(specifier)]
+ let predefinedGroups = generatePredefinedGroups({
+ cache: cachedGroupsByModifiersAndSelectors,
+ selectors: [selector],
+ modifiers,
+ })
+ let group = computeGroup({
+ customGroupMatcher: customGroup =>
+ doesCustomGroupMatch({
+ selectors: [selector],
+ elementName: name,
+ customGroup,
+ modifiers,
+ }),
+ predefinedGroups,
+ options,
+ })
+ let sortingNode = {
+ isEslintDisabled: isNodeEslintDisabled(specifier, eslintDisabledLines),
+ size: rangeToDiff(specifier, sourceCode),
+ node: specifier,
+ group,
+ name,
+ }
+ let lastSortingNode = formattedMembers.at(-1)?.at(-1)
+ if (
+ shouldPartition({
+ lastSortingNode,
+ sortingNode,
+ sourceCode,
+ options,
+ })
+ ) {
+ formattedMembers.push([])
+ }
+ formattedMembers.at(-1).push({
+ ...sortingNode,
+ partitionId: formattedMembers.length,
+ })
+ }
+ function sortNodesExcludingEslintDisabled(ignoreEslintDisabledNodes) {
+ return formattedMembers.flatMap(groupedNodes =>
+ sortNodesByGroups({
+ comparatorByOptionsComputer: defaultComparatorByOptionsComputer,
+ optionsByGroupIndexComputer,
+ ignoreEslintDisabledNodes,
+ groups: options.groups,
+ nodes: groupedNodes,
+ }),
+ )
+ }
+ let nodes = formattedMembers.flat()
+ reportAllErrors({
+ availableMessageIds: {
+ missedSpacingBetweenMembers: MISSED_SPACING_ERROR_ID,
+ extraSpacingBetweenMembers: EXTRA_SPACING_ERROR_ID,
+ unexpectedGroupOrder: GROUP_ORDER_ERROR_ID,
+ unexpectedOrder: ORDER_ERROR_ID,
+ },
+ sortNodesExcludingEslintDisabled,
+ options,
+ context,
+ nodes,
+ })
+}
+export { defaultOptions, sortNamedImport }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-imports/types.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-imports/types.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..5cea7eb00f1cee05c0b7dd7d60b93b18bd117e3d
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-imports/types.d.ts
@@ -0,0 +1,102 @@
+import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'
+import { TSESTree } from '@typescript-eslint/types'
+import { RegexOption, TypeOption } from '../../types/common-options.js'
+import { AllCommonOptions } from '../../types/all-common-options.js'
+import { SortingNode } from '../../types/sorting-node.js'
+export type MessageId =
+ | typeof MISSED_SPACING_ERROR_ID
+ | typeof EXTRA_SPACING_ERROR_ID
+ | typeof GROUP_ORDER_ERROR_ID
+ | typeof ORDER_ERROR_ID
+export declare const ORDER_ERROR_ID = 'unexpectedNamedImportsOrder'
+export declare const GROUP_ORDER_ERROR_ID = 'unexpectedNamedImportsGroupOrder'
+export declare const EXTRA_SPACING_ERROR_ID = 'extraSpacingBetweenNamedImports'
+export declare const MISSED_SPACING_ERROR_ID =
+ 'missedSpacingBetweenNamedImports'
+/**
+ * Configuration options for the sort-named-imports rule.
+ *
+ * Controls how named imports are sorted within import statements.
+ */
+export type Options = Partial<
+ {
+ /**
+ * Conditional configuration based on pattern matching.
+ */
+ useConfigurationIf: {
+ /**
+ * Regular expression pattern to match against all named import element
+ * names. The rule is only applied when all names match this pattern.
+ */
+ allNamesMatchPattern?: RegexOption
+ /**
+ * AST selector to match against ImportDeclaration nodes.
+ */
+ matchesAstSelector?: string
+ }
+ /**
+ * Whether to ignore import aliases when sorting. When true, sorts by the
+ * original name rather than the alias.
+ *
+ * @default false
+ */
+ ignoreAlias: boolean
+ } & AllCommonOptions<
+ TypeOption,
+ AdditionalSortOptions,
+ CustomGroupMatchOptions
+ >
+>[]
+/**
+ * Extended sorting node for named import specifiers.
+ */
+export type SortNamedImportsSortingNode = SortingNode
+/**
+ * Union type of all available modifiers for named imports.
+ *
+ * Modifiers distinguish between type imports and value imports.
+ */
+export type Modifier = (typeof allModifiers)[number]
+/**
+ * Union type of all available selectors for named imports.
+ *
+ * Currently only includes the 'import' selector.
+ */
+export type Selector = (typeof allSelectors)[number]
+/**
+ * Match options for a custom group.
+ */
+interface CustomGroupMatchOptions {
+ /**
+ * Array of modifiers that imports must have to match this group. Can
+ * include 'type' for type imports or 'value' for value imports.
+ */
+ modifiers?: Modifier[]
+ /**
+ * The selector type this group matches. Currently only 'import' is
+ * available for named imports.
+ */
+ selector?: Selector
+}
+type AdditionalSortOptions = object
+/**
+ * Array of all available selectors for named imports.
+ *
+ * Used for validation and configuration in the ESLint rule.
+ */
+export declare let allSelectors: readonly ['import']
+/**
+ * Array of all available modifiers for named imports.
+ *
+ * Used for validation and configuration in the ESLint rule.
+ */
+export declare let allModifiers: readonly ['value', 'type']
+/**
+ * Additional custom group match options JSON schema. Used by ESLint to validate
+ * rule options at configuration time.
+ */
+export declare let additionalCustomGroupMatchOptionsJsonSchema: Record<
+ string,
+ JSONSchema4
+>
+export {}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-imports/types.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-imports/types.js
new file mode 100644
index 0000000000000000000000000000000000000000..570a550908feb8fab1e09eeb3e9254faa3e9c045
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-named-imports/types.js
@@ -0,0 +1,37 @@
+import {
+ buildCustomGroupModifiersJsonSchema,
+ buildCustomGroupSelectorJsonSchema,
+} from '../../utils/json-schemas/common-groups-json-schemas.js'
+var ORDER_ERROR_ID = 'unexpectedNamedImportsOrder'
+var GROUP_ORDER_ERROR_ID = 'unexpectedNamedImportsGroupOrder'
+var EXTRA_SPACING_ERROR_ID = 'extraSpacingBetweenNamedImports'
+var MISSED_SPACING_ERROR_ID = 'missedSpacingBetweenNamedImports'
+/**
+ * Array of all available selectors for named imports.
+ *
+ * Used for validation and configuration in the ESLint rule.
+ */
+var allSelectors = ['import']
+/**
+ * Array of all available modifiers for named imports.
+ *
+ * Used for validation and configuration in the ESLint rule.
+ */
+var allModifiers = ['value', 'type']
+/**
+ * Additional custom group match options JSON schema. Used by ESLint to validate
+ * rule options at configuration time.
+ */
+var additionalCustomGroupMatchOptionsJsonSchema = {
+ modifiers: buildCustomGroupModifiersJsonSchema(allModifiers),
+ selector: buildCustomGroupSelectorJsonSchema(allSelectors),
+}
+export {
+ EXTRA_SPACING_ERROR_ID,
+ GROUP_ORDER_ERROR_ID,
+ MISSED_SPACING_ERROR_ID,
+ ORDER_ERROR_ID,
+ additionalCustomGroupMatchOptionsJsonSchema,
+ allModifiers,
+ allSelectors,
+}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..263fe94540e9dba43fbbd21025ec8399d70327ac
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types.d.ts
@@ -0,0 +1,24 @@
+import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'
+import { Options } from './sort-object-types/types.js'
+declare const ORDER_ERROR_ID = 'unexpectedObjectTypesOrder'
+declare const GROUP_ORDER_ERROR_ID = 'unexpectedObjectTypesGroupOrder'
+declare const EXTRA_SPACING_ERROR_ID = 'extraSpacingBetweenObjectTypeMembers'
+declare const MISSED_SPACING_ERROR_ID = 'missedSpacingBetweenObjectTypeMembers'
+type MessageId =
+ | typeof MISSED_SPACING_ERROR_ID
+ | typeof EXTRA_SPACING_ERROR_ID
+ | typeof GROUP_ORDER_ERROR_ID
+ | typeof ORDER_ERROR_ID
+export declare let defaultOptions: Required
+export declare let jsonSchema: JSONSchema4
+declare const _default: import('@typescript-eslint/utils/ts-eslint').RuleModule<
+ MessageId,
+ Options,
+ {
+ recommended?: boolean
+ },
+ import('@typescript-eslint/utils/ts-eslint').RuleListener
+> & {
+ name: string
+}
+export default _default
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types.js
new file mode 100644
index 0000000000000000000000000000000000000000..87fcb7609d67dafe7c23b09e925ed5c09f5cee03
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types.js
@@ -0,0 +1,132 @@
+import {
+ buildCommonJsonSchemas,
+ buildUseConfigIfJsonSchema,
+ matchesAstSelectorJsonSchema,
+} from '../utils/json-schemas/common-json-schemas.js'
+import { buildCommonGroupsJsonSchemas } from '../utils/json-schemas/common-groups-json-schemas.js'
+import {
+ EXTRA_SPACING_ERROR,
+ GROUP_ORDER_ERROR,
+ MISSED_SPACING_ERROR,
+ ORDER_ERROR,
+} from '../utils/report-errors.js'
+import {
+ partitionByCommentJsonSchema,
+ partitionByNewlineJsonSchema,
+} from '../utils/json-schemas/common-partition-json-schemas.js'
+import { computeParentNodesWithTypes } from '../utils/compute-parent-nodes-with-types.js'
+import { buildAstListeners } from '../utils/build-ast-listeners.js'
+import { createEslintRule } from '../utils/create-eslint-rule.js'
+import {
+ additionalCustomGroupMatchOptionsJsonSchema,
+ additionalSortOptionsJsonSchema,
+ objectTypeParentTypes,
+} from './sort-object-types/types.js'
+import { scopedRegexJsonSchema } from '../utils/json-schemas/scoped-regex-json-schema.js'
+import { sortObjectTypeElements } from './sort-object-types/sort-object-type-elements.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+var ORDER_ERROR_ID = 'unexpectedObjectTypesOrder'
+var GROUP_ORDER_ERROR_ID = 'unexpectedObjectTypesGroupOrder'
+var EXTRA_SPACING_ERROR_ID = 'extraSpacingBetweenObjectTypeMembers'
+var MISSED_SPACING_ERROR_ID = 'missedSpacingBetweenObjectTypeMembers'
+var defaultOptions = {
+ fallbackSort: {
+ type: 'unsorted',
+ sortBy: 'name',
+ },
+ newlinesInside: 'newlinesBetween',
+ partitionByComment: false,
+ partitionByNewLine: false,
+ newlinesBetween: 'ignore',
+ specialCharacters: 'keep',
+ useConfigurationIf: {},
+ type: 'alphabetical',
+ ignoreCase: true,
+ customGroups: [],
+ locales: 'en-US',
+ sortBy: 'name',
+ alphabet: '',
+ order: 'asc',
+ groups: [],
+}
+var jsonSchema = {
+ items: {
+ properties: {
+ ...buildCommonJsonSchemas({
+ additionalSortProperties: additionalSortOptionsJsonSchema,
+ }),
+ ...buildCommonGroupsJsonSchemas({
+ additionalCustomGroupMatchProperties:
+ additionalCustomGroupMatchOptionsJsonSchema,
+ additionalSortProperties: additionalSortOptionsJsonSchema,
+ }),
+ useConfigurationIf: buildUseConfigIfJsonSchema({
+ additionalProperties: {
+ hasNumericKeysOnly: {
+ description:
+ 'Specifies whether to only match types that have exclusively numeric keys.',
+ type: 'boolean',
+ },
+ declarationCommentMatchesPattern: scopedRegexJsonSchema,
+ matchesAstSelector: matchesAstSelectorJsonSchema,
+ declarationMatchesPattern: scopedRegexJsonSchema,
+ },
+ }),
+ partitionByComment: partitionByCommentJsonSchema,
+ partitionByNewLine: partitionByNewlineJsonSchema,
+ },
+ additionalProperties: false,
+ type: 'object',
+ },
+ uniqueItems: true,
+ type: 'array',
+}
+var sort_object_types_default = createEslintRule({
+ meta: {
+ messages: {
+ [MISSED_SPACING_ERROR_ID]: MISSED_SPACING_ERROR,
+ [EXTRA_SPACING_ERROR_ID]: EXTRA_SPACING_ERROR,
+ [GROUP_ORDER_ERROR_ID]: GROUP_ORDER_ERROR,
+ [ORDER_ERROR_ID]: ORDER_ERROR,
+ },
+ docs: {
+ url: 'https://perfectionist.dev/rules/sort-object-types',
+ description: 'Enforce sorted object types.',
+ recommended: true,
+ },
+ schema: jsonSchema,
+ type: 'suggestion',
+ fixable: 'code',
+ },
+ create: context =>
+ buildAstListeners({
+ nodeTypes: [AST_NODE_TYPES.TSTypeLiteral],
+ sorter: sortObjectType,
+ context,
+ }),
+ defaultOptions: [defaultOptions],
+ name: 'sort-object-types',
+})
+function sortObjectType({ matchedAstSelectors, context, node }) {
+ sortObjectTypeElements({
+ availableMessageIds: {
+ missedSpacingBetweenMembers: MISSED_SPACING_ERROR_ID,
+ extraSpacingBetweenMembers: EXTRA_SPACING_ERROR_ID,
+ unexpectedGroupOrder: GROUP_ORDER_ERROR_ID,
+ unexpectedOrder: ORDER_ERROR_ID,
+ },
+ parentNodes: computeObjectTypeParentNodes(node),
+ elements: node.members,
+ matchedAstSelectors,
+ context,
+ })
+}
+function computeObjectTypeParentNodes(node) {
+ return computeParentNodesWithTypes({
+ allowedTypes: [...objectTypeParentTypes],
+ consecutiveOnly: false,
+ maxParent: null,
+ node,
+ })
+}
+export { sort_object_types_default as default, defaultOptions, jsonSchema }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/comparator-by-options-computer.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/comparator-by-options-computer.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..fa17b06f4d8c811dd37059bfc698cb2171984efb
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/comparator-by-options-computer.d.ts
@@ -0,0 +1,6 @@
+import { ComparatorByOptionsComputer } from '../../utils/compare/default-comparator-by-options-computer.js'
+import { SortObjectTypesSortingNode, Options } from './types.js'
+export declare let comparatorByOptionsComputer: ComparatorByOptionsComputer<
+ Required,
+ SortObjectTypesSortingNode
+>
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/comparator-by-options-computer.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/comparator-by-options-computer.js
new file mode 100644
index 0000000000000000000000000000000000000000..ed729dac04ed851780dd90ea00f5282403450181
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/comparator-by-options-computer.js
@@ -0,0 +1,39 @@
+import { UnreachableCaseError } from '../../utils/unreachable-case-error.js'
+import { buildLineLengthComparator } from '../../utils/compare/build-line-length-comparator.js'
+import { compareAlphabetically } from '../../utils/compare/compare-alphabetically.js'
+import { compareByCustomSort } from '../../utils/compare/compare-by-custom-sort.js'
+import { unsortedComparator } from '../../utils/compare/unsorted-comparator.js'
+import { compareNaturally } from '../../utils/compare/compare-naturally.js'
+import { defaultComparatorByOptionsComputer } from '../../utils/compare/default-comparator-by-options-computer.js'
+var comparatorByOptionsComputer = options => {
+ switch (options.sortBy) {
+ case 'value':
+ return byValueComparatorComputer(options)
+ case 'name':
+ return defaultComparatorByOptionsComputer(options)
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(options.sortBy)
+ }
+}
+var byValueComparatorComputer = options => {
+ switch (options.type) {
+ /* v8 ignore next 2 -- @preserve Untested for now as not a relevant sort for this rule. */
+ case 'subgroup-order':
+ return defaultComparatorByOptionsComputer(options)
+ case 'alphabetical':
+ return (a, b) => compareAlphabetically(a.value, b.value, options)
+ case 'line-length':
+ return buildLineLengthComparator(options)
+ case 'unsorted':
+ return unsortedComparator
+ case 'natural':
+ return (a, b) => compareNaturally(a.value, b.value, options)
+ case 'custom':
+ return (a, b) => compareByCustomSort(a.value, b.value, options)
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(options.type)
+ }
+}
+export { comparatorByOptionsComputer }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/compute-matched-context-options.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/compute-matched-context-options.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..bfaddf7b397db3e0054c3b12759156e381cacbe5
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/compute-matched-context-options.d.ts
@@ -0,0 +1,26 @@
+import { TSESTree } from '@typescript-eslint/types'
+import { TSESLint } from '@typescript-eslint/utils'
+import { ObjectTypeParent, Options } from './types.js'
+/**
+ * Computes the matched context options for the given nodes.
+ *
+ * @param params - The parameters.
+ * @param params.sourceCode - The source code object.
+ * @param params.parentNodes - The parent nodes of the type elements.
+ * @param params.elements - The type elements.
+ * @param params.context - The rule context.
+ * @returns The matched context options, or undefined if none match.
+ */
+export declare function computeMatchedContextOptions({
+ matchedAstSelectors,
+ parentNodes,
+ sourceCode,
+ elements,
+ context,
+}: {
+ context: TSESLint.RuleContext
+ matchedAstSelectors: ReadonlySet
+ elements: TSESTree.TypeElement[]
+ parentNodes: ObjectTypeParent[]
+ sourceCode: TSESLint.SourceCode
+}): Options[number] | undefined
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/compute-matched-context-options.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/compute-matched-context-options.js
new file mode 100644
index 0000000000000000000000000000000000000000..c13175b3198ada898b994844adccf946cd24bfea
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/compute-matched-context-options.js
@@ -0,0 +1,106 @@
+import { UnreachableCaseError } from '../../utils/unreachable-case-error.js'
+import { passesAllNamesMatchPatternFilter } from '../../utils/context-matching/passes-all-names-match-pattern-filter.js'
+import { passesAstSelectorFilter } from '../../utils/context-matching/passes-ast-selector-filter.js'
+import { passesDeclarationMatchesPatternFilter } from './passes-declaration-matches-pattern-filter.js'
+import { passesDeclarationCommentMatchesFilter } from './passes-declaration-comment-matches-filter.js'
+import { computeNodeName } from './compute-node-name.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Computes the matched context options for the given nodes.
+ *
+ * @param params - The parameters.
+ * @param params.sourceCode - The source code object.
+ * @param params.parentNodes - The parent nodes of the type elements.
+ * @param params.elements - The type elements.
+ * @param params.context - The rule context.
+ * @returns The matched context options, or undefined if none match.
+ */
+function computeMatchedContextOptions({
+ matchedAstSelectors,
+ parentNodes,
+ sourceCode,
+ elements,
+ context,
+}) {
+ return context.options.find(options =>
+ isContextOptionMatching({
+ nodeNames: elements.map(node =>
+ computeNodeName({
+ sourceCode,
+ node,
+ }),
+ ),
+ matchedAstSelectors,
+ parentNodes,
+ sourceCode,
+ elements,
+ options,
+ }),
+ )
+}
+function isContextOptionMatching({
+ matchedAstSelectors,
+ parentNodes,
+ sourceCode,
+ nodeNames,
+ elements,
+ options,
+}) {
+ if (!options.useConfigurationIf) {
+ return true
+ }
+ return (
+ passesAllNamesMatchPatternFilter({
+ allNamesMatchPattern: options.useConfigurationIf.allNamesMatchPattern,
+ nodeNames,
+ }) &&
+ passesDeclarationMatchesPatternFilter({
+ declarationMatchesPattern:
+ options.useConfigurationIf.declarationMatchesPattern,
+ parentNodes,
+ sourceCode,
+ }) &&
+ passesHasNumericKeysOnlyFilter({
+ hasNumericKeysOnlyFilter: options.useConfigurationIf.hasNumericKeysOnly,
+ typeElements: elements,
+ }) &&
+ passesDeclarationCommentMatchesFilter({
+ declarationCommentMatchesPattern:
+ options.useConfigurationIf.declarationCommentMatchesPattern,
+ parentNodes,
+ sourceCode,
+ }) &&
+ passesAstSelectorFilter({
+ matchesAstSelector: options.useConfigurationIf.matchesAstSelector,
+ matchedAstSelectors,
+ })
+ )
+}
+function passesHasNumericKeysOnlyFilter({
+ hasNumericKeysOnlyFilter,
+ typeElements,
+}) {
+ let hasOnlyNumericKeys = hasNumericKeysOnly()
+ switch (hasNumericKeysOnlyFilter) {
+ case void 0:
+ return true
+ case false:
+ return !hasOnlyNumericKeys
+ case true:
+ return hasOnlyNumericKeys
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(hasNumericKeysOnlyFilter)
+ }
+ function hasNumericKeysOnly() {
+ return typeElements.every(isNumericKey)
+ function isNumericKey(typeElement) {
+ return (
+ typeElement.type === AST_NODE_TYPES.TSPropertySignature &&
+ typeElement.key.type === AST_NODE_TYPES.Literal &&
+ typeof typeElement.key.value === 'number'
+ )
+ }
+ }
+}
+export { computeMatchedContextOptions }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/compute-node-name.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/compute-node-name.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..512b7936ba910ad79a2a47a3c5395a652ef51b0e
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/compute-node-name.d.ts
@@ -0,0 +1,17 @@
+import { TSESTree } from '@typescript-eslint/types'
+import { TSESLint } from '@typescript-eslint/utils'
+/**
+ * Computes the name of an object-type-like node.
+ *
+ * @param props - The parameters object.
+ * @param props.sourceCode - ESLint source code object for text extraction.
+ * @param props.node - The AST node representing an object-type-like node.
+ * @returns The name of the object-type like node.
+ */
+export declare function computeNodeName({
+ sourceCode,
+ node,
+}: {
+ sourceCode: TSESLint.SourceCode
+ node: TSESTree.TypeElement
+}): string
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/compute-node-name.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/compute-node-name.js
new file mode 100644
index 0000000000000000000000000000000000000000..74929882d1edcb4a1659a08fa410ea4300bc85b7
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/compute-node-name.js
@@ -0,0 +1,56 @@
+import { UnreachableCaseError } from '../../utils/unreachable-case-error.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Computes the name of an object-type-like node.
+ *
+ * @param props - The parameters object.
+ * @param props.sourceCode - ESLint source code object for text extraction.
+ * @param props.node - The AST node representing an object-type-like node.
+ * @returns The name of the object-type like node.
+ */
+function computeNodeName({ sourceCode, node }) {
+ switch (node.type) {
+ case AST_NODE_TYPES.TSConstructSignatureDeclaration:
+ case AST_NODE_TYPES.TSCallSignatureDeclaration:
+ return formatName(sourceCode.getText(node))
+ case AST_NODE_TYPES.TSPropertySignature:
+ return computePropertySignatureName(node, sourceCode)
+ case AST_NODE_TYPES.TSMethodSignature:
+ return computeMethodSignatureName(node, sourceCode)
+ case AST_NODE_TYPES.TSIndexSignature:
+ return computeIndexSignatureName(node, sourceCode)
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(node)
+ }
+}
+function computePropertySignatureName(node, sourceCode) {
+ switch (node.key.type) {
+ case AST_NODE_TYPES.Identifier:
+ return node.key.name
+ case AST_NODE_TYPES.Literal:
+ return String(node.key.value)
+ default: {
+ let endIndex =
+ node.typeAnnotation?.range.at(0) ??
+ node.range.at(1) - (node.optional ? 1 : 0)
+ return sourceCode.text.slice(node.range.at(0), endIndex)
+ }
+ }
+}
+function computeMethodSignatureName(node, sourceCode) {
+ /* v8 ignore else -- @preserve Unsure if we can reach it. */
+ if ('name' in node.key) {
+ return node.key.name
+ }
+ /* v8 ignore next -- @preserve Unsure if we can reach it. */
+ return formatName(sourceCode.getText(node))
+}
+function computeIndexSignatureName(node, sourceCode) {
+ let endIndex = node.typeAnnotation?.range.at(0) ?? node.range.at(1)
+ return formatName(sourceCode.text.slice(node.range.at(0), endIndex))
+}
+function formatName(value) {
+ return value.replace(/[,;]$/u, '')
+}
+export { computeNodeName }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/compute-node-parent-name.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/compute-node-parent-name.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..d8a37385d8357df34ab78b63b869fcfbdf2564a6
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/compute-node-parent-name.d.ts
@@ -0,0 +1,13 @@
+import { TSESLint } from '@typescript-eslint/utils'
+import { ObjectTypeParent } from './types.js'
+/**
+ * Computes the name of an object-type-like parent node.
+ *
+ * @param node - The AST node representing an object-type-like node.
+ * @param sourceCode - ESLint source code object for text extraction.
+ * @returns The name of the object-type like node.
+ */
+export declare function computeNodeParentName(
+ node: ObjectTypeParent,
+ sourceCode: TSESLint.SourceCode,
+): string
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/compute-node-parent-name.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/compute-node-parent-name.js
new file mode 100644
index 0000000000000000000000000000000000000000..2c508490f41279d1bb35006f7f033676d7e78110
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/compute-node-parent-name.js
@@ -0,0 +1,45 @@
+import { UnreachableCaseError } from '../../utils/unreachable-case-error.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Computes the name of an object-type-like parent node.
+ *
+ * @param node - The AST node representing an object-type-like node.
+ * @param sourceCode - ESLint source code object for text extraction.
+ * @returns The name of the object-type like node.
+ */
+function computeNodeParentName(node, sourceCode) {
+ switch (node.type) {
+ case AST_NODE_TYPES.TSTypeAliasDeclaration:
+ case AST_NODE_TYPES.TSInterfaceDeclaration:
+ return node.id.name
+ case AST_NODE_TYPES.TSPropertySignature:
+ case AST_NODE_TYPES.PropertyDefinition:
+ return computePropertyName(node, sourceCode)
+ case AST_NODE_TYPES.VariableDeclarator:
+ return computeVariableDeclaratorName(node, sourceCode)
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(node)
+ }
+}
+function computePropertyName(propertySignature, sourceCode) {
+ switch (propertySignature.key.type) {
+ case AST_NODE_TYPES.Identifier:
+ return propertySignature.key.name
+ case AST_NODE_TYPES.Literal:
+ return String(propertySignature.key.value)
+ /* v8 ignore next 2 -- @preserve Unsure how we can reach that case */
+ default:
+ return sourceCode.getText(propertySignature.key)
+ }
+}
+function computeVariableDeclaratorName(variableDeclarator, sourceCode) {
+ if (!variableDeclarator.id.typeAnnotation) {
+ return sourceCode.getText(variableDeclarator.id)
+ }
+ return sourceCode.text.slice(
+ variableDeclarator.id.range[0],
+ variableDeclarator.id.typeAnnotation.range[0],
+ )
+}
+export { computeNodeParentName }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/is-member-optional.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/is-member-optional.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..884ce9959bd66c3ab4e37cd410d7c5eb9917aabf
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/is-member-optional.d.ts
@@ -0,0 +1,17 @@
+import { TSESTree } from '@typescript-eslint/types'
+/**
+ * Checks if a TypeScript type member is marked as optional.
+ *
+ * Determines whether a property or method signature in a TypeScript type or
+ * interface is optional (marked with '?'). Used for grouping optional and
+ * required members separately during sorting.
+ *
+ * @param node - AST node to check.
+ * @returns True if the member is optional, false otherwise.
+ */
+export declare function isMemberOptional(
+ node:
+ | TSESTree.TSPropertySignature
+ | TSESTree.TSMethodSignature
+ | TSESTree.TSIndexSignature,
+): boolean
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/is-member-optional.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/is-member-optional.js
new file mode 100644
index 0000000000000000000000000000000000000000..a7be1025aaa099831ce304901e50275edbd8277e
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/is-member-optional.js
@@ -0,0 +1,25 @@
+import { UnreachableCaseError } from '../../utils/unreachable-case-error.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Checks if a TypeScript type member is marked as optional.
+ *
+ * Determines whether a property or method signature in a TypeScript type or
+ * interface is optional (marked with '?'). Used for grouping optional and
+ * required members separately during sorting.
+ *
+ * @param node - AST node to check.
+ * @returns True if the member is optional, false otherwise.
+ */
+function isMemberOptional(node) {
+ switch (node.type) {
+ case AST_NODE_TYPES.TSPropertySignature:
+ case AST_NODE_TYPES.TSMethodSignature:
+ return node.optional
+ case AST_NODE_TYPES.TSIndexSignature:
+ return false
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(node)
+ }
+}
+export { isMemberOptional }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/is-node-function-type.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/is-node-function-type.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..1369b304fb23274228f0261c6acdfa416ed3aa07
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/is-node-function-type.d.ts
@@ -0,0 +1,57 @@
+import { TSESTree } from '@typescript-eslint/types'
+/**
+ * Determines if an AST node represents a function type.
+ *
+ * Recursively checks if a TypeScript node represents a function or method type.
+ * Handles various TypeScript type constructs including:
+ *
+ * - Method signatures (e.g., `method(): void`)
+ * - Function types (e.g., `() => void`)
+ * - Union types where all members are functions (e.g., `(() => void) | ((x:
+ * number) => void)`)
+ * - Intersection types where all members are functions
+ * - Property signatures with function type annotations (e.g., `prop: () =>
+ * void`).
+ *
+ * Used in sorting rules to identify and group function-like members separately
+ * from regular properties.
+ *
+ * @example
+ *
+ * ```ts
+ * // Method signature
+ * const methodNode = { type: 'TSMethodSignature', ... };
+ * isNodeFunctionType(methodNode); // Returns: true
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * // Property with function type
+ * const propNode = {
+ * type: 'TSPropertySignature',
+ * typeAnnotation: {
+ * typeAnnotation: { type: 'TSFunctionType', ... }
+ * }
+ * };
+ * isNodeFunctionType(propNode); // Returns: true
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * // Union of function types
+ * const unionNode = {
+ * type: 'TSUnionType',
+ * types: [
+ * { type: 'TSFunctionType', ... },
+ * { type: 'TSFunctionType', ... }
+ * ]
+ * };
+ * isNodeFunctionType(unionNode); // Returns: true
+ * ```
+ *
+ * @param node - TypeScript AST node to check.
+ * @returns True if the node represents a function type, false otherwise.
+ */
+export declare function isNodeFunctionType(node: TSESTree.Node): boolean
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/is-node-function-type.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/is-node-function-type.js
new file mode 100644
index 0000000000000000000000000000000000000000..2ae7b6e3abdaf62e7173684e13c364796e0637fa
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/is-node-function-type.js
@@ -0,0 +1,79 @@
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Determines if an AST node represents a function type.
+ *
+ * Recursively checks if a TypeScript node represents a function or method type.
+ * Handles various TypeScript type constructs including:
+ *
+ * - Method signatures (e.g., `method(): void`)
+ * - Function types (e.g., `() => void`)
+ * - Union types where all members are functions (e.g., `(() => void) | ((x:
+ * number) => void)`)
+ * - Intersection types where all members are functions
+ * - Property signatures with function type annotations (e.g., `prop: () =>
+ * void`).
+ *
+ * Used in sorting rules to identify and group function-like members separately
+ * from regular properties.
+ *
+ * @example
+ *
+ * ```ts
+ * // Method signature
+ * const methodNode = { type: 'TSMethodSignature', ... };
+ * isNodeFunctionType(methodNode); // Returns: true
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * // Property with function type
+ * const propNode = {
+ * type: 'TSPropertySignature',
+ * typeAnnotation: {
+ * typeAnnotation: { type: 'TSFunctionType', ... }
+ * }
+ * };
+ * isNodeFunctionType(propNode); // Returns: true
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * // Union of function types
+ * const unionNode = {
+ * type: 'TSUnionType',
+ * types: [
+ * { type: 'TSFunctionType', ... },
+ * { type: 'TSFunctionType', ... }
+ * ]
+ * };
+ * isNodeFunctionType(unionNode); // Returns: true
+ * ```
+ *
+ * @param node - TypeScript AST node to check.
+ * @returns True if the node represents a function type, false otherwise.
+ */
+function isNodeFunctionType(node) {
+ let currentNode = node
+ while (
+ currentNode.type === AST_NODE_TYPES.TSPropertySignature &&
+ currentNode.typeAnnotation
+ ) {
+ currentNode = currentNode.typeAnnotation.typeAnnotation
+ }
+ if (
+ currentNode.type === AST_NODE_TYPES.TSMethodSignature ||
+ currentNode.type === AST_NODE_TYPES.TSFunctionType
+ ) {
+ return true
+ }
+ if (
+ currentNode.type === AST_NODE_TYPES.TSUnionType ||
+ currentNode.type === AST_NODE_TYPES.TSIntersectionType
+ ) {
+ return currentNode.types.every(isNodeFunctionType)
+ }
+ return false
+}
+export { isNodeFunctionType }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/passes-declaration-comment-matches-filter.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/passes-declaration-comment-matches-filter.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..747242240729a244ccbf51111997f653f62c6128
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/passes-declaration-comment-matches-filter.d.ts
@@ -0,0 +1,21 @@
+import { TSESLint } from '@typescript-eslint/utils'
+import { ScopedRegexOption } from '../../types/scoped-regex-option.js'
+import { ObjectTypeParent } from './types.js'
+/**
+ * Checks if the object passes the declaration comment matches filter.
+ *
+ * @param params - Parameters.
+ * @param params.declarationCommentMatchesPattern - The pattern to evaluate.
+ * @param params.parentNodes - The parent nodes of the object type.
+ * @param params.sourceCode - The source code object.
+ * @returns True if the object type passes the filter, false otherwise.
+ */
+export declare function passesDeclarationCommentMatchesFilter({
+ declarationCommentMatchesPattern,
+ parentNodes,
+ sourceCode,
+}: {
+ declarationCommentMatchesPattern: ScopedRegexOption | undefined
+ parentNodes: ObjectTypeParent[]
+ sourceCode: TSESLint.SourceCode
+}): boolean
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/passes-declaration-comment-matches-filter.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/passes-declaration-comment-matches-filter.js
new file mode 100644
index 0000000000000000000000000000000000000000..b5eeb291b99261ad455723322b248990b5ffded8
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/passes-declaration-comment-matches-filter.js
@@ -0,0 +1,49 @@
+import { UnreachableCaseError } from '../../utils/unreachable-case-error.js'
+import { objectTypeParentTypes } from './types.js'
+import { matchesScopedExpressions } from '../../utils/scoped-regex/matches-scoped-expressions.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Checks if the object passes the declaration comment matches filter.
+ *
+ * @param params - Parameters.
+ * @param params.declarationCommentMatchesPattern - The pattern to evaluate.
+ * @param params.parentNodes - The parent nodes of the object type.
+ * @param params.sourceCode - The source code object.
+ * @returns True if the object type passes the filter, false otherwise.
+ */
+function passesDeclarationCommentMatchesFilter({
+ declarationCommentMatchesPattern,
+ parentNodes,
+ sourceCode,
+}) {
+ return matchesScopedExpressions({
+ nodeValuesComputer: buildNodeValuesComputer(sourceCode),
+ scopedRegexOption: declarationCommentMatchesPattern,
+ allowedNodeTypes: new Set(objectTypeParentTypes),
+ parentNodes,
+ })
+}
+function computeRelevantNodeForComment(objectParent) {
+ let objectParentType = objectParent.type
+ switch (objectParentType) {
+ case AST_NODE_TYPES.TSInterfaceDeclaration:
+ case AST_NODE_TYPES.TSTypeAliasDeclaration:
+ case AST_NODE_TYPES.TSPropertySignature:
+ case AST_NODE_TYPES.PropertyDefinition:
+ return objectParent
+ case AST_NODE_TYPES.VariableDeclarator:
+ return objectParent.parent
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(objectParentType)
+ }
+}
+function buildNodeValuesComputer(sourceCode) {
+ return node => {
+ let nodeForComment = computeRelevantNodeForComment(node)
+ return sourceCode
+ .getCommentsBefore(nodeForComment)
+ .map(comment => comment.value.trim())
+ }
+}
+export { passesDeclarationCommentMatchesFilter }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/passes-declaration-matches-pattern-filter.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/passes-declaration-matches-pattern-filter.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..060d28044e30c91014240ea9c95b828a44821849
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/passes-declaration-matches-pattern-filter.d.ts
@@ -0,0 +1,22 @@
+import { TSESLint } from '@typescript-eslint/utils'
+import { ScopedRegexOption } from '../../types/scoped-regex-option.js'
+import { ObjectTypeParent } from './types.js'
+/**
+ * Checks whether the parent node's name matches the given pattern.
+ *
+ * @param params - The parameters object.
+ * @param params.declarationMatchesPattern - The regex pattern to match against.
+ * @param params.parentNodes - The parent nodes to check.
+ * @param params.sourceCode - The source code object.
+ * @returns True if the parent node's name passes the pattern filter, false
+ * otherwise.
+ */
+export declare function passesDeclarationMatchesPatternFilter({
+ declarationMatchesPattern,
+ parentNodes,
+ sourceCode,
+}: {
+ declarationMatchesPattern: ScopedRegexOption | undefined
+ parentNodes: ObjectTypeParent[]
+ sourceCode: TSESLint.SourceCode
+}): boolean
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/passes-declaration-matches-pattern-filter.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/passes-declaration-matches-pattern-filter.js
new file mode 100644
index 0000000000000000000000000000000000000000..6c9033ae331a5a02aca7c80c235a568859fb7ea5
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/passes-declaration-matches-pattern-filter.js
@@ -0,0 +1,29 @@
+import { objectTypeParentTypes } from './types.js'
+import { matchesScopedExpressions } from '../../utils/scoped-regex/matches-scoped-expressions.js'
+import { computeNodeParentName } from './compute-node-parent-name.js'
+/**
+ * Checks whether the parent node's name matches the given pattern.
+ *
+ * @param params - The parameters object.
+ * @param params.declarationMatchesPattern - The regex pattern to match against.
+ * @param params.parentNodes - The parent nodes to check.
+ * @param params.sourceCode - The source code object.
+ * @returns True if the parent node's name passes the pattern filter, false
+ * otherwise.
+ */
+function passesDeclarationMatchesPatternFilter({
+ declarationMatchesPattern,
+ parentNodes,
+ sourceCode,
+}) {
+ return matchesScopedExpressions({
+ nodeValuesComputer: buildNodeValuesComputer(sourceCode),
+ allowedNodeTypes: new Set(objectTypeParentTypes),
+ scopedRegexOption: declarationMatchesPattern,
+ parentNodes,
+ })
+}
+function buildNodeValuesComputer(sourceCode) {
+ return node => [computeNodeParentName(node, sourceCode)]
+}
+export { passesDeclarationMatchesPatternFilter }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/sort-object-type-elements.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/sort-object-type-elements.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..8b2ee8b72f744f499d7af28dbb81eb13a5678b6b
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/sort-object-type-elements.d.ts
@@ -0,0 +1,21 @@
+import { RuleContext } from '@typescript-eslint/utils/ts-eslint'
+import { TSESTree } from '@typescript-eslint/types'
+import { ObjectTypeParent, Options } from './types.js'
+export declare function sortObjectTypeElements({
+ availableMessageIds,
+ matchedAstSelectors,
+ parentNodes,
+ elements,
+ context,
+}: {
+ availableMessageIds: {
+ missedSpacingBetweenMembers: MessageIds
+ extraSpacingBetweenMembers: MessageIds
+ unexpectedGroupOrder: MessageIds
+ unexpectedOrder: MessageIds
+ }
+ context: RuleContext
+ matchedAstSelectors: ReadonlySet
+ elements: TSESTree.TypeElement[]
+ parentNodes: ObjectTypeParent[]
+}): void
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/sort-object-type-elements.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/sort-object-type-elements.js
new file mode 100644
index 0000000000000000000000000000000000000000..31ac275a42fdf422feb1069e1147f3e4dff59bfb
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/sort-object-type-elements.js
@@ -0,0 +1,182 @@
+import { UnreachableCaseError } from '../../utils/unreachable-case-error.js'
+import { validateNewlinesAndPartitionConfig } from '../../utils/validate-newlines-and-partition-config.js'
+import { buildOptionsByGroupIndexComputer } from '../../utils/build-options-by-group-index-computer.js'
+import { validateCustomSortConfig } from '../../utils/validate-custom-sort-config.js'
+import { generatePredefinedGroups } from '../../utils/generate-predefined-groups.js'
+import { getEslintDisabledLines } from '../../utils/get-eslint-disabled-lines.js'
+import { doesCustomGroupMatch } from '../../utils/does-custom-group-match.js'
+import { isNodeEslintDisabled } from '../../utils/is-node-eslint-disabled.js'
+import { validateGroupsConfig } from '../../utils/validate-groups-config.js'
+import { sortNodesByGroups } from '../../utils/sort-nodes-by-groups.js'
+import { reportAllErrors } from '../../utils/report-all-errors.js'
+import { shouldPartition } from '../../utils/should-partition.js'
+import { computeGroup } from '../../utils/compute-group.js'
+import { rangeToDiff } from '../../utils/range-to-diff.js'
+import { getSettings } from '../../utils/get-settings.js'
+import { isSortable } from '../../utils/is-sortable.js'
+import { complete } from '../../utils/complete.js'
+import { allModifiers, allSelectors } from './types.js'
+import { computeNodeName } from './compute-node-name.js'
+import { computeMatchedContextOptions } from './compute-matched-context-options.js'
+import { comparatorByOptionsComputer } from './comparator-by-options-computer.js'
+import { isNodeOnSingleLine } from '../../utils/is-node-on-single-line.js'
+import { isNodeFunctionType } from './is-node-function-type.js'
+import { isMemberOptional } from './is-member-optional.js'
+import { defaultOptions } from '../sort-object-types.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Cache computed groups by modifiers and selectors for performance.
+ */
+var cachedGroupsByModifiersAndSelectors = /* @__PURE__ */ new Map()
+function sortObjectTypeElements({
+ availableMessageIds,
+ matchedAstSelectors,
+ parentNodes,
+ elements,
+ context,
+}) {
+ if (!isSortable(elements)) {
+ return
+ }
+ let settings = getSettings(context.settings)
+ let { sourceCode, id } = context
+ let matchedContextOptions = computeMatchedContextOptions({
+ matchedAstSelectors,
+ parentNodes,
+ sourceCode,
+ elements,
+ context,
+ })
+ let options = complete(matchedContextOptions, settings, defaultOptions)
+ validateCustomSortConfig(options)
+ validateGroupsConfig({
+ selectors: allSelectors,
+ modifiers: allModifiers,
+ options,
+ })
+ validateNewlinesAndPartitionConfig(options)
+ let eslintDisabledLines = getEslintDisabledLines({
+ ruleName: id,
+ sourceCode,
+ })
+ let optionsByGroupIndexComputer = buildOptionsByGroupIndexComputer(options)
+ let formattedMembers = [[]]
+ for (let typeElement of elements) {
+ if (
+ typeElement.type === AST_NODE_TYPES.TSCallSignatureDeclaration ||
+ typeElement.type === AST_NODE_TYPES.TSConstructSignatureDeclaration
+ ) {
+ formattedMembers.push([])
+ continue
+ }
+ let lastGroup = formattedMembers.at(-1)
+ let lastSortingNode = lastGroup?.at(-1)
+ let selectors = []
+ let modifiers = []
+ if (typeElement.type === AST_NODE_TYPES.TSIndexSignature) {
+ selectors.push('index-signature')
+ }
+ if (isNodeFunctionType(typeElement)) {
+ selectors.push('method')
+ }
+ if (!isNodeOnSingleLine(typeElement)) {
+ modifiers.push('multiline')
+ }
+ if (
+ ['index-signature', 'method'].every(
+ selector => !selectors.includes(selector),
+ )
+ ) {
+ selectors.push('property')
+ }
+ selectors.push('member')
+ if (isMemberOptional(typeElement)) {
+ modifiers.push('optional')
+ } else {
+ modifiers.push('required')
+ }
+ let name = computeNodeName({
+ node: typeElement,
+ sourceCode,
+ })
+ let value = null
+ if (
+ typeElement.type === AST_NODE_TYPES.TSPropertySignature &&
+ typeElement.typeAnnotation
+ ) {
+ value = sourceCode.getText(typeElement.typeAnnotation.typeAnnotation)
+ }
+ let predefinedGroups = generatePredefinedGroups({
+ cache: cachedGroupsByModifiersAndSelectors,
+ selectors,
+ modifiers,
+ })
+ let group = computeGroup({
+ customGroupMatcher: customGroup =>
+ doesCustomGroupMatch({
+ elementValue: value,
+ elementName: name,
+ customGroup,
+ selectors,
+ modifiers,
+ }),
+ predefinedGroups,
+ options,
+ })
+ let sortingNode = {
+ isEslintDisabled: isNodeEslintDisabled(typeElement, eslintDisabledLines),
+ size: rangeToDiff(typeElement, sourceCode),
+ addSafetySemicolonWhenInline: true,
+ value: value ?? '',
+ node: typeElement,
+ group,
+ name,
+ }
+ if (
+ shouldPartition({
+ lastSortingNode,
+ sortingNode,
+ sourceCode,
+ options,
+ })
+ ) {
+ lastGroup = []
+ formattedMembers.push(lastGroup)
+ }
+ lastGroup?.push({
+ ...sortingNode,
+ partitionId: formattedMembers.length,
+ })
+ }
+ let nodes = formattedMembers.flat()
+ reportAllErrors({
+ sortNodesExcludingEslintDisabled,
+ availableMessageIds,
+ options,
+ context,
+ nodes,
+ })
+ function sortNodesExcludingEslintDisabled(ignoreEslintDisabledNodes) {
+ return formattedMembers.flatMap(groupedNodes =>
+ sortNodesByGroups({
+ isNodeIgnoredForGroup: ({ groupOptions, node }) => {
+ switch (groupOptions.sortBy) {
+ case 'value':
+ return !node.value
+ case 'name':
+ return false
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(groupOptions.sortBy)
+ }
+ },
+ optionsByGroupIndexComputer,
+ comparatorByOptionsComputer,
+ ignoreEslintDisabledNodes,
+ groups: options.groups,
+ nodes: groupedNodes,
+ }),
+ )
+ }
+}
+export { sortObjectTypeElements }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/types.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/types.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..bbdcc458574c08569d8486ce9d1d4934f5860747
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/types.d.ts
@@ -0,0 +1,145 @@
+import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'
+import { TSESTree } from '@typescript-eslint/types'
+import { RegexOption, TypeOption } from '../../types/common-options.js'
+import { ScopedRegexOption } from '../../types/scoped-regex-option.js'
+import { AllCommonOptions } from '../../types/all-common-options.js'
+import { SortingNode } from '../../types/sorting-node.js'
+import { NodeOfType } from '../../types/node-of-type.js'
+/**
+ * Configuration options for the sort-object-types rule.
+ *
+ * Controls how object type properties, methods, and index signatures are sorted
+ * within TypeScript type literals and interfaces.
+ */
+export type Options = Partial<
+ {
+ /**
+ * Conditional configuration based on pattern matching. Allows applying the
+ * rule only when specific conditions are met.
+ */
+ useConfigurationIf: {
+ /**
+ * Regular expression pattern to match against the comment declaration.
+ * The rule is only applied to declaration comments with matching
+ * names.
+ */
+ declarationCommentMatchesPattern?: ScopedRegexOption
+ /**
+ * Regular expression pattern to match against the type declaration
+ * name. The rule is only applied to declarations with matching names.
+ */
+ declarationMatchesPattern?: ScopedRegexOption
+ /**
+ * Regular expression pattern to match against all member names. The
+ * rule is only applied when all member names match this pattern.
+ */
+ allNamesMatchPattern?: RegexOption
+ /**
+ * Specifies whether to only match types that have exclusively numeric
+ * keys.
+ */
+ hasNumericKeysOnly?: boolean
+ /**
+ * An ESLint AST selector to match against the node being sorted. The
+ * rule is only applied when the node matches this selector.
+ */
+ matchesAstSelector?: string
+ }
+ } & AllCommonOptions<
+ TypeOption,
+ AdditionalSortOptions,
+ CustomGroupMatchOptions
+ >
+>[]
+/**
+ * Extended sorting node for object type members.
+ *
+ * Represents an object type member with additional metadata needed for sorting,
+ * including whether the member is optional/required and its type annotation
+ * value.
+ */
+export interface SortObjectTypesSortingNode extends SortingNode {
+ /**
+ * The string representation of the member's type annotation. Used when
+ * sorting by value instead of name.
+ */
+ value: string
+}
+interface AdditionalSortOptions {
+ sortBy: SortByOption
+}
+export declare let objectTypeParentTypes: readonly [
+ TSESTree.AST_NODE_TYPES.TSTypeAliasDeclaration,
+ TSESTree.AST_NODE_TYPES.TSInterfaceDeclaration,
+ TSESTree.AST_NODE_TYPES.TSPropertySignature,
+ TSESTree.AST_NODE_TYPES.VariableDeclarator,
+ TSESTree.AST_NODE_TYPES.PropertyDefinition,
+]
+export type ObjectTypeParentType = (typeof objectTypeParentTypes)[number]
+export type ObjectTypeParent = NodeOfType
+/**
+ * Union type of all available selectors for object type members.
+ *
+ * Selectors identify the type of object member for grouping and sorting
+ * purposes.
+ */
+export type Selector = (typeof allSelectors)[number]
+/**
+ * Union type of all available modifiers for object type members.
+ *
+ * Modifiers provide additional context about member characteristics, such as
+ * whether they are optional, required, or span multiple lines.
+ */
+export type Modifier = (typeof allModifiers)[number]
+/**
+ * Match options for a custom group.
+ */
+interface CustomGroupMatchOptions {
+ /**
+ * Regular expression pattern to match against the member's type annotation
+ * value. Only applicable to properties.
+ */
+ elementValuePattern?: RegexOption
+ /**
+ * Array of modifiers that members must have to match this group. Only
+ * modifiers allowed for the specified selector type are valid.
+ */
+ modifiers?: Modifier[]
+ /**
+ * The selector type this group matches. Determines what kind of object
+ * members belong to this group.
+ */
+ selector?: Selector
+}
+/**
+ * Array of all available selectors for object type members.
+ *
+ * Used for validation and configuration in the ESLint rule.
+ */
+export declare let allSelectors: readonly [
+ 'index-signature',
+ 'member',
+ 'method',
+ 'property',
+]
+/**
+ * Array of all available modifiers for object type members.
+ *
+ * Used for validation and configuration in the ESLint rule.
+ */
+export declare let allModifiers: readonly ['optional', 'required', 'multiline']
+declare const SORT_BY_OPTION: readonly ['name', 'value']
+type SortByOption = (typeof SORT_BY_OPTION)[number]
+/**
+ * Additional sort options JSON schema, used by ESLint to validate rule options.
+ */
+export declare let additionalSortOptionsJsonSchema: Record
+/**
+ * Additional custom group match options JSON schema. Used by ESLint to validate
+ * rule options at configuration time.
+ */
+export declare let additionalCustomGroupMatchOptionsJsonSchema: Record<
+ string,
+ JSONSchema4
+>
+export {}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/types.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/types.js
new file mode 100644
index 0000000000000000000000000000000000000000..5aa6fa3498dd58024daea8fd2bc6225dce4c1161
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-object-types/types.js
@@ -0,0 +1,50 @@
+import { buildRegexJsonSchema } from '../../utils/json-schemas/common-json-schemas.js'
+import {
+ buildCustomGroupModifiersJsonSchema,
+ buildCustomGroupSelectorJsonSchema,
+} from '../../utils/json-schemas/common-groups-json-schemas.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+var objectTypeParentTypes = [
+ AST_NODE_TYPES.TSTypeAliasDeclaration,
+ AST_NODE_TYPES.TSInterfaceDeclaration,
+ AST_NODE_TYPES.TSPropertySignature,
+ AST_NODE_TYPES.VariableDeclarator,
+ AST_NODE_TYPES.PropertyDefinition,
+]
+/**
+ * Array of all available selectors for object type members.
+ *
+ * Used for validation and configuration in the ESLint rule.
+ */
+var allSelectors = ['index-signature', 'member', 'method', 'property']
+/**
+ * Array of all available modifiers for object type members.
+ *
+ * Used for validation and configuration in the ESLint rule.
+ */
+var allModifiers = ['optional', 'required', 'multiline']
+/**
+ * Additional sort options JSON schema, used by ESLint to validate rule options.
+ */
+var additionalSortOptionsJsonSchema = {
+ sortBy: {
+ enum: [...['name', 'value']],
+ type: 'string',
+ },
+}
+/**
+ * Additional custom group match options JSON schema. Used by ESLint to validate
+ * rule options at configuration time.
+ */
+var additionalCustomGroupMatchOptionsJsonSchema = {
+ modifiers: buildCustomGroupModifiersJsonSchema(allModifiers),
+ selector: buildCustomGroupSelectorJsonSchema(allSelectors),
+ elementValuePattern: buildRegexJsonSchema(),
+}
+export {
+ additionalCustomGroupMatchOptionsJsonSchema,
+ additionalSortOptionsJsonSchema,
+ allModifiers,
+ allSelectors,
+ objectTypeParentTypes,
+}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..c951b1083d3e0789e201abd480a6eff0b14b663f
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects.d.ts
@@ -0,0 +1,12 @@
+import { MessageId, Options } from './sort-objects/types.js'
+declare const _default: import('@typescript-eslint/utils/ts-eslint').RuleModule<
+ MessageId,
+ Options,
+ {
+ recommended?: boolean
+ },
+ import('@typescript-eslint/utils/ts-eslint').RuleListener
+> & {
+ name: string
+}
+export default _default
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects.js
new file mode 100644
index 0000000000000000000000000000000000000000..9c3f70e5351b688ae398642a7c09e55df761a0b9
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects.js
@@ -0,0 +1,112 @@
+import {
+ buildCommonJsonSchemas,
+ buildUseConfigIfJsonSchema,
+ matchesAstSelectorJsonSchema,
+ useExperimentalDependencyDetectionJsonSchema,
+} from '../utils/json-schemas/common-json-schemas.js'
+import { buildCommonGroupsJsonSchemas } from '../utils/json-schemas/common-groups-json-schemas.js'
+import {
+ DEPENDENCY_ORDER_ERROR,
+ EXTRA_SPACING_ERROR,
+ GROUP_ORDER_ERROR,
+ MISSED_SPACING_ERROR,
+ ORDER_ERROR,
+} from '../utils/report-errors.js'
+import {
+ partitionByCommentJsonSchema,
+ partitionByNewlineJsonSchema,
+} from '../utils/json-schemas/common-partition-json-schemas.js'
+import { buildAstListeners } from '../utils/build-ast-listeners.js'
+import { createEslintRule } from '../utils/create-eslint-rule.js'
+import { scopedRegexJsonSchema } from '../utils/json-schemas/scoped-regex-json-schema.js'
+import {
+ DEPENDENCY_ORDER_ERROR_ID,
+ EXTRA_SPACING_ERROR_ID,
+ GROUP_ORDER_ERROR_ID,
+ MISSED_SPACING_ERROR_ID,
+ ORDER_ERROR_ID,
+ additionalCustomGroupMatchOptionsJsonSchema,
+ additionalSortOptionsJsonSchema,
+} from './sort-objects/types.js'
+import { defaultOptions, sortObject } from './sort-objects/sort-object.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+var sort_objects_default = createEslintRule({
+ meta: {
+ schema: {
+ items: {
+ properties: {
+ ...buildCommonJsonSchemas({
+ additionalSortProperties: additionalSortOptionsJsonSchema,
+ }),
+ ...buildCommonGroupsJsonSchemas({
+ additionalCustomGroupMatchProperties:
+ additionalCustomGroupMatchOptionsJsonSchema,
+ additionalSortProperties: additionalSortOptionsJsonSchema,
+ }),
+ useConfigurationIf: buildUseConfigIfJsonSchema({
+ additionalProperties: {
+ objectType: {
+ description:
+ 'Specifies whether to only match destructured objects or regular objects.',
+ enum: ['destructured', 'non-destructured'],
+ type: 'string',
+ },
+ hasNumericKeysOnly: {
+ description:
+ 'Specifies whether to only match objects that have exclusively numeric keys.',
+ type: 'boolean',
+ },
+ declarationCommentMatchesPattern: scopedRegexJsonSchema,
+ callingFunctionNamePattern: scopedRegexJsonSchema,
+ matchesAstSelector: matchesAstSelectorJsonSchema,
+ declarationMatchesPattern: scopedRegexJsonSchema,
+ },
+ }),
+ partitionByComputedKey: {
+ description:
+ 'Controls whether to partition objects by computed keys.',
+ type: 'boolean',
+ },
+ styledComponents: {
+ description: 'Controls whether to sort styled components.',
+ type: 'boolean',
+ },
+ useExperimentalDependencyDetection:
+ useExperimentalDependencyDetectionJsonSchema,
+ partitionByComment: partitionByCommentJsonSchema,
+ partitionByNewLine: partitionByNewlineJsonSchema,
+ },
+ additionalProperties: false,
+ type: 'object',
+ },
+ uniqueItems: true,
+ type: 'array',
+ },
+ messages: {
+ [DEPENDENCY_ORDER_ERROR_ID]: DEPENDENCY_ORDER_ERROR,
+ [MISSED_SPACING_ERROR_ID]: MISSED_SPACING_ERROR,
+ [EXTRA_SPACING_ERROR_ID]: EXTRA_SPACING_ERROR,
+ [GROUP_ORDER_ERROR_ID]: GROUP_ORDER_ERROR,
+ [ORDER_ERROR_ID]: ORDER_ERROR,
+ },
+ docs: {
+ url: 'https://perfectionist.dev/rules/sort-objects',
+ description: 'Enforce sorted objects.',
+ recommended: true,
+ },
+ type: 'suggestion',
+ fixable: 'code',
+ },
+ create: context =>
+ buildAstListeners({
+ nodeTypes: [
+ AST_NODE_TYPES.ObjectPattern,
+ AST_NODE_TYPES.ObjectExpression,
+ ],
+ sorter: sortObject,
+ context,
+ }),
+ defaultOptions: [defaultOptions],
+ name: 'sort-objects',
+})
+export { sort_objects_default as default }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/comparator-by-options-computer.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/comparator-by-options-computer.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..9a9649be140aedf67d4e0bcd8c9e76a97b103f44
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/comparator-by-options-computer.d.ts
@@ -0,0 +1,6 @@
+import { ComparatorByOptionsComputer } from '../../utils/compare/default-comparator-by-options-computer.js'
+import { SortObjectsSortingNode, Options } from './types.js'
+export declare let comparatorByOptionsComputer: ComparatorByOptionsComputer<
+ Required,
+ SortObjectsSortingNode
+>
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/comparator-by-options-computer.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/comparator-by-options-computer.js
new file mode 100644
index 0000000000000000000000000000000000000000..ed729dac04ed851780dd90ea00f5282403450181
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/comparator-by-options-computer.js
@@ -0,0 +1,39 @@
+import { UnreachableCaseError } from '../../utils/unreachable-case-error.js'
+import { buildLineLengthComparator } from '../../utils/compare/build-line-length-comparator.js'
+import { compareAlphabetically } from '../../utils/compare/compare-alphabetically.js'
+import { compareByCustomSort } from '../../utils/compare/compare-by-custom-sort.js'
+import { unsortedComparator } from '../../utils/compare/unsorted-comparator.js'
+import { compareNaturally } from '../../utils/compare/compare-naturally.js'
+import { defaultComparatorByOptionsComputer } from '../../utils/compare/default-comparator-by-options-computer.js'
+var comparatorByOptionsComputer = options => {
+ switch (options.sortBy) {
+ case 'value':
+ return byValueComparatorComputer(options)
+ case 'name':
+ return defaultComparatorByOptionsComputer(options)
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(options.sortBy)
+ }
+}
+var byValueComparatorComputer = options => {
+ switch (options.type) {
+ /* v8 ignore next 2 -- @preserve Untested for now as not a relevant sort for this rule. */
+ case 'subgroup-order':
+ return defaultComparatorByOptionsComputer(options)
+ case 'alphabetical':
+ return (a, b) => compareAlphabetically(a.value, b.value, options)
+ case 'line-length':
+ return buildLineLengthComparator(options)
+ case 'unsorted':
+ return unsortedComparator
+ case 'natural':
+ return (a, b) => compareNaturally(a.value, b.value, options)
+ case 'custom':
+ return (a, b) => compareByCustomSort(a.value, b.value, options)
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(options.type)
+ }
+}
+export { comparatorByOptionsComputer }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/compute-dependencies.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/compute-dependencies.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..da6079b478c2e315b39c04ded81c7bbbae287308
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/compute-dependencies.d.ts
@@ -0,0 +1,2 @@
+import { SortObjectsNode } from './types.js'
+export declare function computeDependencies(node: SortObjectsNode): string[]
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/compute-dependencies.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/compute-dependencies.js
new file mode 100644
index 0000000000000000000000000000000000000000..20e0962c466c61c3ab9dc653b868739129f130f7
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/compute-dependencies.js
@@ -0,0 +1,77 @@
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+function computeDependencies(node) {
+ if (node.value.type !== AST_NODE_TYPES.AssignmentPattern) {
+ return []
+ }
+ let dependencies = []
+ traverseNode(node.value.right)
+ return dependencies
+ function checkNode(nodeValue) {
+ /**
+ * No need to check the body of functions and arrow functions.
+ */
+ if (
+ nodeValue.type === AST_NODE_TYPES.ArrowFunctionExpression ||
+ nodeValue.type === AST_NODE_TYPES.FunctionExpression
+ ) {
+ return
+ }
+ if (nodeValue.type === AST_NODE_TYPES.Identifier) {
+ dependencies.push(nodeValue.name)
+ }
+ if (nodeValue.type === AST_NODE_TYPES.Property) {
+ traverseNode(nodeValue.key)
+ traverseNode(nodeValue.value)
+ }
+ if (nodeValue.type === AST_NODE_TYPES.ConditionalExpression) {
+ traverseNode(nodeValue.test)
+ traverseNode(nodeValue.consequent)
+ traverseNode(nodeValue.alternate)
+ }
+ if (
+ 'expression' in nodeValue &&
+ typeof nodeValue.expression !== 'boolean'
+ ) {
+ traverseNode(nodeValue.expression)
+ }
+ if ('object' in nodeValue) {
+ traverseNode(nodeValue.object)
+ }
+ if ('callee' in nodeValue) {
+ traverseNode(nodeValue.callee)
+ }
+ if ('left' in nodeValue) {
+ traverseNode(nodeValue.left)
+ }
+ if ('right' in nodeValue) {
+ traverseNode(nodeValue.right)
+ }
+ if ('elements' in nodeValue) {
+ traverseNode(
+ nodeValue.elements.filter(currentNode => currentNode !== null),
+ )
+ }
+ if ('argument' in nodeValue && nodeValue.argument) {
+ traverseNode(nodeValue.argument)
+ }
+ if ('arguments' in nodeValue) {
+ traverseNode(nodeValue.arguments)
+ }
+ if ('properties' in nodeValue) {
+ traverseNode(nodeValue.properties)
+ }
+ if ('expressions' in nodeValue) {
+ traverseNode(nodeValue.expressions)
+ }
+ }
+ function traverseNode(nodeValue) {
+ if (Array.isArray(nodeValue)) {
+ for (let nodeItem of nodeValue) {
+ traverseNode(nodeItem)
+ }
+ } else {
+ checkNode(nodeValue)
+ }
+ }
+}
+export { computeDependencies }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/compute-dependency-names.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/compute-dependency-names.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..0a47f4431955d8952022055d115838c650e88682
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/compute-dependency-names.d.ts
@@ -0,0 +1,2 @@
+import { TSESTree } from '@typescript-eslint/types'
+export declare function computeDependencyNames(pattern: TSESTree.Node): string[]
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/compute-dependency-names.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/compute-dependency-names.js
new file mode 100644
index 0000000000000000000000000000000000000000..4bd80e83187a3077bcffa6ad12f08fd70e66fe80
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/compute-dependency-names.js
@@ -0,0 +1,44 @@
+import { UnreachableCaseError } from '../../utils/unreachable-case-error.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+function computeDependencyNames(pattern) {
+ let currentPattern = pattern
+ while (currentPattern.type === AST_NODE_TYPES.AssignmentPattern) {
+ currentPattern = currentPattern.left
+ }
+ switch (currentPattern.type) {
+ case AST_NODE_TYPES.ObjectPattern:
+ return currentPattern.properties.flatMap(
+ extractNamesFromObjectPatternProperty,
+ )
+ case AST_NODE_TYPES.ArrayPattern:
+ return currentPattern.elements.flatMap(
+ extractNamesFromArrayPatternElement,
+ )
+ case AST_NODE_TYPES.Identifier:
+ return [currentPattern.name]
+ /* v8 ignore next 2 */
+ default:
+ return []
+ }
+ function extractNamesFromArrayPatternElement(element) {
+ if (!element) {
+ return []
+ }
+ if (element.type === AST_NODE_TYPES.RestElement) {
+ return computeDependencyNames(element.argument)
+ }
+ return computeDependencyNames(element)
+ }
+ function extractNamesFromObjectPatternProperty(property) {
+ switch (property.type) {
+ case AST_NODE_TYPES.RestElement:
+ return computeDependencyNames(property.argument)
+ case AST_NODE_TYPES.Property:
+ return computeDependencyNames(property.value)
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(property)
+ }
+ }
+}
+export { computeDependencyNames }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/compute-matched-context-options.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/compute-matched-context-options.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..0bc390c5468d04231b8d1341af6031e6216a536c
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/compute-matched-context-options.d.ts
@@ -0,0 +1,28 @@
+import { TSESTree } from '@typescript-eslint/types'
+import { TSESLint } from '@typescript-eslint/utils'
+import { MessageId, Options } from './types.js'
+/**
+ * Computes the matched context options for a given object node.
+ *
+ * @param params - Parameters.
+ * @param params.isDestructuredObject - Whether the object is destructured.
+ * @param params.matchedAstSelectors - The matched AST selectors for an object
+ * node.
+ * @param params.sourceCode - The source code object.
+ * @param params.nodeObject - The object node to evaluate.
+ * @param params.context - The rule context.
+ * @returns The matched context options or undefined if none match.
+ */
+export declare function computeMatchedContextOptions({
+ isDestructuredObject,
+ matchedAstSelectors,
+ sourceCode,
+ nodeObject,
+ context,
+}: {
+ nodeObject: TSESTree.ObjectExpression | TSESTree.ObjectPattern
+ context: TSESLint.RuleContext
+ matchedAstSelectors: ReadonlySet
+ sourceCode: TSESLint.SourceCode
+ isDestructuredObject: boolean
+}): Options[number] | undefined
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/compute-matched-context-options.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/compute-matched-context-options.js
new file mode 100644
index 0000000000000000000000000000000000000000..2b2807a2e5a2440c6c415bd38d7629b530d6039e
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/compute-matched-context-options.js
@@ -0,0 +1,152 @@
+import { UnreachableCaseError } from '../../utils/unreachable-case-error.js'
+import { computeParentNodesWithTypes } from '../../utils/compute-parent-nodes-with-types.js'
+import { passesAllNamesMatchPatternFilter } from '../../utils/context-matching/passes-all-names-match-pattern-filter.js'
+import { passesAstSelectorFilter } from '../../utils/context-matching/passes-ast-selector-filter.js'
+import { objectParentTypes } from './types.js'
+import { computePropertyOrVariableDeclaratorName } from './compute-property-or-variable-declarator-name.js'
+import { passesCallingFunctionNamePatternFilter } from './passes-calling-function-name-pattern-filter.js'
+import { passesDeclarationMatchesPatternFilter } from './passes-declaration-matches-pattern-filter.js'
+import { passesDeclarationCommentMatchesFilter } from './passes-declaration-comment-matches-filter.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Computes the matched context options for a given object node.
+ *
+ * @param params - Parameters.
+ * @param params.isDestructuredObject - Whether the object is destructured.
+ * @param params.matchedAstSelectors - The matched AST selectors for an object
+ * node.
+ * @param params.sourceCode - The source code object.
+ * @param params.nodeObject - The object node to evaluate.
+ * @param params.context - The rule context.
+ * @returns The matched context options or undefined if none match.
+ */
+function computeMatchedContextOptions({
+ isDestructuredObject,
+ matchedAstSelectors,
+ sourceCode,
+ nodeObject,
+ context,
+}) {
+ let nodeNames = nodeObject.properties
+ .filter(
+ property =>
+ property.type !== AST_NODE_TYPES.SpreadElement &&
+ property.type !== AST_NODE_TYPES.RestElement,
+ )
+ .map(property =>
+ computePropertyOrVariableDeclaratorName({
+ node: property,
+ sourceCode,
+ }),
+ )
+ let parentNodes = computeParentNodesWithTypes({
+ allowedTypes: [...objectParentTypes],
+ consecutiveOnly: false,
+ node: nodeObject,
+ maxParent: null,
+ })
+ return context.options.find(options =>
+ isContextOptionMatching({
+ isDestructuredObject,
+ matchedAstSelectors,
+ parentNodes,
+ sourceCode,
+ nodeObject,
+ nodeNames,
+ options,
+ }),
+ )
+}
+function isContextOptionMatching({
+ isDestructuredObject,
+ matchedAstSelectors,
+ parentNodes,
+ sourceCode,
+ nodeObject,
+ nodeNames,
+ options,
+}) {
+ if (!options.useConfigurationIf) {
+ return true
+ }
+ return (
+ passesAllNamesMatchPatternFilter({
+ allNamesMatchPattern: options.useConfigurationIf.allNamesMatchPattern,
+ nodeNames,
+ }) &&
+ passesObjectTypeFilter({
+ objectType: options.useConfigurationIf.objectType,
+ isDestructuredObject,
+ }) &&
+ passesCallingFunctionNamePatternFilter({
+ callingFunctionNamePattern:
+ options.useConfigurationIf.callingFunctionNamePattern,
+ parentNodes,
+ sourceCode,
+ }) &&
+ passesDeclarationMatchesPatternFilter({
+ declarationMatchesPattern:
+ options.useConfigurationIf.declarationMatchesPattern,
+ parentNodes,
+ sourceCode,
+ }) &&
+ passesHasNumericKeysOnlyFilter({
+ hasNumericKeysOnlyFilter: options.useConfigurationIf.hasNumericKeysOnly,
+ object: nodeObject,
+ }) &&
+ passesDeclarationCommentMatchesFilter({
+ declarationCommentMatchesPattern:
+ options.useConfigurationIf.declarationCommentMatchesPattern,
+ parentNodes,
+ sourceCode,
+ }) &&
+ passesAstSelectorFilter({
+ matchesAstSelector: options.useConfigurationIf.matchesAstSelector,
+ matchedAstSelectors,
+ })
+ )
+}
+function passesHasNumericKeysOnlyFilter({ hasNumericKeysOnlyFilter, object }) {
+ let hasOnlyNumericKeys = hasNumericKeysOnly()
+ switch (hasNumericKeysOnlyFilter) {
+ case void 0:
+ return true
+ case false:
+ return !hasOnlyNumericKeys
+ case true:
+ return hasOnlyNumericKeys
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(hasNumericKeysOnlyFilter)
+ }
+ function hasNumericKeysOnly() {
+ switch (object.type) {
+ case AST_NODE_TYPES.ObjectExpression:
+ return object.properties.every(
+ property =>
+ property.type === AST_NODE_TYPES.Property &&
+ property.key.type === AST_NODE_TYPES.Literal &&
+ typeof property.key.value === 'number',
+ )
+ case AST_NODE_TYPES.ObjectPattern:
+ return false
+ /* v8 ignore next 2 */
+ default:
+ throw new UnreachableCaseError(object)
+ }
+ }
+}
+function passesObjectTypeFilter({ isDestructuredObject, objectType }) {
+ switch (objectType) {
+ case 'non-destructured':
+ return !isDestructuredObject
+ case 'destructured':
+ return isDestructuredObject
+ case void 0:
+ return true
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(objectType)
+ }
+}
+export { computeMatchedContextOptions }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/compute-node-value.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/compute-node-value.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..7d6fc64d7e6fe95d1d4004483a9c2ebe717b626e
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/compute-node-value.d.ts
@@ -0,0 +1,11 @@
+import { TSESTree } from '@typescript-eslint/types'
+import { TSESLint } from '@typescript-eslint/utils'
+export declare function computeNodeValue({
+ isDestructuredObject,
+ sourceCode,
+ property,
+}: {
+ sourceCode: TSESLint.SourceCode
+ isDestructuredObject: boolean
+ property: TSESTree.Property
+}): string | null
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/compute-node-value.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/compute-node-value.js
new file mode 100644
index 0000000000000000000000000000000000000000..12b33e9fb8a3c24ff5e16003adc8c5e7f243f02e
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/compute-node-value.js
@@ -0,0 +1,19 @@
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+function computeNodeValue({ isDestructuredObject, sourceCode, property }) {
+ switch (property.value.type) {
+ case AST_NODE_TYPES.ArrowFunctionExpression:
+ case AST_NODE_TYPES.FunctionExpression:
+ return null
+ case AST_NODE_TYPES.AssignmentPattern:
+ switch (property.value.right.type) {
+ case AST_NODE_TYPES.ArrowFunctionExpression:
+ case AST_NODE_TYPES.FunctionExpression:
+ return null
+ default:
+ return sourceCode.getText(property.value.right)
+ }
+ default:
+ return isDestructuredObject ? null : sourceCode.getText(property.value)
+ }
+}
+export { computeNodeValue }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/compute-property-or-variable-declarator-name.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/compute-property-or-variable-declarator-name.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..b66a335fe7f2a9f1bbbd4c22a4a6ba4cb031ab15
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/compute-property-or-variable-declarator-name.d.ts
@@ -0,0 +1,17 @@
+import { TSESTree } from '@typescript-eslint/types'
+import { TSESLint } from '@typescript-eslint/utils'
+/**
+ * Compute the name for a property-like node.
+ *
+ * @param params - Parameters.
+ * @param params.node - Starting node to search from.
+ * @param params.sourceCode - The source code object.
+ * @returns The property or variable declaration name.
+ */
+export declare function computePropertyOrVariableDeclaratorName({
+ sourceCode,
+ node,
+}: {
+ node: TSESTree.VariableDeclarator | TSESTree.Property
+ sourceCode: TSESLint.SourceCode
+}): string
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/compute-property-or-variable-declarator-name.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/compute-property-or-variable-declarator-name.js
new file mode 100644
index 0000000000000000000000000000000000000000..36705b8435e85feb36610a8a07359f76df9a6451
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/compute-property-or-variable-declarator-name.js
@@ -0,0 +1,38 @@
+import { UnreachableCaseError } from '../../utils/unreachable-case-error.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Compute the name for a property-like node.
+ *
+ * @param params - Parameters.
+ * @param params.node - Starting node to search from.
+ * @param params.sourceCode - The source code object.
+ * @returns The property or variable declaration name.
+ */
+function computePropertyOrVariableDeclaratorName({ sourceCode, node }) {
+ switch (node.type) {
+ case AST_NODE_TYPES.VariableDeclarator:
+ return computeIdentifierName({
+ node: node.id,
+ sourceCode,
+ })
+ case AST_NODE_TYPES.Property:
+ return computeIdentifierName({
+ node: node.key,
+ sourceCode,
+ })
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(node)
+ }
+}
+function computeIdentifierName({ sourceCode, node }) {
+ switch (node.type) {
+ case AST_NODE_TYPES.Identifier:
+ return node.name
+ case AST_NODE_TYPES.Literal:
+ return String(node.value)
+ default:
+ return sourceCode.getText(node)
+ }
+}
+export { computePropertyOrVariableDeclaratorName }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/is-style-component.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/is-style-component.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..de9f1fbaf4fa37dabed86b37dbc1ad610d38355c
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/is-style-component.d.ts
@@ -0,0 +1,10 @@
+import { TSESTree } from '@typescript-eslint/types'
+/**
+ * Checks if a node represents a style component.
+ *
+ * @param node - The AST node to check.
+ * @returns True if the node is a style component, false otherwise.
+ */
+export declare function isStyleComponent(
+ node: TSESTree.ObjectExpression | TSESTree.ObjectPattern,
+): boolean
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/is-style-component.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/is-style-component.js
new file mode 100644
index 0000000000000000000000000000000000000000..1147a008e8f6b2bab463c852785c8468cffb850b
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/is-style-component.js
@@ -0,0 +1,61 @@
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Checks if a node represents a style component.
+ *
+ * @param node - The AST node to check.
+ * @returns True if the node is a style component, false otherwise.
+ */
+function isStyleComponent(node) {
+ if (node.type === AST_NODE_TYPES.ObjectPattern) {
+ return false
+ }
+ let objectRoot = getRootObject(node)
+ if (isStyleNode(objectRoot.parent)) {
+ return true
+ }
+ return (
+ objectRoot.parent.type === AST_NODE_TYPES.ArrowFunctionExpression &&
+ isStyleNode(objectRoot.parent.parent)
+ )
+}
+function isStyleNode(node) {
+ switch (node.type) {
+ case AST_NODE_TYPES.JSXExpressionContainer:
+ return (
+ node.parent.type === AST_NODE_TYPES.JSXAttribute &&
+ node.parent.name.name === 'style'
+ )
+ case AST_NODE_TYPES.CallExpression:
+ return (
+ isCssCallExpression(node.callee) ||
+ (node.callee.type === AST_NODE_TYPES.MemberExpression &&
+ isStyledCallExpression(node.callee.object)) ||
+ (node.callee.type === AST_NODE_TYPES.CallExpression &&
+ isStyledCallExpression(node.callee.callee))
+ )
+ default:
+ return false
+ }
+}
+function getRootObject(node) {
+ let objectRoot = node
+ while (
+ objectRoot.parent.type === AST_NODE_TYPES.Property &&
+ objectRoot.parent.parent.type === AST_NODE_TYPES.ObjectExpression
+ ) {
+ objectRoot = objectRoot.parent.parent
+ }
+ return objectRoot
+}
+function isStyledCallExpression(identifier) {
+ return (
+ identifier.type === AST_NODE_TYPES.Identifier &&
+ identifier.name === 'styled'
+ )
+}
+function isCssCallExpression(identifier) {
+ return (
+ identifier.type === AST_NODE_TYPES.Identifier && identifier.name === 'css'
+ )
+}
+export { isStyleComponent }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/passes-calling-function-name-pattern-filter.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/passes-calling-function-name-pattern-filter.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..9f4ccea95f0aef352f145ee4fe70f7ade0565515
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/passes-calling-function-name-pattern-filter.d.ts
@@ -0,0 +1,21 @@
+import { TSESLint } from '@typescript-eslint/utils'
+import { ScopedRegexOption } from '../../types/scoped-regex-option.js'
+import { ObjectParent } from './types.js'
+/**
+ * Checks if the object passes the calling function name pattern filter.
+ *
+ * @param params - Parameters.
+ * @param params.callingFunctionNamePattern - The pattern to evaluate.
+ * @param params.parentNodes - The parent nodes of the object.
+ * @param params.sourceCode - The source code object.
+ * @returns True if the object passes the filter, false otherwise.
+ */
+export declare function passesCallingFunctionNamePatternFilter({
+ callingFunctionNamePattern,
+ parentNodes,
+ sourceCode,
+}: {
+ callingFunctionNamePattern: ScopedRegexOption | undefined
+ sourceCode: TSESLint.SourceCode
+ parentNodes: ObjectParent[]
+}): boolean
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/passes-calling-function-name-pattern-filter.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/passes-calling-function-name-pattern-filter.js
new file mode 100644
index 0000000000000000000000000000000000000000..c3fad546bbce98eebbb7c7421dbbf83e59c96c74
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/passes-calling-function-name-pattern-filter.js
@@ -0,0 +1,27 @@
+import { matchesScopedExpressions } from '../../utils/scoped-regex/matches-scoped-expressions.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Checks if the object passes the calling function name pattern filter.
+ *
+ * @param params - Parameters.
+ * @param params.callingFunctionNamePattern - The pattern to evaluate.
+ * @param params.parentNodes - The parent nodes of the object.
+ * @param params.sourceCode - The source code object.
+ * @returns True if the object passes the filter, false otherwise.
+ */
+function passesCallingFunctionNamePatternFilter({
+ callingFunctionNamePattern,
+ parentNodes,
+ sourceCode,
+}) {
+ return matchesScopedExpressions({
+ allowedNodeTypes: /* @__PURE__ */ new Set([AST_NODE_TYPES.CallExpression]),
+ nodeValuesComputer: buildNodeValuesComputer(sourceCode),
+ scopedRegexOption: callingFunctionNamePattern,
+ parentNodes,
+ })
+}
+function buildNodeValuesComputer(sourceCode) {
+ return node => [sourceCode.getText(node.callee)]
+}
+export { passesCallingFunctionNamePatternFilter }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/passes-declaration-comment-matches-filter.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/passes-declaration-comment-matches-filter.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..d29bc4643b66ba9c46c70489c9e00dd4d20b4bd9
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/passes-declaration-comment-matches-filter.d.ts
@@ -0,0 +1,21 @@
+import { TSESLint } from '@typescript-eslint/utils'
+import { ScopedRegexOption } from '../../types/scoped-regex-option.js'
+import { ObjectParent } from './types.js'
+/**
+ * Checks if the object passes the declaration comment matches filter.
+ *
+ * @param params - Parameters.
+ * @param params.declarationCommentMatchesPattern - The pattern to evaluate.
+ * @param params.parentNodes - The parent nodes of the object.
+ * @param params.sourceCode - The source code object.
+ * @returns True if the object passes the filter, false otherwise.
+ */
+export declare function passesDeclarationCommentMatchesFilter({
+ declarationCommentMatchesPattern,
+ parentNodes,
+ sourceCode,
+}: {
+ declarationCommentMatchesPattern: ScopedRegexOption | undefined
+ sourceCode: TSESLint.SourceCode
+ parentNodes: ObjectParent[]
+}): boolean
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/passes-declaration-comment-matches-filter.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/passes-declaration-comment-matches-filter.js
new file mode 100644
index 0000000000000000000000000000000000000000..9e7017b8ee2ff3e2555fd5b8288a7de66b23ea5e
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/passes-declaration-comment-matches-filter.js
@@ -0,0 +1,55 @@
+import { UnreachableCaseError } from '../../utils/unreachable-case-error.js'
+import { matchesScopedExpressions } from '../../utils/scoped-regex/matches-scoped-expressions.js'
+import { objectParentTypes } from './types.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Checks if the object passes the declaration comment matches filter.
+ *
+ * @param params - Parameters.
+ * @param params.declarationCommentMatchesPattern - The pattern to evaluate.
+ * @param params.parentNodes - The parent nodes of the object.
+ * @param params.sourceCode - The source code object.
+ * @returns True if the object passes the filter, false otherwise.
+ */
+function passesDeclarationCommentMatchesFilter({
+ declarationCommentMatchesPattern,
+ parentNodes,
+ sourceCode,
+}) {
+ return matchesScopedExpressions({
+ nodeValuesComputer: buildNodeValuesComputer(sourceCode),
+ scopedRegexOption: declarationCommentMatchesPattern,
+ allowedNodeTypes: new Set(objectParentTypes),
+ parentNodes,
+ })
+}
+function computeRelevantNodeForComment(objectParent) {
+ let objectParentType = objectParent.type
+ switch (objectParentType) {
+ case AST_NODE_TYPES.VariableDeclarator: {
+ let variableDeclaration = objectParent.parent
+ if (
+ variableDeclaration.parent?.type ===
+ AST_NODE_TYPES.ExportNamedDeclaration
+ ) {
+ return variableDeclaration.parent
+ }
+ return variableDeclaration
+ }
+ case AST_NODE_TYPES.CallExpression:
+ case AST_NODE_TYPES.Property:
+ return objectParent
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(objectParentType)
+ }
+}
+function buildNodeValuesComputer(sourceCode) {
+ return node => {
+ let nodeForComment = computeRelevantNodeForComment(node)
+ return sourceCode
+ .getCommentsBefore(nodeForComment)
+ .map(comment => comment.value.trim())
+ }
+}
+export { passesDeclarationCommentMatchesFilter }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/passes-declaration-matches-pattern-filter.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/passes-declaration-matches-pattern-filter.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..86233a3c8d0ce0fe93e5d7a6e38037b6d3aaf44a
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/passes-declaration-matches-pattern-filter.d.ts
@@ -0,0 +1,22 @@
+import { TSESLint } from '@typescript-eslint/utils'
+import { ScopedRegexOption } from '../../types/scoped-regex-option.js'
+import { ObjectParent } from './types.js'
+/**
+ * Checks whether the node parent names match the given pattern.
+ *
+ * @param params - The parameters object.
+ * @param params.declarationMatchesPattern - The regex pattern to match against.
+ * @param params.parentNodes - The parent nodes to check.
+ * @param params.sourceCode - The source code object.
+ * @returns True if the parent node parent names passes the pattern filter,
+ * false otherwise.
+ */
+export declare function passesDeclarationMatchesPatternFilter({
+ declarationMatchesPattern,
+ parentNodes,
+ sourceCode,
+}: {
+ declarationMatchesPattern: ScopedRegexOption | undefined
+ sourceCode: TSESLint.SourceCode
+ parentNodes: ObjectParent[]
+}): boolean
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/passes-declaration-matches-pattern-filter.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/passes-declaration-matches-pattern-filter.js
new file mode 100644
index 0000000000000000000000000000000000000000..87e39954baadda1dc326ac389f2da0900417fd15
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/passes-declaration-matches-pattern-filter.js
@@ -0,0 +1,35 @@
+import { matchesScopedExpressions } from '../../utils/scoped-regex/matches-scoped-expressions.js'
+import { computePropertyOrVariableDeclaratorName } from './compute-property-or-variable-declarator-name.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+var allowedTypes = [AST_NODE_TYPES.VariableDeclarator, AST_NODE_TYPES.Property]
+/**
+ * Checks whether the node parent names match the given pattern.
+ *
+ * @param params - The parameters object.
+ * @param params.declarationMatchesPattern - The regex pattern to match against.
+ * @param params.parentNodes - The parent nodes to check.
+ * @param params.sourceCode - The source code object.
+ * @returns True if the parent node parent names passes the pattern filter,
+ * false otherwise.
+ */
+function passesDeclarationMatchesPatternFilter({
+ declarationMatchesPattern,
+ parentNodes,
+ sourceCode,
+}) {
+ return matchesScopedExpressions({
+ nodeValuesComputer: buildNodeValuesComputer(sourceCode),
+ scopedRegexOption: declarationMatchesPattern,
+ allowedNodeTypes: new Set(allowedTypes),
+ parentNodes,
+ })
+}
+function buildNodeValuesComputer(sourceCode) {
+ return node => [
+ computePropertyOrVariableDeclaratorName({
+ sourceCode,
+ node,
+ }),
+ ]
+}
+export { passesDeclarationMatchesPatternFilter }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/sort-object.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/sort-object.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..75270e15335d52af1afe888895f5fa8c02fe46a9
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/sort-object.d.ts
@@ -0,0 +1,13 @@
+import { TSESTree } from '@typescript-eslint/types'
+import { TSESLint } from '@typescript-eslint/utils'
+import { MessageId, Options } from './types.js'
+export declare let defaultOptions: Required
+export declare function sortObject({
+ matchedAstSelectors,
+ context,
+ node,
+}: {
+ context: Readonly>
+ node: TSESTree.ObjectExpression | TSESTree.ObjectPattern
+ matchedAstSelectors: ReadonlySet
+}): void
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/sort-object.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/sort-object.js
new file mode 100644
index 0000000000000000000000000000000000000000..950c4e1944851b9c51aba2775d1e1fa2fea8bc16
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/sort-object.js
@@ -0,0 +1,222 @@
+import { computeDependenciesOutsideFunctionsBySortingNode } from '../../utils/compute-dependencies-outside-functions-by-sorting-node.js'
+import { populateSortingNodeGroupsWithDependencies } from '../../utils/populate-sorting-node-groups-with-dependencies.js'
+import { validateNewlinesAndPartitionConfig } from '../../utils/validate-newlines-and-partition-config.js'
+import { buildOptionsByGroupIndexComputer } from '../../utils/build-options-by-group-index-computer.js'
+import { validateCustomSortConfig } from '../../utils/validate-custom-sort-config.js'
+import { generatePredefinedGroups } from '../../utils/generate-predefined-groups.js'
+import { sortNodesByDependencies } from '../../utils/sort-nodes-by-dependencies.js'
+import { getEslintDisabledLines } from '../../utils/get-eslint-disabled-lines.js'
+import { doesCustomGroupMatch } from '../../utils/does-custom-group-match.js'
+import { isNodeEslintDisabled } from '../../utils/is-node-eslint-disabled.js'
+import { validateGroupsConfig } from '../../utils/validate-groups-config.js'
+import { sortNodesByGroups } from '../../utils/sort-nodes-by-groups.js'
+import { reportAllErrors } from '../../utils/report-all-errors.js'
+import { shouldPartition } from '../../utils/should-partition.js'
+import { computeGroup } from '../../utils/compute-group.js'
+import { rangeToDiff } from '../../utils/range-to-diff.js'
+import { getSettings } from '../../utils/get-settings.js'
+import { isSortable } from '../../utils/is-sortable.js'
+import { complete } from '../../utils/complete.js'
+import { isNodeOnSingleLine } from '../../utils/is-node-on-single-line.js'
+import {
+ DEPENDENCY_ORDER_ERROR_ID,
+ EXTRA_SPACING_ERROR_ID,
+ GROUP_ORDER_ERROR_ID,
+ MISSED_SPACING_ERROR_ID,
+ ORDER_ERROR_ID,
+ allModifiers,
+ allSelectors,
+} from './types.js'
+import { computePropertyOrVariableDeclaratorName } from './compute-property-or-variable-declarator-name.js'
+import { computeMatchedContextOptions } from './compute-matched-context-options.js'
+import { comparatorByOptionsComputer } from './comparator-by-options-computer.js'
+import { computeDependencyNames } from './compute-dependency-names.js'
+import { computeDependencies } from './compute-dependencies.js'
+import { isStyleComponent } from './is-style-component.js'
+import { computeNodeValue } from './compute-node-value.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Cache computed groups by modifiers and selectors for performance.
+ */
+var cachedGroupsByModifiersAndSelectors = /* @__PURE__ */ new Map()
+var defaultOptions = {
+ useExperimentalDependencyDetection: true,
+ fallbackSort: { type: 'unsorted' },
+ newlinesInside: 'newlinesBetween',
+ partitionByComputedKey: false,
+ partitionByNewLine: false,
+ partitionByComment: false,
+ newlinesBetween: 'ignore',
+ specialCharacters: 'keep',
+ styledComponents: true,
+ useConfigurationIf: {},
+ type: 'alphabetical',
+ ignoreCase: true,
+ customGroups: [],
+ locales: 'en-US',
+ sortBy: 'name',
+ alphabet: '',
+ order: 'asc',
+ groups: [],
+}
+function sortObject({ matchedAstSelectors, context, node }) {
+ if (!isSortable(node.properties)) {
+ return
+ }
+ let { sourceCode, id } = context
+ let settings = getSettings(context.settings)
+ let isDestructuredObject = node.type === AST_NODE_TYPES.ObjectPattern
+ let matchedContextOptions = computeMatchedContextOptions({
+ isDestructuredObject,
+ matchedAstSelectors,
+ nodeObject: node,
+ sourceCode,
+ context,
+ })
+ let options = complete(matchedContextOptions, settings, defaultOptions)
+ validateCustomSortConfig(options)
+ validateGroupsConfig({
+ selectors: allSelectors,
+ modifiers: allModifiers,
+ options,
+ })
+ validateNewlinesAndPartitionConfig(options)
+ if (!options.styledComponents && isStyleComponent(node)) {
+ return
+ }
+ let eslintDisabledLines = getEslintDisabledLines({
+ ruleName: id,
+ sourceCode,
+ })
+ let optionsByGroupIndexComputer = buildOptionsByGroupIndexComputer(options)
+ let sortingNodeGroups = [[]]
+ for (let property of node.properties) {
+ if (
+ property.type === AST_NODE_TYPES.SpreadElement ||
+ property.type === AST_NODE_TYPES.RestElement
+ ) {
+ sortingNodeGroups.push([])
+ continue
+ }
+ if (
+ !isDestructuredObject &&
+ options.partitionByComputedKey &&
+ property.computed
+ ) {
+ sortingNodeGroups.push([])
+ continue
+ }
+ let lastSortingNode = sortingNodeGroups.at(-1)?.at(-1)
+ let selectors = []
+ let modifiers = []
+ if (
+ property.value.type === AST_NODE_TYPES.ArrowFunctionExpression ||
+ property.value.type === AST_NODE_TYPES.FunctionExpression
+ ) {
+ selectors.push('method')
+ } else {
+ selectors.push('property')
+ }
+ selectors.push('member')
+ if (!isNodeOnSingleLine(property)) {
+ modifiers.push('multiline')
+ }
+ let name = computePropertyOrVariableDeclaratorName({
+ node: property,
+ sourceCode,
+ })
+ let dependencyNames = [name]
+ if (isDestructuredObject) {
+ dependencyNames = [...new Set(computeDependencyNames(property.value))]
+ }
+ let value = computeNodeValue({
+ isDestructuredObject,
+ sourceCode,
+ property,
+ })
+ let predefinedGroups = generatePredefinedGroups({
+ cache: cachedGroupsByModifiersAndSelectors,
+ selectors,
+ modifiers,
+ })
+ let group = computeGroup({
+ customGroupMatcher: customGroup =>
+ doesCustomGroupMatch({
+ elementValue: value,
+ elementName: name,
+ customGroup,
+ selectors,
+ modifiers,
+ }),
+ predefinedGroups,
+ options,
+ })
+ let sortingNode = {
+ dependencies:
+ options.useExperimentalDependencyDetection ?
+ []
+ : computeDependencies(property),
+ isEslintDisabled: isNodeEslintDisabled(property, eslintDisabledLines),
+ size: rangeToDiff(property, sourceCode),
+ value: value ?? '',
+ dependencyNames,
+ node: property,
+ group,
+ name,
+ }
+ if (
+ shouldPartition({
+ lastSortingNode,
+ sortingNode,
+ sourceCode,
+ options,
+ })
+ ) {
+ sortingNodeGroups.push([])
+ }
+ sortingNodeGroups.at(-1).push({
+ ...sortingNode,
+ partitionId: sortingNodeGroups.length,
+ })
+ }
+ if (options.useExperimentalDependencyDetection) {
+ let dependenciesBySortingNode =
+ computeDependenciesOutsideFunctionsBySortingNode({
+ sortingNodes: sortingNodeGroups.flat(),
+ sourceCode,
+ })
+ sortingNodeGroups = populateSortingNodeGroupsWithDependencies({
+ dependenciesBySortingNode,
+ sortingNodeGroups,
+ })
+ }
+ let sortingNodes = sortingNodeGroups.flat()
+ reportAllErrors({
+ availableMessageIds: {
+ missedSpacingBetweenMembers: MISSED_SPACING_ERROR_ID,
+ unexpectedDependencyOrder: DEPENDENCY_ORDER_ERROR_ID,
+ extraSpacingBetweenMembers: EXTRA_SPACING_ERROR_ID,
+ unexpectedGroupOrder: GROUP_ORDER_ERROR_ID,
+ unexpectedOrder: ORDER_ERROR_ID,
+ },
+ sortNodesExcludingEslintDisabled,
+ nodes: sortingNodes,
+ options,
+ context,
+ })
+ function sortNodesExcludingEslintDisabled(ignoreEslintDisabledNodes) {
+ let nodesSortedByGroups = sortingNodeGroups.flatMap(nodes =>
+ sortNodesByGroups({
+ comparatorByOptionsComputer,
+ optionsByGroupIndexComputer,
+ ignoreEslintDisabledNodes,
+ groups: options.groups,
+ nodes,
+ }),
+ )
+ return sortNodesByDependencies(nodesSortedByGroups, {
+ ignoreEslintDisabledNodes,
+ })
+ }
+}
+export { defaultOptions, sortObject }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/types.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/types.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..daceac099d604b2d5b34c645490073fa83e11f43
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/types.d.ts
@@ -0,0 +1,170 @@
+import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'
+import { TSESTree } from '@typescript-eslint/types'
+import { SortingNodeWithDependencies } from '../../utils/sort-nodes-by-dependencies.js'
+import { RegexOption, TypeOption } from '../../types/common-options.js'
+import { ScopedRegexOption } from '../../types/scoped-regex-option.js'
+import { AllCommonOptions } from '../../types/all-common-options.js'
+import { NodeOfType } from '../../types/node-of-type.js'
+export type MessageId =
+ | typeof DEPENDENCY_ORDER_ERROR_ID
+ | typeof MISSED_SPACING_ERROR_ID
+ | typeof EXTRA_SPACING_ERROR_ID
+ | typeof GROUP_ORDER_ERROR_ID
+ | typeof ORDER_ERROR_ID
+export declare const ORDER_ERROR_ID = 'unexpectedObjectsOrder'
+export declare const GROUP_ORDER_ERROR_ID = 'unexpectedObjectsGroupOrder'
+export declare const EXTRA_SPACING_ERROR_ID = 'extraSpacingBetweenObjectMembers'
+export declare const MISSED_SPACING_ERROR_ID =
+ 'missedSpacingBetweenObjectMembers'
+export declare const DEPENDENCY_ORDER_ERROR_ID =
+ 'unexpectedObjectsDependencyOrder'
+/**
+ * Configuration options for the sort-objects rule.
+ *
+ * Controls how object properties and methods are sorted within object literals
+ * and object patterns in JavaScript/TypeScript.
+ */
+export type Options = Partial<
+ {
+ /**
+ * Conditional configuration based on pattern matching. Allows applying the
+ * rule only when specific conditions are met.
+ */
+ useConfigurationIf: {
+ /**
+ * Regular expression pattern to match against the comment associated to
+ * the name of the object.
+ */
+ declarationCommentMatchesPattern?: ScopedRegexOption
+ /**
+ * Specifies whether to only match destructured objects or regular
+ * objects.
+ */
+ objectType?: 'non-destructured' | 'destructured'
+ /**
+ * Regular expression pattern to match against the name of the function
+ * that contains this object. Useful for applying different sorting
+ * rules to objects passed to specific functions.
+ */
+ callingFunctionNamePattern?: ScopedRegexOption
+ /**
+ * Regular expression pattern to match against the object's declaration
+ * name. The rule is only applied to declarations with matching names.
+ */
+ declarationMatchesPattern?: ScopedRegexOption
+ /**
+ * Regular expression pattern to match against all property names. The
+ * rule is only applied when all property names match this pattern.
+ */
+ allNamesMatchPattern?: RegexOption
+ /**
+ * Specifies whether to only match objects that have exclusively numeric
+ * keys.
+ */
+ hasNumericKeysOnly?: boolean
+ /**
+ * AST selector to match against ObjectExpression or ObjectPattern
+ * nodes.
+ */
+ matchesAstSelector?: string
+ }
+ /**
+ * Enables experimental dependency detection.
+ */
+ useExperimentalDependencyDetection: boolean
+ /**
+ * Whether to partition object members by computed keys.
+ */
+ partitionByComputedKey: boolean
+ /**
+ * Whether to sort styled-components CSS properties. When true, sorts CSS
+ * properties within styled-components template literals.
+ *
+ * @default true
+ */
+ styledComponents: boolean
+ } & AllCommonOptions<
+ TypeOption,
+ AdditionalSortOptions,
+ CustomGroupMatchOptions
+ >
+>[]
+export type SortObjectsSortingNode = {
+ /**
+ * The string representation of the property's value. Used when sorting by
+ * value instead of name.
+ */
+ value: string
+} & SortingNodeWithDependencies
+export type SortObjectsNode = TSESTree.Property
+interface AdditionalSortOptions {
+ sortBy: SortByOption
+}
+export declare let objectParentTypes: readonly [
+ TSESTree.AST_NODE_TYPES.VariableDeclarator,
+ TSESTree.AST_NODE_TYPES.CallExpression,
+ TSESTree.AST_NODE_TYPES.Property,
+]
+export type ObjectParentType = (typeof objectParentTypes)[number]
+export type ObjectParent = NodeOfType
+/**
+ * Union type of all available modifiers for object members.
+ *
+ * Modifiers provide additional context about member characteristics, such as
+ * whether they are optional, required, or span multiple lines.
+ */
+export type Modifier = (typeof allModifiers)[number]
+/**
+ * Union type of all available selectors for object members.
+ *
+ * Selectors identify the type of object member for grouping and sorting
+ * purposes.
+ */
+export type Selector = (typeof allSelectors)[number]
+/**
+ * Match options for a custom group.
+ */
+interface CustomGroupMatchOptions {
+ /**
+ * Regular expression pattern to match against the member's value. Only
+ * applicable to properties with literal values.
+ */
+ elementValuePattern?: RegexOption
+ /**
+ * Array of modifiers that members must have to match this group. Only
+ * modifiers allowed for the specified selector type are valid.
+ */
+ modifiers?: Modifier[]
+ /**
+ * The selector type this group matches. Determines what kind of object
+ * members belong to this group.
+ */
+ selector?: Selector
+}
+/**
+ * Array of all available selectors for object members.
+ *
+ * Used for validation and configuration in the ESLint rule.
+ */
+export declare let allSelectors: readonly ['member', 'method', 'property']
+/**
+ * Array of all available modifiers for object members.
+ *
+ * Used for validation and configuration in the ESLint rule.
+ */
+export declare let allModifiers: readonly ['multiline']
+declare const SORT_BY_OPTION: readonly ['name', 'value']
+type SortByOption = (typeof SORT_BY_OPTION)[number]
+/**
+ * Additional sort options JSON schema, Used by ESLint to validate rule options.
+ */
+export declare let additionalSortOptionsJsonSchema: Record
+/**
+ * Additional custom group match options JSON schema. Used by ESLint to validate
+ * rule options at configuration time.
+ */
+export declare let additionalCustomGroupMatchOptionsJsonSchema: Record<
+ string,
+ JSONSchema4
+>
+export {}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/types.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/types.js
new file mode 100644
index 0000000000000000000000000000000000000000..ae92ba15ee6c4216f53a7dc491d3e2f5788e11ca
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-objects/types.js
@@ -0,0 +1,58 @@
+import { buildRegexJsonSchema } from '../../utils/json-schemas/common-json-schemas.js'
+import {
+ buildCustomGroupModifiersJsonSchema,
+ buildCustomGroupSelectorJsonSchema,
+} from '../../utils/json-schemas/common-groups-json-schemas.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+var ORDER_ERROR_ID = 'unexpectedObjectsOrder'
+var GROUP_ORDER_ERROR_ID = 'unexpectedObjectsGroupOrder'
+var EXTRA_SPACING_ERROR_ID = 'extraSpacingBetweenObjectMembers'
+var MISSED_SPACING_ERROR_ID = 'missedSpacingBetweenObjectMembers'
+var DEPENDENCY_ORDER_ERROR_ID = 'unexpectedObjectsDependencyOrder'
+var objectParentTypes = [
+ AST_NODE_TYPES.VariableDeclarator,
+ AST_NODE_TYPES.CallExpression,
+ AST_NODE_TYPES.Property,
+]
+/**
+ * Array of all available selectors for object members.
+ *
+ * Used for validation and configuration in the ESLint rule.
+ */
+var allSelectors = ['member', 'method', 'property']
+/**
+ * Array of all available modifiers for object members.
+ *
+ * Used for validation and configuration in the ESLint rule.
+ */
+var allModifiers = ['multiline']
+/**
+ * Additional sort options JSON schema, Used by ESLint to validate rule options.
+ */
+var additionalSortOptionsJsonSchema = {
+ sortBy: {
+ enum: [...['name', 'value']],
+ type: 'string',
+ },
+}
+/**
+ * Additional custom group match options JSON schema. Used by ESLint to validate
+ * rule options at configuration time.
+ */
+var additionalCustomGroupMatchOptionsJsonSchema = {
+ modifiers: buildCustomGroupModifiersJsonSchema(allModifiers),
+ selector: buildCustomGroupSelectorJsonSchema(allSelectors),
+ elementValuePattern: buildRegexJsonSchema(),
+}
+export {
+ DEPENDENCY_ORDER_ERROR_ID,
+ EXTRA_SPACING_ERROR_ID,
+ GROUP_ORDER_ERROR_ID,
+ MISSED_SPACING_ERROR_ID,
+ ORDER_ERROR_ID,
+ additionalCustomGroupMatchOptionsJsonSchema,
+ additionalSortOptionsJsonSchema,
+ allModifiers,
+ allSelectors,
+ objectParentTypes,
+}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-sets.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-sets.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..0ac3445f377b5d63e2a5a487af8d2d2f616caa23
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-sets.d.ts
@@ -0,0 +1,20 @@
+declare const ORDER_ERROR_ID = 'unexpectedSetsOrder'
+declare const GROUP_ORDER_ERROR_ID = 'unexpectedSetsGroupOrder'
+declare const EXTRA_SPACING_ERROR_ID = 'extraSpacingBetweenSetsMembers'
+declare const MISSED_SPACING_ERROR_ID = 'missedSpacingBetweenSetsMembers'
+type MessageId =
+ | typeof MISSED_SPACING_ERROR_ID
+ | typeof EXTRA_SPACING_ERROR_ID
+ | typeof GROUP_ORDER_ERROR_ID
+ | typeof ORDER_ERROR_ID
+declare const _default: import('@typescript-eslint/utils/ts-eslint').RuleModule<
+ MessageId,
+ import('...js').SortArraysOptions,
+ {
+ recommended?: boolean
+ },
+ import('@typescript-eslint/utils/ts-eslint').RuleListener
+> & {
+ name: string
+}
+export default _default
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-sets.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-sets.js
new file mode 100644
index 0000000000000000000000000000000000000000..f82c1da54f60b660b959c8219f543efe88d7109d
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-sets.js
@@ -0,0 +1,77 @@
+import {
+ EXTRA_SPACING_ERROR,
+ GROUP_ORDER_ERROR,
+ MISSED_SPACING_ERROR,
+ ORDER_ERROR,
+} from '../utils/report-errors.js'
+import { buildAstListeners } from '../utils/build-ast-listeners.js'
+import { createEslintRule } from '../utils/create-eslint-rule.js'
+import { sortArray } from './sort-arrays/sort-array.js'
+import { defaultOptions, jsonSchema } from './sort-array-includes.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Cache computed groups by modifiers and selectors for performance.
+ */
+var cachedGroupsByModifiersAndSelectors = /* @__PURE__ */ new Map()
+var ORDER_ERROR_ID = 'unexpectedSetsOrder'
+var GROUP_ORDER_ERROR_ID = 'unexpectedSetsGroupOrder'
+var EXTRA_SPACING_ERROR_ID = 'extraSpacingBetweenSetsMembers'
+var MISSED_SPACING_ERROR_ID = 'missedSpacingBetweenSetsMembers'
+var sort_sets_default = createEslintRule({
+ meta: {
+ messages: {
+ [MISSED_SPACING_ERROR_ID]: MISSED_SPACING_ERROR,
+ [EXTRA_SPACING_ERROR_ID]: EXTRA_SPACING_ERROR,
+ [GROUP_ORDER_ERROR_ID]: GROUP_ORDER_ERROR,
+ [ORDER_ERROR_ID]: ORDER_ERROR,
+ },
+ docs: {
+ url: 'https://perfectionist.dev/rules/sort-sets',
+ description: 'Enforce sorted sets.',
+ recommended: true,
+ },
+ schema: jsonSchema,
+ type: 'suggestion',
+ fixable: 'code',
+ },
+ create: context =>
+ buildAstListeners({
+ nodeTypes: [AST_NODE_TYPES.NewExpression, AST_NODE_TYPES.ArrayExpression],
+ sorter: sortPotentiallyValidArray,
+ context,
+ }),
+ defaultOptions: [defaultOptions],
+ name: 'sort-sets',
+})
+function sortPotentiallyValidArray({ matchedAstSelectors, context, node }) {
+ if (!isValidArray()) {
+ return
+ }
+ sortArray({
+ availableMessageIds: {
+ missedSpacingBetweenMembers: MISSED_SPACING_ERROR_ID,
+ extraSpacingBetweenMembers: EXTRA_SPACING_ERROR_ID,
+ unexpectedGroupOrder: GROUP_ORDER_ERROR_ID,
+ unexpectedOrder: ORDER_ERROR_ID,
+ },
+ mustHaveMatchedContextOptions: false,
+ cachedGroupsByModifiersAndSelectors,
+ matchedAstSelectors,
+ defaultOptions,
+ context,
+ node,
+ })
+ function isValidArray() {
+ if (node.parent.type !== AST_NODE_TYPES.NewExpression) {
+ return false
+ }
+ if (node.parent.callee.type !== AST_NODE_TYPES.Identifier) {
+ return false
+ }
+ if (node.parent.callee.name !== 'Set') {
+ return false
+ }
+ return node.parent.arguments[0] === node
+ }
+}
+export { sort_sets_default as default }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-sets/types.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-sets/types.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..c3335c8c0cd598be851c19c33d5bffb34f1c2c8e
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-sets/types.d.ts
@@ -0,0 +1,2 @@
+import { Options as SortArraysOptions } from '../sort-arrays/types.js'
+export type Options = SortArraysOptions
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-switch-case.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-switch-case.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..e11a454e7964a6326fe583cd88821da4129d633d
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-switch-case.d.ts
@@ -0,0 +1,13 @@
+import { TSESLint } from '@typescript-eslint/utils'
+import { Options } from './sort-switch-case/types.js'
+declare const _default: TSESLint.RuleModule<
+ 'unexpectedSwitchCaseOrder',
+ Options,
+ {
+ recommended?: boolean
+ },
+ TSESLint.RuleListener
+> & {
+ name: string
+}
+export default _default
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-switch-case.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-switch-case.js
new file mode 100644
index 0000000000000000000000000000000000000000..3b2369dd724d584ee8afb995e44c3e7d0eb939f5
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-switch-case.js
@@ -0,0 +1,323 @@
+import { buildCommonJsonSchemas } from '../utils/json-schemas/common-json-schemas.js'
+import { makeSingleNodeCommentAfterFixes } from '../utils/make-single-node-comment-after-fixes.js'
+import { makeFixes } from '../utils/make-fixes.js'
+import {
+ LEFT,
+ ORDER_ERROR,
+ RIGHT,
+ reportErrors,
+} from '../utils/report-errors.js'
+import { defaultComparatorByOptionsComputer } from '../utils/compare/default-comparator-by-options-computer.js'
+import { validateCustomSortConfig } from '../utils/validate-custom-sort-config.js'
+import { sortNodes } from '../utils/sort-nodes.js'
+import { createNodeIndexMap } from '../utils/create-node-index-map.js'
+import { pairwise } from '../utils/pairwise.js'
+import { rangeToDiff } from '../utils/range-to-diff.js'
+import { getSettings } from '../utils/get-settings.js'
+import { isSortable } from '../utils/is-sortable.js'
+import { complete } from '../utils/complete.js'
+import { createEslintRule } from '../utils/create-eslint-rule.js'
+import { isConditionExpression } from './sort-switch-case/is-condition-expression.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+var ORDER_ERROR_ID = 'unexpectedSwitchCaseOrder'
+var defaultOptions = {
+ fallbackSort: { type: 'unsorted' },
+ specialCharacters: 'keep',
+ type: 'alphabetical',
+ ignoreCase: true,
+ locales: 'en-US',
+ alphabet: '',
+ order: 'asc',
+}
+var sort_switch_case_default = createEslintRule({
+ create: context => ({
+ SwitchStatement: switchNode => {
+ if (!isSortable(switchNode.cases)) {
+ return
+ }
+ let settings = getSettings(context.settings)
+ let options = complete(context.options.at(0), settings, defaultOptions)
+ let defaultComparator = defaultComparatorByOptionsComputer(options)
+ validateCustomSortConfig(options)
+ let { sourceCode } = context
+ if (
+ isConditionExpression(switchNode.discriminant) ||
+ switchNode.cases.some(
+ caseNode =>
+ caseNode.test !== null && isConditionExpression(caseNode.test),
+ )
+ ) {
+ return
+ }
+ let caseNameSortingNodeGroups = switchNode.cases.reduce(
+ (accumulator, caseNode, index) => {
+ if (caseNode.test) {
+ accumulator.at(-1).push({
+ size: rangeToDiff(caseNode.test, sourceCode),
+ name: getCaseName(sourceCode, caseNode),
+ partitionId: accumulator.length,
+ isEslintDisabled: false,
+ node: caseNode.test,
+ group: 'unknown',
+ })
+ }
+ if (
+ caseNode.consequent.length > 0 &&
+ index !== switchNode.cases.length - 1
+ ) {
+ accumulator.push([])
+ }
+ return accumulator
+ },
+ [[]],
+ )
+ let hasUnsortedNodes = false
+ for (let caseNodesSortingNodeGroup of caseNameSortingNodeGroups) {
+ let sortedCaseNameSortingNodes = sortNodes({
+ comparatorByOptionsComputer: defaultComparatorByOptionsComputer,
+ nodes: caseNodesSortingNodeGroup,
+ ignoreEslintDisabledNodes: false,
+ options,
+ })
+ hasUnsortedNodes ||= sortedCaseNameSortingNodes.some(
+ (node, index) => node !== caseNodesSortingNodeGroup[index],
+ )
+ let nodeIndexMap = createNodeIndexMap(sortedCaseNameSortingNodes)
+ pairwise(caseNodesSortingNodeGroup, (left, right) => {
+ if (!left) {
+ return
+ }
+ if (nodeIndexMap.get(left) < nodeIndexMap.get(right)) {
+ return
+ }
+ reportErrors({
+ sortedNodes: sortedCaseNameSortingNodes,
+ nodes: caseNodesSortingNodeGroup,
+ messageIds: [ORDER_ERROR_ID],
+ sourceCode,
+ context,
+ right,
+ left,
+ })
+ })
+ }
+ let sortingNodes = switchNode.cases.map(caseNode => ({
+ size: caseNode.test ? rangeToDiff(caseNode.test, sourceCode) : 7,
+ name: getCaseName(sourceCode, caseNode),
+ addSafetySemicolonWhenInline: true,
+ isDefaultClause: !caseNode.test,
+ isEslintDisabled: false,
+ group: 'unknown',
+ partitionId: 0,
+ node: caseNode,
+ }))
+ let sortingNodesGroupWithDefault = reduceCaseSortingNodes(
+ sortingNodes,
+ caseNode => caseNode.node.consequent.length > 0,
+ ).find(caseNodeGroup => caseNodeGroup.some(node => node.isDefaultClause))
+ if (
+ sortingNodesGroupWithDefault &&
+ !sortingNodesGroupWithDefault.at(-1).isDefaultClause
+ ) {
+ let defaultCase = sortingNodesGroupWithDefault.find(
+ node => node.isDefaultClause,
+ )
+ let lastCase = sortingNodesGroupWithDefault.at(-1)
+ context.report({
+ fix: fixer => {
+ let punctuatorAfterLastCase = sourceCode.getTokenAfter(
+ lastCase.node.test,
+ )
+ let lastCaseRange = [
+ lastCase.node.range[0],
+ punctuatorAfterLastCase.range[1],
+ ]
+ return [
+ fixer.replaceText(
+ defaultCase.node,
+ sourceCode.text.slice(...lastCaseRange),
+ ),
+ fixer.replaceTextRange(
+ lastCaseRange,
+ sourceCode.getText(defaultCase.node),
+ ),
+ ...makeSingleNodeCommentAfterFixes({
+ sortedNode: punctuatorAfterLastCase,
+ node: defaultCase.node,
+ sourceCode,
+ fixer,
+ }),
+ ...makeSingleNodeCommentAfterFixes({
+ node: punctuatorAfterLastCase,
+ sortedNode: defaultCase.node,
+ sourceCode,
+ fixer,
+ }),
+ ]
+ },
+ data: {
+ [LEFT]: defaultCase.name,
+ [RIGHT]: lastCase.name,
+ },
+ messageId: ORDER_ERROR_ID,
+ node: defaultCase.node,
+ })
+ }
+ let sortingNodeGroupsForBlockSort = reduceCaseSortingNodes(
+ sortingNodes,
+ caseNode => caseHasBreakOrReturn(caseNode.node),
+ )
+ /**
+ * If the last case does not have a return/break, leave its group at its
+ * place.
+ */
+ let lastNodeGroup = sortingNodeGroupsForBlockSort.at(-1)
+ let lastBlockCaseShouldStayInPlace = !caseHasBreakOrReturn(
+ lastNodeGroup.at(-1).node,
+ )
+ let sortedSortingNodeGroupsForBlockSort = [
+ ...sortingNodeGroupsForBlockSort,
+ ]
+ .toSorted((a, b) => {
+ if (lastBlockCaseShouldStayInPlace) {
+ if (a === lastNodeGroup) {
+ return 1
+ }
+ /* v8 ignore if -- @preserve last element might never be b. */
+ if (b === lastNodeGroup) {
+ return -1
+ }
+ }
+ if (a.some(node => node.isDefaultClause)) {
+ return 1
+ }
+ if (b.some(node => node.isDefaultClause)) {
+ return -1
+ }
+ return defaultComparator(a.at(0), b.at(0))
+ })
+ .flat()
+ let sortingNodeGroupsForBlockSortFlat =
+ sortingNodeGroupsForBlockSort.flat()
+ pairwise(sortingNodeGroupsForBlockSortFlat, (left, right) => {
+ if (!left) {
+ return
+ }
+ if (
+ sortedSortingNodeGroupsForBlockSort.indexOf(left) <
+ sortedSortingNodeGroupsForBlockSort.indexOf(right)
+ ) {
+ return
+ }
+ context.report({
+ fix: fixer =>
+ hasUnsortedNodes ?
+ []
+ : makeFixes({
+ sortedNodes: sortedSortingNodeGroupsForBlockSort,
+ nodes: sortingNodeGroupsForBlockSortFlat,
+ hasCommentAboveMissing: false,
+ sourceCode,
+ fixer,
+ }),
+ data: {
+ [RIGHT]: right.name,
+ [LEFT]: left.name,
+ },
+ messageId: ORDER_ERROR_ID,
+ node: right.node,
+ })
+ })
+ },
+ }),
+ meta: {
+ docs: {
+ url: 'https://perfectionist.dev/rules/sort-switch-case',
+ description: 'Enforce sorted switch cases.',
+ recommended: true,
+ },
+ schema: [
+ {
+ properties: buildCommonJsonSchemas(),
+ additionalProperties: false,
+ type: 'object',
+ },
+ ],
+ messages: { [ORDER_ERROR_ID]: ORDER_ERROR },
+ type: 'suggestion',
+ fixable: 'code',
+ },
+ defaultOptions: [defaultOptions],
+ name: 'sort-switch-case',
+})
+/**
+ * Groups consecutive switch case nodes into blocks for sorting.
+ *
+ * Creates partitions of case nodes where each partition ends when the
+ * `endsBlock` predicate returns true (typically when a case has a break or
+ * return statement).
+ *
+ * @param caseNodes - Array of switch case sorting nodes to partition.
+ * @param endsBlock - Predicate function that determines if a case ends a block.
+ * @returns A 2D array where each inner array is a sortable block of cases.
+ */
+function reduceCaseSortingNodes(caseNodes, endsBlock) {
+ return caseNodes.reduce(
+ (accumulator, caseNode, index) => {
+ accumulator.at(-1).push(caseNode)
+ if (endsBlock(caseNode) && index !== caseNodes.length - 1) {
+ accumulator.push([])
+ }
+ return accumulator
+ },
+ [[]],
+ )
+}
+/**
+ * Extracts the name of a switch case for sorting purposes.
+ *
+ * For literal test values, returns the string representation of the value. For
+ * the default case (null test), returns 'default'. For other expressions,
+ * returns the source code text.
+ *
+ * @param sourceCode - The ESLint source code object.
+ * @param caseNode - The switch case AST node.
+ * @returns The name to use for sorting this case.
+ */
+function getCaseName(sourceCode, caseNode) {
+ if (caseNode.test?.type === AST_NODE_TYPES.Literal) {
+ return String(caseNode.test.value)
+ }
+ if (caseNode.test === null) {
+ return 'default'
+ }
+ return sourceCode.getText(caseNode.test)
+}
+/**
+ * Checks if a switch case contains a break or return statement.
+ *
+ * Examines the case's consequent statements, handling both direct statements
+ * and statements wrapped in a block.
+ *
+ * @param caseNode - The switch case AST node to check.
+ * @returns True if the case contains a break or return statement.
+ */
+function caseHasBreakOrReturn(caseNode) {
+ return (
+ caseNode.consequent[0]?.type === AST_NODE_TYPES.BlockStatement ?
+ caseNode.consequent[0].body
+ : caseNode.consequent).some(statementIsBreakOrReturn)
+}
+/**
+ * Type guard that checks if a statement is a break or return statement.
+ *
+ * @param statement - The statement AST node to check.
+ * @returns True if the statement is a BreakStatement or ReturnStatement.
+ */
+function statementIsBreakOrReturn(statement) {
+ return (
+ statement.type === AST_NODE_TYPES.BreakStatement ||
+ statement.type === AST_NODE_TYPES.ReturnStatement
+ )
+}
+export { sort_switch_case_default as default }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-switch-case/is-condition-expression.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-switch-case/is-condition-expression.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..2e67080485998c52ef38533f36c142432ff30c24
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-switch-case/is-condition-expression.d.ts
@@ -0,0 +1,15 @@
+import { TSESTree } from '@typescript-eslint/types'
+/**
+ * Checks if an expression is condition-shaped.
+ *
+ * Condition-shaped expressions are boolean literals, logical negations, binary
+ * expressions and logical expressions. Switch statements built on such
+ * expressions (e.g. `switch (true)`) encode their program logic in the case
+ * order, so sorting them is unsafe.
+ *
+ * @param node - The expression AST node to check.
+ * @returns True if the expression is condition-shaped.
+ */
+export declare function isConditionExpression(
+ node: TSESTree.Expression,
+): boolean
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-switch-case/is-condition-expression.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-switch-case/is-condition-expression.js
new file mode 100644
index 0000000000000000000000000000000000000000..d17aaf0ddee32dcfc61039a12f2ea42751dac92a
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-switch-case/is-condition-expression.js
@@ -0,0 +1,26 @@
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Checks if an expression is condition-shaped.
+ *
+ * Condition-shaped expressions are boolean literals, logical negations, binary
+ * expressions and logical expressions. Switch statements built on such
+ * expressions (e.g. `switch (true)`) encode their program logic in the case
+ * order, so sorting them is unsafe.
+ *
+ * @param node - The expression AST node to check.
+ * @returns True if the expression is condition-shaped.
+ */
+function isConditionExpression(node) {
+ switch (node.type) {
+ case AST_NODE_TYPES.LogicalExpression:
+ case AST_NODE_TYPES.BinaryExpression:
+ return true
+ case AST_NODE_TYPES.UnaryExpression:
+ return node.operator === '!'
+ case AST_NODE_TYPES.Literal:
+ return typeof node.value === 'boolean'
+ default:
+ return false
+ }
+}
+export { isConditionExpression }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-switch-case/types.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-switch-case/types.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..a63e69586ffe8e4c253a90a8f0459df6619e6485
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-switch-case/types.d.ts
@@ -0,0 +1,2 @@
+import { CommonOptions, TypeOption } from '../../types/common-options.js'
+export type Options = [Partial>]
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-union-or-intersection-types/build-json-schema.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-union-or-intersection-types/build-json-schema.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..b5bf82a60be6b07e57cbde8d615b2dbda52f3606
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-union-or-intersection-types/build-json-schema.d.ts
@@ -0,0 +1,6 @@
+import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'
+export declare function buildJsonSchema({
+ ignoreCallableTypes,
+}: {
+ ignoreCallableTypes: boolean
+}): JSONSchema4
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-union-or-intersection-types/build-json-schema.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-union-or-intersection-types/build-json-schema.js
new file mode 100644
index 0000000000000000000000000000000000000000..8282dc540396eeb0d6ffa2d2e0901b673aa20e07
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-union-or-intersection-types/build-json-schema.js
@@ -0,0 +1,39 @@
+import {
+ buildCommonJsonSchemas,
+ buildUseConfigIfJsonSchema,
+ matchesAstSelectorJsonSchema,
+} from '../../utils/json-schemas/common-json-schemas.js'
+import { buildCommonGroupsJsonSchemas } from '../../utils/json-schemas/common-groups-json-schemas.js'
+import {
+ partitionByCommentJsonSchema,
+ partitionByNewlineJsonSchema,
+} from '../../utils/json-schemas/common-partition-json-schemas.js'
+import { additionalCustomGroupMatchOptionsJsonSchema } from '../sort-union-types/types.js'
+function buildJsonSchema({ ignoreCallableTypes }) {
+ return {
+ items: {
+ properties: {
+ ...buildCommonJsonSchemas(),
+ ...buildCommonGroupsJsonSchemas({
+ additionalCustomGroupMatchProperties:
+ additionalCustomGroupMatchOptionsJsonSchema,
+ }),
+ useConfigurationIf: buildUseConfigIfJsonSchema({
+ additionalProperties: {
+ matchesAstSelector: matchesAstSelectorJsonSchema,
+ },
+ }),
+ partitionByComment: partitionByCommentJsonSchema,
+ partitionByNewLine: partitionByNewlineJsonSchema,
+ ...(ignoreCallableTypes && {
+ ignoreCallableTypes: { type: 'boolean' },
+ }),
+ },
+ additionalProperties: false,
+ type: 'object',
+ },
+ uniqueItems: true,
+ type: 'array',
+ }
+}
+export { buildJsonSchema }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-union-or-intersection-types/compute-matched-context-options.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-union-or-intersection-types/compute-matched-context-options.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..248561695563e0191ef696aa877be7a71ba9594b
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-union-or-intersection-types/compute-matched-context-options.d.ts
@@ -0,0 +1,25 @@
+import { RuleContext } from '@typescript-eslint/utils/ts-eslint'
+import { TSESTree } from '@typescript-eslint/types'
+import { Options } from '../sort-intersection-types/types.js'
+/**
+ * Computes the matched context options for a given union/intersection type
+ * node.
+ *
+ * @param params - Parameters.
+ * @param params.matchedAstSelectors - The matched AST selectors for the
+ * union/intersection type node.
+ * @param params.members - The type members to compute the context options for.
+ * @param params.context - The rule context.
+ * @returns The matched context options or undefined if none match.
+ */
+export declare function computeMatchedContextOptions<
+ MessageIds extends string,
+>({
+ matchedAstSelectors,
+ members,
+ context,
+}: {
+ context: Readonly>
+ matchedAstSelectors: ReadonlySet
+ members: TSESTree.TypeNode[]
+}): Options[number] | undefined
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-union-or-intersection-types/compute-matched-context-options.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-union-or-intersection-types/compute-matched-context-options.js
new file mode 100644
index 0000000000000000000000000000000000000000..44733377fb6cfbc6e5db1786bd39ae4129ef23cc
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-union-or-intersection-types/compute-matched-context-options.js
@@ -0,0 +1,49 @@
+import { passesAllNamesMatchPatternFilter } from '../../utils/context-matching/passes-all-names-match-pattern-filter.js'
+import { passesAstSelectorFilter } from '../../utils/context-matching/passes-ast-selector-filter.js'
+import { computeNodeName } from './compute-node-name.js'
+/**
+ * Computes the matched context options for a given union/intersection type
+ * node.
+ *
+ * @param params - Parameters.
+ * @param params.matchedAstSelectors - The matched AST selectors for the
+ * union/intersection type node.
+ * @param params.members - The type members to compute the context options for.
+ * @param params.context - The rule context.
+ * @returns The matched context options or undefined if none match.
+ */
+function computeMatchedContextOptions({
+ matchedAstSelectors,
+ members,
+ context,
+}) {
+ let nodeNames = members.map(member =>
+ computeNodeName({
+ sourceCode: context.sourceCode,
+ type: member,
+ }),
+ )
+ return context.options.find(options =>
+ isContextOptionMatching({
+ matchedAstSelectors,
+ nodeNames,
+ options,
+ }),
+ )
+}
+function isContextOptionMatching({ matchedAstSelectors, nodeNames, options }) {
+ if (!options.useConfigurationIf) {
+ return true
+ }
+ return (
+ passesAllNamesMatchPatternFilter({
+ allNamesMatchPattern: options.useConfigurationIf.allNamesMatchPattern,
+ nodeNames,
+ }) &&
+ passesAstSelectorFilter({
+ matchesAstSelector: options.useConfigurationIf.matchesAstSelector,
+ matchedAstSelectors,
+ })
+ )
+}
+export { computeMatchedContextOptions }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-union-or-intersection-types/compute-node-name.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-union-or-intersection-types/compute-node-name.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..d2cca21b507739ec7cf3c32ef17d705ad337100d
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-union-or-intersection-types/compute-node-name.d.ts
@@ -0,0 +1,21 @@
+import { TSESTree } from '@typescript-eslint/types'
+import { TSESLint } from '@typescript-eslint/utils'
+/**
+ * Computes the name of a union/intersection member.
+ *
+ * Multi-line parenthesized unions/intersections can include leading `|` or `&`
+ * in raw source text, while formatter output often omits them. To keep sorting
+ * stable across both forms, the leading separator prefix is normalized.
+ *
+ * @param params - Parameters object.
+ * @param params.sourceCode - ESLint source code object for text extraction.
+ * @param params.type - Type node represented by the member text.
+ * @returns Normalized member text used for sorting and matching.
+ */
+export declare function computeNodeName({
+ sourceCode,
+ type,
+}: {
+ sourceCode: TSESLint.SourceCode
+ type: TSESTree.TypeNode
+}): string
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-union-or-intersection-types/compute-node-name.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-union-or-intersection-types/compute-node-name.js
new file mode 100644
index 0000000000000000000000000000000000000000..3d547f8d57a48ab1038edd6cf9980be0239b22e3
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-union-or-intersection-types/compute-node-name.js
@@ -0,0 +1,24 @@
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Computes the name of a union/intersection member.
+ *
+ * Multi-line parenthesized unions/intersections can include leading `|` or `&`
+ * in raw source text, while formatter output often omits them. To keep sorting
+ * stable across both forms, the leading separator prefix is normalized.
+ *
+ * @param params - Parameters object.
+ * @param params.sourceCode - ESLint source code object for text extraction.
+ * @param params.type - Type node represented by the member text.
+ * @returns Normalized member text used for sorting and matching.
+ */
+function computeNodeName({ sourceCode, type }) {
+ let name = sourceCode.getText(type)
+ if (
+ type.type !== AST_NODE_TYPES.TSUnionType &&
+ type.type !== AST_NODE_TYPES.TSIntersectionType
+ ) {
+ return name
+ }
+ return name.replace(/^\s*[&|]\s*/u, '')
+}
+export { computeNodeName }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-union-or-intersection-types/sort-union-or-intersection-types.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-union-or-intersection-types/sort-union-or-intersection-types.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..ff8ac19d701f356e1c184135487ec172fd55ef41
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-union-or-intersection-types/sort-union-or-intersection-types.d.ts
@@ -0,0 +1,27 @@
+import { RuleContext } from '@typescript-eslint/utils/ts-eslint'
+import { TSESTree } from '@typescript-eslint/types'
+import { Options } from '../sort-intersection-types/types.js'
+export declare function sortUnionOrIntersectionTypes<
+ MessageIds extends string,
+>({
+ cachedGroupsByModifiersAndSelectors,
+ tokenValueToIgnoreBefore,
+ matchedAstSelectors,
+ availableMessageIds,
+ defaultOptions,
+ context,
+ node,
+}: {
+ availableMessageIds: {
+ missedSpacingBetweenMembers: MessageIds
+ extraSpacingBetweenMembers: MessageIds
+ unexpectedGroupOrder: MessageIds
+ unexpectedOrder: MessageIds
+ }
+ cachedGroupsByModifiersAndSelectors: Map
+ node: TSESTree.TSIntersectionType | TSESTree.TSUnionType
+ context: Readonly>
+ defaultOptions: Required
+ matchedAstSelectors: ReadonlySet
+ tokenValueToIgnoreBefore: string
+}): void
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-union-or-intersection-types/sort-union-or-intersection-types.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-union-or-intersection-types/sort-union-or-intersection-types.js
new file mode 100644
index 0000000000000000000000000000000000000000..70728334a5b6bb0acfd55bd5247b188ad4b8b552
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-union-or-intersection-types/sort-union-or-intersection-types.js
@@ -0,0 +1,187 @@
+import { defaultComparatorByOptionsComputer } from '../../utils/compare/default-comparator-by-options-computer.js'
+import { validateNewlinesAndPartitionConfig } from '../../utils/validate-newlines-and-partition-config.js'
+import { buildOptionsByGroupIndexComputer } from '../../utils/build-options-by-group-index-computer.js'
+import { validateCustomSortConfig } from '../../utils/validate-custom-sort-config.js'
+import { generatePredefinedGroups } from '../../utils/generate-predefined-groups.js'
+import { getEslintDisabledLines } from '../../utils/get-eslint-disabled-lines.js'
+import { doesCustomGroupMatch } from '../../utils/does-custom-group-match.js'
+import { isNodeEslintDisabled } from '../../utils/is-node-eslint-disabled.js'
+import { validateGroupsConfig } from '../../utils/validate-groups-config.js'
+import { sortNodesByGroups } from '../../utils/sort-nodes-by-groups.js'
+import { reportAllErrors } from '../../utils/report-all-errors.js'
+import { shouldPartition } from '../../utils/should-partition.js'
+import { computeGroup } from '../../utils/compute-group.js'
+import { rangeToDiff } from '../../utils/range-to-diff.js'
+import { getSettings } from '../../utils/get-settings.js'
+import { complete } from '../../utils/complete.js'
+import { allSelectors } from '../sort-union-types/types.js'
+import { computeNodeName } from './compute-node-name.js'
+import { computeMatchedContextOptions } from './compute-matched-context-options.js'
+import { typeContainsCallableType } from './type-contains-callable-type.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+function sortUnionOrIntersectionTypes({
+ cachedGroupsByModifiersAndSelectors,
+ tokenValueToIgnoreBefore,
+ matchedAstSelectors,
+ availableMessageIds,
+ defaultOptions,
+ context,
+ node,
+}) {
+ let settings = getSettings(context.settings)
+ let matchedContextOptions = computeMatchedContextOptions({
+ members: node.types,
+ matchedAstSelectors,
+ context,
+ })
+ let options = complete(matchedContextOptions, settings, defaultOptions)
+ validateCustomSortConfig(options)
+ validateGroupsConfig({
+ selectors: allSelectors,
+ modifiers: [],
+ options,
+ })
+ validateNewlinesAndPartitionConfig(options)
+ if (
+ options.ignoreCallableTypes &&
+ node.types.some(typeContainsCallableType)
+ ) {
+ return
+ }
+ let { sourceCode, id } = context
+ let eslintDisabledLines = getEslintDisabledLines({
+ ruleName: id,
+ sourceCode,
+ })
+ let optionsByGroupIndexComputer = buildOptionsByGroupIndexComputer(options)
+ let formattedMembers = node.types.reduce(
+ (accumulator, type) => {
+ let selectors = []
+ switch (type.type) {
+ case AST_NODE_TYPES.TSTemplateLiteralType:
+ case AST_NODE_TYPES.TSLiteralType:
+ selectors.push('literal')
+ break
+ case AST_NODE_TYPES.TSIndexedAccessType:
+ case AST_NODE_TYPES.TSTypeReference:
+ case AST_NODE_TYPES.TSQualifiedName:
+ case AST_NODE_TYPES.TSArrayType:
+ case AST_NODE_TYPES.TSInferType:
+ selectors.push('named')
+ break
+ case AST_NODE_TYPES.TSIntersectionType:
+ selectors.push('intersection')
+ break
+ case AST_NODE_TYPES.TSUndefinedKeyword:
+ case AST_NODE_TYPES.TSNullKeyword:
+ case AST_NODE_TYPES.TSVoidKeyword:
+ selectors.push('nullish')
+ break
+ case AST_NODE_TYPES.TSConditionalType:
+ selectors.push('conditional')
+ break
+ case AST_NODE_TYPES.TSConstructorType:
+ case AST_NODE_TYPES.TSFunctionType:
+ selectors.push('function')
+ break
+ case AST_NODE_TYPES.TSBooleanKeyword:
+ case AST_NODE_TYPES.TSUnknownKeyword:
+ case AST_NODE_TYPES.TSBigIntKeyword:
+ case AST_NODE_TYPES.TSNumberKeyword:
+ case AST_NODE_TYPES.TSObjectKeyword:
+ case AST_NODE_TYPES.TSStringKeyword:
+ case AST_NODE_TYPES.TSSymbolKeyword:
+ case AST_NODE_TYPES.TSNeverKeyword:
+ case AST_NODE_TYPES.TSAnyKeyword:
+ case AST_NODE_TYPES.TSThisType:
+ selectors.push('keyword')
+ break
+ case AST_NODE_TYPES.TSTypeOperator:
+ case AST_NODE_TYPES.TSTypeQuery:
+ selectors.push('operator')
+ break
+ case AST_NODE_TYPES.TSTypeLiteral:
+ case AST_NODE_TYPES.TSMappedType:
+ selectors.push('object')
+ break
+ case AST_NODE_TYPES.TSImportType:
+ selectors.push('import')
+ break
+ case AST_NODE_TYPES.TSTupleType:
+ selectors.push('tuple')
+ break
+ case AST_NODE_TYPES.TSUnionType:
+ selectors.push('union')
+ }
+ let name = computeNodeName({
+ sourceCode,
+ type,
+ })
+ let predefinedGroups = generatePredefinedGroups({
+ cache: cachedGroupsByModifiersAndSelectors,
+ modifiers: [],
+ selectors,
+ })
+ let group = computeGroup({
+ customGroupMatcher: customGroup =>
+ doesCustomGroupMatch({
+ elementName: name,
+ modifiers: [],
+ customGroup,
+ selectors,
+ }),
+ predefinedGroups,
+ options,
+ })
+ let lastGroup = accumulator.at(-1)
+ let lastSortingNode = lastGroup?.at(-1)
+ let sortingNode = {
+ isEslintDisabled: isNodeEslintDisabled(type, eslintDisabledLines),
+ size: rangeToDiff(type, sourceCode),
+ node: type,
+ group,
+ name,
+ }
+ if (
+ shouldPartition({
+ tokenValueToIgnoreBefore,
+ lastSortingNode,
+ sortingNode,
+ sourceCode,
+ options,
+ })
+ ) {
+ lastGroup = []
+ accumulator.push(lastGroup)
+ }
+ lastGroup?.push({
+ ...sortingNode,
+ partitionId: accumulator.length,
+ })
+ return accumulator
+ },
+ [[]],
+ )
+ for (let nodes of formattedMembers) {
+ reportAllErrors({
+ sortNodesExcludingEslintDisabled:
+ createSortNodesExcludingEslintDisabled(nodes),
+ availableMessageIds,
+ options,
+ context,
+ nodes,
+ })
+ }
+ function createSortNodesExcludingEslintDisabled(sortingNodes) {
+ return function (ignoreEslintDisabledNodes) {
+ return sortNodesByGroups({
+ comparatorByOptionsComputer: defaultComparatorByOptionsComputer,
+ optionsByGroupIndexComputer,
+ ignoreEslintDisabledNodes,
+ groups: options.groups,
+ nodes: sortingNodes,
+ })
+ }
+ }
+}
+export { sortUnionOrIntersectionTypes }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-union-or-intersection-types/type-contains-callable-type.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-union-or-intersection-types/type-contains-callable-type.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..a000bf85ee309d7c057318362b42c0b1fd687ffc
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-union-or-intersection-types/type-contains-callable-type.d.ts
@@ -0,0 +1,10 @@
+import { TSESTree } from '@typescript-eslint/types'
+/**
+ * Checks if a type node contains a callable type (function or constructor).
+ *
+ * @param typeNode - The type node to check.
+ * @returns True if the type node contains a callable type, false otherwise.
+ */
+export declare function typeContainsCallableType(
+ typeNode: TSESTree.TypeNode,
+): boolean
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-union-or-intersection-types/type-contains-callable-type.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-union-or-intersection-types/type-contains-callable-type.js
new file mode 100644
index 0000000000000000000000000000000000000000..db6f128c0a8c68a79f377ede8733447ebfa03537
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-union-or-intersection-types/type-contains-callable-type.js
@@ -0,0 +1,38 @@
+import { UnreachableCaseError } from '../../utils/unreachable-case-error.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Checks if a type node contains a callable type (function or constructor).
+ *
+ * @param typeNode - The type node to check.
+ * @returns True if the type node contains a callable type, false otherwise.
+ */
+function typeContainsCallableType(typeNode) {
+ switch (typeNode.type) {
+ case AST_NODE_TYPES.TSConstructorType:
+ case AST_NODE_TYPES.TSFunctionType:
+ return true
+ case AST_NODE_TYPES.TSTypeLiteral:
+ return typeNode.members.some(typeElementContainsCallableType)
+ default:
+ return false
+ }
+ function typeElementContainsCallableType(member) {
+ switch (member.type) {
+ case AST_NODE_TYPES.TSConstructSignatureDeclaration:
+ case AST_NODE_TYPES.TSIndexSignature:
+ return false
+ case AST_NODE_TYPES.TSCallSignatureDeclaration:
+ case AST_NODE_TYPES.TSMethodSignature:
+ return true
+ case AST_NODE_TYPES.TSPropertySignature:
+ return !!(
+ member.typeAnnotation &&
+ typeContainsCallableType(member.typeAnnotation.typeAnnotation)
+ )
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(member)
+ }
+ }
+}
+export { typeContainsCallableType }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-union-types.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-union-types.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..25ed32a1ce2d6c19fb45b14bffd7cbaff38d0401
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-union-types.d.ts
@@ -0,0 +1,21 @@
+import { Options } from './sort-union-types/types.js'
+declare const ORDER_ERROR_ID = 'unexpectedUnionTypesOrder'
+declare const GROUP_ORDER_ERROR_ID = 'unexpectedUnionTypesGroupOrder'
+declare const EXTRA_SPACING_ERROR_ID = 'extraSpacingBetweenUnionTypes'
+declare const MISSED_SPACING_ERROR_ID = 'missedSpacingBetweenUnionTypes'
+type MessageId =
+ | typeof MISSED_SPACING_ERROR_ID
+ | typeof EXTRA_SPACING_ERROR_ID
+ | typeof GROUP_ORDER_ERROR_ID
+ | typeof ORDER_ERROR_ID
+declare const _default: import('@typescript-eslint/utils/ts-eslint').RuleModule<
+ MessageId,
+ Options,
+ {
+ recommended?: boolean
+ },
+ import('@typescript-eslint/utils/ts-eslint').RuleListener
+> & {
+ name: string
+}
+export default _default
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-union-types.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-union-types.js
new file mode 100644
index 0000000000000000000000000000000000000000..a18fa14eb6215905b4ef18f9a198c93fbfaa3ddf
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-union-types.js
@@ -0,0 +1,81 @@
+import {
+ EXTRA_SPACING_ERROR,
+ GROUP_ORDER_ERROR,
+ MISSED_SPACING_ERROR,
+ ORDER_ERROR,
+} from '../utils/report-errors.js'
+import { buildAstListeners } from '../utils/build-ast-listeners.js'
+import { createEslintRule } from '../utils/create-eslint-rule.js'
+import { sortUnionOrIntersectionTypes } from './sort-union-or-intersection-types/sort-union-or-intersection-types.js'
+import { buildJsonSchema } from './sort-union-or-intersection-types/build-json-schema.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Cache computed groups by modifiers and selectors for performance.
+ */
+var cachedGroupsByModifiersAndSelectors = /* @__PURE__ */ new Map()
+var ORDER_ERROR_ID = 'unexpectedUnionTypesOrder'
+var GROUP_ORDER_ERROR_ID = 'unexpectedUnionTypesGroupOrder'
+var EXTRA_SPACING_ERROR_ID = 'extraSpacingBetweenUnionTypes'
+var MISSED_SPACING_ERROR_ID = 'missedSpacingBetweenUnionTypes'
+var defaultOptions = {
+ fallbackSort: { type: 'unsorted' },
+ newlinesInside: 'newlinesBetween',
+ specialCharacters: 'keep',
+ newlinesBetween: 'ignore',
+ partitionByNewLine: false,
+ partitionByComment: false,
+ useConfigurationIf: {},
+ type: 'alphabetical',
+ ignoreCase: true,
+ locales: 'en-US',
+ customGroups: [],
+ alphabet: '',
+ order: 'asc',
+ groups: [],
+}
+var sort_union_types_default = createEslintRule({
+ meta: {
+ messages: {
+ [MISSED_SPACING_ERROR_ID]: MISSED_SPACING_ERROR,
+ [EXTRA_SPACING_ERROR_ID]: EXTRA_SPACING_ERROR,
+ [GROUP_ORDER_ERROR_ID]: GROUP_ORDER_ERROR,
+ [ORDER_ERROR_ID]: ORDER_ERROR,
+ },
+ docs: {
+ url: 'https://perfectionist.dev/rules/sort-union-types',
+ description: 'Enforce sorted union types.',
+ recommended: true,
+ },
+ schema: buildJsonSchema({ ignoreCallableTypes: false }),
+ type: 'suggestion',
+ fixable: 'code',
+ },
+ create: context =>
+ buildAstListeners({
+ nodeTypes: [AST_NODE_TYPES.TSUnionType],
+ sorter: sortUnionType,
+ context,
+ }),
+ defaultOptions: [defaultOptions],
+ name: 'sort-union-types',
+})
+function sortUnionType({ matchedAstSelectors, context, node }) {
+ sortUnionOrIntersectionTypes({
+ availableMessageIds: {
+ missedSpacingBetweenMembers: MISSED_SPACING_ERROR_ID,
+ extraSpacingBetweenMembers: EXTRA_SPACING_ERROR_ID,
+ unexpectedGroupOrder: GROUP_ORDER_ERROR_ID,
+ unexpectedOrder: ORDER_ERROR_ID,
+ },
+ defaultOptions: {
+ ...defaultOptions,
+ ignoreCallableTypes: false,
+ },
+ cachedGroupsByModifiersAndSelectors,
+ tokenValueToIgnoreBefore: '|',
+ matchedAstSelectors,
+ context,
+ node,
+ })
+}
+export { sort_union_types_default as default }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-union-types/types.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-union-types/types.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..2ccb4a792263b681eefae97a93598ab9472ed385
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-union-types/types.d.ts
@@ -0,0 +1,80 @@
+import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'
+import { TSESTree } from '@typescript-eslint/types'
+import { RegexOption, TypeOption } from '../../types/common-options.js'
+import { AllCommonOptions } from '../../types/all-common-options.js'
+import { SortingNode } from '../../types/sorting-node.js'
+/**
+ * Configuration options for the sort-union-types rule.
+ *
+ * Controls how TypeScript union type members are sorted.
+ */
+export type Options = Partial<
+ {
+ /**
+ * Conditional configuration based on pattern matching.
+ */
+ useConfigurationIf: {
+ /**
+ * Regular expression pattern to match against all member names. The
+ * rule is only applied when all member names match this pattern.
+ */
+ allNamesMatchPattern?: RegexOption
+ /**
+ * AST selector to match against TSUnionType or TSIntersectionType
+ * nodes.
+ */
+ matchesAstSelector?: string
+ }
+ } & AllCommonOptions<
+ TypeOption,
+ AdditionalSortOptions,
+ CustomGroupMatchOptions
+ >
+>[]
+export type SortUnionOrIntersectionSortingNode = SortingNode
+/**
+ * Union type of all available selectors for union type members.
+ *
+ * Selectors categorize different kinds of TypeScript types that can appear in a
+ * union, enabling fine-grained control over sorting.
+ */
+export type Selector = (typeof allSelectors)[number]
+/**
+ * Match options for a custom group.
+ */
+interface CustomGroupMatchOptions {
+ /**
+ * The selector type this group matches. Determines what kind of type
+ * members belong to this group.
+ */
+ selector?: Selector
+}
+type AdditionalSortOptions = object
+/**
+ * Array of all available selectors for union type members.
+ *
+ * Used for validation and configuration in the ESLint rule.
+ */
+export declare let allSelectors: readonly [
+ 'intersection',
+ 'conditional',
+ 'function',
+ 'operator',
+ 'keyword',
+ 'literal',
+ 'nullish',
+ 'import',
+ 'object',
+ 'named',
+ 'tuple',
+ 'union',
+]
+/**
+ * Additional custom group match options JSON schema. Used by ESLint to validate
+ * rule options at configuration time.
+ */
+export declare let additionalCustomGroupMatchOptionsJsonSchema: Record<
+ string,
+ JSONSchema4
+>
+export {}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-union-types/types.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-union-types/types.js
new file mode 100644
index 0000000000000000000000000000000000000000..a448abca03c096755f6359317990944d8555d115
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-union-types/types.js
@@ -0,0 +1,28 @@
+import { buildCustomGroupSelectorJsonSchema } from '../../utils/json-schemas/common-groups-json-schemas.js'
+/**
+ * Array of all available selectors for union type members.
+ *
+ * Used for validation and configuration in the ESLint rule.
+ */
+var allSelectors = [
+ 'intersection',
+ 'conditional',
+ 'function',
+ 'operator',
+ 'keyword',
+ 'literal',
+ 'nullish',
+ 'import',
+ 'object',
+ 'named',
+ 'tuple',
+ 'union',
+]
+/**
+ * Additional custom group match options JSON schema. Used by ESLint to validate
+ * rule options at configuration time.
+ */
+var additionalCustomGroupMatchOptionsJsonSchema = {
+ selector: buildCustomGroupSelectorJsonSchema(allSelectors),
+}
+export { additionalCustomGroupMatchOptionsJsonSchema, allSelectors }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-variable-declarations.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-variable-declarations.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..3a14e36c5104af3bd96a3329475034d206002d72
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-variable-declarations.d.ts
@@ -0,0 +1,12 @@
+import { MessageId, Options } from './sort-variable-declarations/types.js'
+declare const _default: import('@typescript-eslint/utils/ts-eslint').RuleModule<
+ MessageId,
+ Options,
+ {
+ recommended?: boolean
+ },
+ import('@typescript-eslint/utils/ts-eslint').RuleListener
+> & {
+ name: string
+}
+export default _default
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-variable-declarations.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-variable-declarations.js
new file mode 100644
index 0000000000000000000000000000000000000000..6e5ef6b495ec6eba2e8f428ec8524e4e363fbacd
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-variable-declarations.js
@@ -0,0 +1,84 @@
+import {
+ buildCommonJsonSchemas,
+ buildUseConfigIfJsonSchema,
+ matchesAstSelectorJsonSchema,
+ useExperimentalDependencyDetectionJsonSchema,
+} from '../utils/json-schemas/common-json-schemas.js'
+import { buildCommonGroupsJsonSchemas } from '../utils/json-schemas/common-groups-json-schemas.js'
+import {
+ DEPENDENCY_ORDER_ERROR_ID,
+ EXTRA_SPACING_ERROR_ID,
+ GROUP_ORDER_ERROR_ID,
+ MISSED_SPACING_ERROR_ID,
+ ORDER_ERROR_ID,
+ additionalCustomGroupMatchOptionsJsonSchema,
+} from './sort-variable-declarations/types.js'
+import {
+ DEPENDENCY_ORDER_ERROR,
+ EXTRA_SPACING_ERROR,
+ GROUP_ORDER_ERROR,
+ MISSED_SPACING_ERROR,
+ ORDER_ERROR,
+} from '../utils/report-errors.js'
+import {
+ partitionByCommentJsonSchema,
+ partitionByNewlineJsonSchema,
+} from '../utils/json-schemas/common-partition-json-schemas.js'
+import {
+ defaultOptions,
+ sortVariableDeclaration,
+} from './sort-variable-declarations/sort-variable-declaration.js'
+import { buildAstListeners } from '../utils/build-ast-listeners.js'
+import { createEslintRule } from '../utils/create-eslint-rule.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+var sort_variable_declarations_default = createEslintRule({
+ meta: {
+ schema: {
+ items: {
+ properties: {
+ ...buildCommonJsonSchemas(),
+ ...buildCommonGroupsJsonSchemas({
+ additionalCustomGroupMatchProperties:
+ additionalCustomGroupMatchOptionsJsonSchema,
+ }),
+ useConfigurationIf: buildUseConfigIfJsonSchema({
+ additionalProperties: {
+ matchesAstSelector: matchesAstSelectorJsonSchema,
+ },
+ }),
+ useExperimentalDependencyDetection:
+ useExperimentalDependencyDetectionJsonSchema,
+ partitionByComment: partitionByCommentJsonSchema,
+ partitionByNewLine: partitionByNewlineJsonSchema,
+ },
+ additionalProperties: false,
+ type: 'object',
+ },
+ uniqueItems: true,
+ type: 'array',
+ },
+ messages: {
+ [DEPENDENCY_ORDER_ERROR_ID]: DEPENDENCY_ORDER_ERROR,
+ [MISSED_SPACING_ERROR_ID]: MISSED_SPACING_ERROR,
+ [EXTRA_SPACING_ERROR_ID]: EXTRA_SPACING_ERROR,
+ [GROUP_ORDER_ERROR_ID]: GROUP_ORDER_ERROR,
+ [ORDER_ERROR_ID]: ORDER_ERROR,
+ },
+ docs: {
+ url: 'https://perfectionist.dev/rules/sort-variable-declarations',
+ description: 'Enforce sorted variable declarations.',
+ recommended: true,
+ },
+ type: 'suggestion',
+ fixable: 'code',
+ },
+ create: context =>
+ buildAstListeners({
+ nodeTypes: [AST_NODE_TYPES.VariableDeclaration],
+ sorter: sortVariableDeclaration,
+ context,
+ }),
+ name: 'sort-variable-declarations',
+ defaultOptions: [defaultOptions],
+})
+export { sort_variable_declarations_default as default }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-variable-declarations/compute-dependencies.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-variable-declarations/compute-dependencies.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..98bed3b16c1b6484f41a43f564922b38715869a8
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-variable-declarations/compute-dependencies.d.ts
@@ -0,0 +1,12 @@
+import { SortVariableDeclarationsNode } from './types.js'
+/**
+ * Computes the dependencies of a variable declaration node.
+ *
+ * @deprecated - To remove when experimental dependency detection is the only
+ * option.
+ * @param node - The AST node to analyze.
+ * @returns The names of the dependencies.
+ */
+export declare function computeDependencies(
+ node: SortVariableDeclarationsNode,
+): string[]
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-variable-declarations/compute-dependencies.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-variable-declarations/compute-dependencies.js
new file mode 100644
index 0000000000000000000000000000000000000000..1bfb9fc53a9fda1ff9e1f21cda3b9374ff8ea021
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-variable-declarations/compute-dependencies.js
@@ -0,0 +1,94 @@
+import { isNodeImmediatelyCalled } from '../../utils/is-node-immediately-called.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Computes the dependencies of a variable declaration node.
+ *
+ * @deprecated - To remove when experimental dependency detection is the only
+ * option.
+ * @param node - The AST node to analyze.
+ * @returns The names of the dependencies.
+ */
+function computeDependencies(node) {
+ return [
+ ...computeExpressionDependencies(node.id),
+ ...(node.init ? computeExpressionDependencies(node.init) : []),
+ ]
+}
+function computeExpressionDependencies(expression) {
+ let dependencies = []
+ checkNode(expression)
+ return dependencies
+ function checkNode(node) {
+ switch (node.type) {
+ /**
+ * No need to check the body of functions and arrow functions, unless they
+ * are immediately called.
+ */
+ case AST_NODE_TYPES.ArrowFunctionExpression:
+ case AST_NODE_TYPES.FunctionExpression:
+ if (!isNodeImmediatelyCalled(node)) {
+ return
+ }
+ checkNode(node.body)
+ return
+ case AST_NODE_TYPES.ConditionalExpression:
+ checkNode(node.test)
+ checkNode(node.consequent)
+ checkNode(node.alternate)
+ break
+ case AST_NODE_TYPES.BlockStatement:
+ for (let statement of node.body) {
+ checkNode(statement)
+ }
+ break
+ case AST_NODE_TYPES.Identifier:
+ dependencies.push(node.name)
+ break
+ case AST_NODE_TYPES.Property:
+ if (node.computed) {
+ checkNode(node.key)
+ }
+ checkNode(node.value)
+ }
+ if ('expression' in node && typeof node.expression !== 'boolean') {
+ checkNode(node.expression)
+ }
+ if ('object' in node) {
+ checkNode(node.object)
+ }
+ if ('callee' in node) {
+ checkNode(node.callee)
+ }
+ if ('left' in node) {
+ checkNode(node.left)
+ }
+ if ('right' in node) {
+ checkNode(node.right)
+ }
+ if ('elements' in node) {
+ let elements = node.elements.filter(currentNode => currentNode !== null)
+ for (let element of elements) {
+ checkNode(element)
+ }
+ }
+ if ('argument' in node && node.argument) {
+ checkNode(node.argument)
+ }
+ if ('arguments' in node) {
+ for (let argument of node.arguments) {
+ checkNode(argument)
+ }
+ }
+ if ('properties' in node) {
+ for (let property of node.properties) {
+ checkNode(property)
+ }
+ }
+ if ('expressions' in node) {
+ for (let nodeExpression of node.expressions) {
+ checkNode(nodeExpression)
+ }
+ }
+ }
+}
+export { computeDependencies }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-variable-declarations/compute-matched-context-options.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-variable-declarations/compute-matched-context-options.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..26a440cc8a6103e128ccb4f105082cdd5447bf17
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-variable-declarations/compute-matched-context-options.d.ts
@@ -0,0 +1,27 @@
+import { RuleContext } from '@typescript-eslint/utils/ts-eslint'
+import { TSESLint } from '@typescript-eslint/utils'
+import { TSESTree } from '@typescript-eslint/types'
+import { MessageId, Options } from './types.js'
+/**
+ * Computes the matched context options for a given variable declaration node.
+ *
+ * @param params - Parameters.
+ * @param params.node - The variable declaration node to compute the context
+ * options for.
+ * @param params.matchedAstSelectors - The matched AST selectors for an object
+ * node.
+ * @param params.sourceCode - The ESLint source code object.
+ * @param params.context - The rule context.
+ * @returns The matched context options or undefined if none match.
+ */
+export declare function computeMatchedContextOptions({
+ matchedAstSelectors,
+ sourceCode,
+ context,
+ node,
+}: {
+ context: Readonly>
+ matchedAstSelectors: ReadonlySet
+ node: TSESTree.VariableDeclaration
+ sourceCode: TSESLint.SourceCode
+}): Options[number] | undefined
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-variable-declarations/compute-matched-context-options.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-variable-declarations/compute-matched-context-options.js
new file mode 100644
index 0000000000000000000000000000000000000000..a747ca1ed6c1359ccd38f0781ce595aca657a94f
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-variable-declarations/compute-matched-context-options.js
@@ -0,0 +1,51 @@
+import { passesAllNamesMatchPatternFilter } from '../../utils/context-matching/passes-all-names-match-pattern-filter.js'
+import { passesAstSelectorFilter } from '../../utils/context-matching/passes-ast-selector-filter.js'
+import { computeNodeName } from './compute-node-name.js'
+/**
+ * Computes the matched context options for a given variable declaration node.
+ *
+ * @param params - Parameters.
+ * @param params.node - The variable declaration node to compute the context
+ * options for.
+ * @param params.matchedAstSelectors - The matched AST selectors for an object
+ * node.
+ * @param params.sourceCode - The ESLint source code object.
+ * @param params.context - The rule context.
+ * @returns The matched context options or undefined if none match.
+ */
+function computeMatchedContextOptions({
+ matchedAstSelectors,
+ sourceCode,
+ context,
+ node,
+}) {
+ let nodeNames = node.declarations.map(declaration =>
+ computeNodeName({
+ node: declaration,
+ sourceCode,
+ }),
+ )
+ return context.options.find(options =>
+ isContextOptionMatching({
+ matchedAstSelectors,
+ nodeNames,
+ options,
+ }),
+ )
+}
+function isContextOptionMatching({ matchedAstSelectors, nodeNames, options }) {
+ if (!options.useConfigurationIf) {
+ return true
+ }
+ return (
+ passesAllNamesMatchPatternFilter({
+ allNamesMatchPattern: options.useConfigurationIf.allNamesMatchPattern,
+ nodeNames,
+ }) &&
+ passesAstSelectorFilter({
+ matchesAstSelector: options.useConfigurationIf.matchesAstSelector,
+ matchedAstSelectors,
+ })
+ )
+}
+export { computeMatchedContextOptions }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-variable-declarations/compute-node-name.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-variable-declarations/compute-node-name.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..5e513f1d3d4d3c3e440ea7ce28d08e641e543382
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-variable-declarations/compute-node-name.d.ts
@@ -0,0 +1,17 @@
+import { TSESLint } from '@typescript-eslint/utils'
+import { SortVariableDeclarationsNode } from './types.js'
+/**
+ * Computes the name of a variable declaration.
+ *
+ * @param props - The parameters object.
+ * @param props.sourceCode - ESLint source code object for text extraction.
+ * @param props.node - The AST node representing a variable declaration node.
+ * @returns The name of the variable declaration node.
+ */
+export declare function computeNodeName({
+ sourceCode,
+ node,
+}: {
+ node: SortVariableDeclarationsNode
+ sourceCode: TSESLint.SourceCode
+}): string
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-variable-declarations/compute-node-name.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-variable-declarations/compute-node-name.js
new file mode 100644
index 0000000000000000000000000000000000000000..783093d4d8a77b001ede90c97c19f1b0381d62ff
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-variable-declarations/compute-node-name.js
@@ -0,0 +1,23 @@
+import { UnreachableCaseError } from '../../utils/unreachable-case-error.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Computes the name of a variable declaration.
+ *
+ * @param props - The parameters object.
+ * @param props.sourceCode - ESLint source code object for text extraction.
+ * @param props.node - The AST node representing a variable declaration node.
+ * @returns The name of the variable declaration node.
+ */
+function computeNodeName({ sourceCode, node }) {
+ switch (node.id.type) {
+ case AST_NODE_TYPES.ObjectPattern:
+ case AST_NODE_TYPES.ArrayPattern:
+ return sourceCode.text.slice(...node.id.range)
+ case AST_NODE_TYPES.Identifier:
+ return node.id.name
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(node.id)
+ }
+}
+export { computeNodeName }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-variable-declarations/sort-variable-declaration.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-variable-declarations/sort-variable-declaration.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..57474b316e71d7816d16f8c5ae41e002ddf94bd0
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-variable-declarations/sort-variable-declaration.d.ts
@@ -0,0 +1,13 @@
+import { TSESLint } from '@typescript-eslint/utils'
+import { TSESTree } from '@typescript-eslint/types'
+import { MessageId, Options } from './types.js'
+export declare let defaultOptions: Required
+export declare function sortVariableDeclaration({
+ matchedAstSelectors,
+ context,
+ node,
+}: {
+ context: TSESLint.RuleContext
+ matchedAstSelectors: ReadonlySet
+ node: TSESTree.VariableDeclaration
+}): void
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-variable-declarations/sort-variable-declaration.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-variable-declarations/sort-variable-declaration.js
new file mode 100644
index 0000000000000000000000000000000000000000..ecdfa4db898f69003bdf7121c24b1a4042dfd94d
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-variable-declarations/sort-variable-declaration.js
@@ -0,0 +1,174 @@
+import {
+ DEPENDENCY_ORDER_ERROR_ID,
+ EXTRA_SPACING_ERROR_ID,
+ GROUP_ORDER_ERROR_ID,
+ MISSED_SPACING_ERROR_ID,
+ ORDER_ERROR_ID,
+ allSelectors,
+} from './types.js'
+import { computeDependenciesOutsideFunctionsBySortingNode } from '../../utils/compute-dependencies-outside-functions-by-sorting-node.js'
+import { populateSortingNodeGroupsWithDependencies } from '../../utils/populate-sorting-node-groups-with-dependencies.js'
+import { defaultComparatorByOptionsComputer } from '../../utils/compare/default-comparator-by-options-computer.js'
+import { validateNewlinesAndPartitionConfig } from '../../utils/validate-newlines-and-partition-config.js'
+import { buildOptionsByGroupIndexComputer } from '../../utils/build-options-by-group-index-computer.js'
+import { validateCustomSortConfig } from '../../utils/validate-custom-sort-config.js'
+import { generatePredefinedGroups } from '../../utils/generate-predefined-groups.js'
+import { computeNodeName } from './compute-node-name.js'
+import { computeMatchedContextOptions } from './compute-matched-context-options.js'
+import { sortNodesByDependencies } from '../../utils/sort-nodes-by-dependencies.js'
+import { getEslintDisabledLines } from '../../utils/get-eslint-disabled-lines.js'
+import { doesCustomGroupMatch } from '../../utils/does-custom-group-match.js'
+import { isNodeEslintDisabled } from '../../utils/is-node-eslint-disabled.js'
+import { validateGroupsConfig } from '../../utils/validate-groups-config.js'
+import { sortNodesByGroups } from '../../utils/sort-nodes-by-groups.js'
+import { reportAllErrors } from '../../utils/report-all-errors.js'
+import { shouldPartition } from '../../utils/should-partition.js'
+import { computeDependencies } from './compute-dependencies.js'
+import { computeGroup } from '../../utils/compute-group.js'
+import { rangeToDiff } from '../../utils/range-to-diff.js'
+import { getSettings } from '../../utils/get-settings.js'
+import { isSortable } from '../../utils/is-sortable.js'
+import { complete } from '../../utils/complete.js'
+/**
+ * Cache computed groups by modifiers and selectors for performance.
+ */
+var cachedGroupsByModifiersAndSelectors = /* @__PURE__ */ new Map()
+var defaultOptions = {
+ useExperimentalDependencyDetection: true,
+ fallbackSort: { type: 'unsorted' },
+ newlinesInside: 'newlinesBetween',
+ specialCharacters: 'keep',
+ partitionByNewLine: false,
+ partitionByComment: false,
+ newlinesBetween: 'ignore',
+ useConfigurationIf: {},
+ type: 'alphabetical',
+ customGroups: [],
+ ignoreCase: true,
+ locales: 'en-US',
+ alphabet: '',
+ order: 'asc',
+ groups: [],
+}
+function sortVariableDeclaration({ matchedAstSelectors, context, node }) {
+ if (!isSortable(node.declarations)) {
+ return
+ }
+ let { sourceCode, id } = context
+ let settings = getSettings(context.settings)
+ let matchedContextOptions = computeMatchedContextOptions({
+ matchedAstSelectors,
+ sourceCode,
+ context,
+ node,
+ })
+ let options = complete(matchedContextOptions, settings, defaultOptions)
+ validateCustomSortConfig(options)
+ validateNewlinesAndPartitionConfig(options)
+ validateGroupsConfig({
+ selectors: allSelectors,
+ modifiers: [],
+ options,
+ })
+ let eslintDisabledLines = getEslintDisabledLines({
+ ruleName: id,
+ sourceCode,
+ })
+ let optionsByGroupIndexComputer = buildOptionsByGroupIndexComputer(options)
+ let sortingNodeGroups = node.declarations.reduce(
+ (accumulator, declaration) => {
+ let name = computeNodeName({
+ node: declaration,
+ sourceCode,
+ })
+ let selector = declaration.init ? 'initialized' : 'uninitialized'
+ let predefinedGroups = generatePredefinedGroups({
+ cache: cachedGroupsByModifiersAndSelectors,
+ selectors: [selector],
+ modifiers: [],
+ })
+ let lastSortingNode = accumulator.at(-1)?.at(-1)
+ let sortingNode = {
+ group: computeGroup({
+ customGroupMatcher: customGroup =>
+ doesCustomGroupMatch({
+ selectors: [selector],
+ elementName: name,
+ modifiers: [],
+ customGroup,
+ }),
+ predefinedGroups,
+ options,
+ }),
+ dependencies:
+ options.useExperimentalDependencyDetection ?
+ []
+ : computeDependencies(declaration),
+ isEslintDisabled: isNodeEslintDisabled(
+ declaration,
+ eslintDisabledLines,
+ ),
+ size: rangeToDiff(declaration, sourceCode),
+ dependencyNames: [name],
+ node: declaration,
+ name,
+ }
+ if (
+ shouldPartition({
+ lastSortingNode,
+ sortingNode,
+ sourceCode,
+ options,
+ })
+ ) {
+ accumulator.push([])
+ }
+ accumulator.at(-1)?.push({
+ ...sortingNode,
+ partitionId: accumulator.length,
+ })
+ return accumulator
+ },
+ [[]],
+ )
+ if (options.useExperimentalDependencyDetection) {
+ let dependenciesBySortingNode =
+ computeDependenciesOutsideFunctionsBySortingNode({
+ sortingNodes: sortingNodeGroups.flat(),
+ sourceCode,
+ })
+ sortingNodeGroups = populateSortingNodeGroupsWithDependencies({
+ dependenciesBySortingNode,
+ sortingNodeGroups,
+ })
+ }
+ let sortingNodes = sortingNodeGroups.flat()
+ reportAllErrors({
+ availableMessageIds: {
+ missedSpacingBetweenMembers: MISSED_SPACING_ERROR_ID,
+ unexpectedDependencyOrder: DEPENDENCY_ORDER_ERROR_ID,
+ extraSpacingBetweenMembers: EXTRA_SPACING_ERROR_ID,
+ unexpectedGroupOrder: GROUP_ORDER_ERROR_ID,
+ unexpectedOrder: ORDER_ERROR_ID,
+ },
+ sortNodesExcludingEslintDisabled,
+ nodes: sortingNodes,
+ options,
+ context,
+ })
+ function sortNodesExcludingEslintDisabled(ignoreEslintDisabledNodes) {
+ let nodesSortedByGroups = sortingNodeGroups.flatMap(sortingNodeGroup =>
+ sortNodesByGroups({
+ comparatorByOptionsComputer: defaultComparatorByOptionsComputer,
+ optionsByGroupIndexComputer,
+ ignoreEslintDisabledNodes,
+ nodes: sortingNodeGroup,
+ groups: options.groups,
+ }),
+ )
+ return sortNodesByDependencies(nodesSortedByGroups, {
+ ignoreEslintDisabledNodes,
+ })
+ }
+}
+export { defaultOptions, sortVariableDeclaration }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-variable-declarations/types.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-variable-declarations/types.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..ef34323a7e5f522aa07d3a7f77956a790e62e9fd
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-variable-declarations/types.d.ts
@@ -0,0 +1,88 @@
+import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'
+import { TSESTree } from '@typescript-eslint/types'
+import { SortingNodeWithDependencies } from '../../utils/sort-nodes-by-dependencies.js'
+import { RegexOption, TypeOption } from '../../types/common-options.js'
+import { AllCommonOptions } from '../../types/all-common-options.js'
+export type MessageId =
+ | typeof DEPENDENCY_ORDER_ERROR_ID
+ | typeof MISSED_SPACING_ERROR_ID
+ | typeof EXTRA_SPACING_ERROR_ID
+ | typeof GROUP_ORDER_ERROR_ID
+ | typeof ORDER_ERROR_ID
+export declare const ORDER_ERROR_ID = 'unexpectedVariableDeclarationsOrder'
+export declare const GROUP_ORDER_ERROR_ID =
+ 'unexpectedVariableDeclarationsGroupOrder'
+export declare const EXTRA_SPACING_ERROR_ID =
+ 'extraSpacingBetweenVariableDeclarationsMembers'
+export declare const MISSED_SPACING_ERROR_ID =
+ 'missedSpacingBetweenVariableDeclarationsMembers'
+export declare const DEPENDENCY_ORDER_ERROR_ID =
+ 'unexpectedVariableDeclarationsDependencyOrder'
+/**
+ * Configuration options for the sort-variable-declarations rule.
+ *
+ * Controls how multiple variable declarations in a single statement are sorted,
+ * such as `const a = 1, b, c = 3;`.
+ */
+export type Options = Partial<
+ {
+ /**
+ * Conditional configuration based on pattern matching.
+ */
+ useConfigurationIf: {
+ /**
+ * Regular expression pattern to match against all variable declarator
+ * names. The rule is only applied when all names match this pattern.
+ */
+ allNamesMatchPattern?: RegexOption
+ /**
+ * AST selector to match against VariableDeclaration nodes.
+ */
+ matchesAstSelector?: string
+ }
+ /**
+ * Enables experimental dependency detection.
+ */
+ useExperimentalDependencyDetection: boolean
+ } & AllCommonOptions<
+ TypeOption,
+ AdditionalSortOptions,
+ CustomGroupMatchOptions
+ >
+>[]
+export type SortVariableDeclarationsSortingNode =
+ SortingNodeWithDependencies
+export type SortVariableDeclarationsNode =
+ TSESTree.VariableDeclaration['declarations'][number]
+/**
+ * Union type of all available selectors for variable declarations.
+ *
+ * Distinguishes between variables with and without initial values.
+ */
+export type Selector = (typeof allSelectors)[number]
+/**
+ * Match options for a custom group.
+ */
+interface CustomGroupMatchOptions {
+ /**
+ * The selector type this group matches. Can be 'initialized' for variables
+ * with values or 'uninitialized' for variables without.
+ */
+ selector?: Selector
+}
+type AdditionalSortOptions = object
+/**
+ * Array of all available selectors for variable declarations.
+ *
+ * Used for validation and configuration in the ESLint rule.
+ */
+export declare let allSelectors: readonly ['initialized', 'uninitialized']
+/**
+ * Additional custom group match options JSON schema. Used by ESLint to validate
+ * rule options at configuration time.
+ */
+export declare let additionalCustomGroupMatchOptionsJsonSchema: Record<
+ string,
+ JSONSchema4
+>
+export {}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-variable-declarations/types.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-variable-declarations/types.js
new file mode 100644
index 0000000000000000000000000000000000000000..f309b954d0206eedd6dc2f46d0f9976d22c2f756
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/rules/sort-variable-declarations/types.js
@@ -0,0 +1,28 @@
+import { buildCustomGroupSelectorJsonSchema } from '../../utils/json-schemas/common-groups-json-schemas.js'
+var ORDER_ERROR_ID = 'unexpectedVariableDeclarationsOrder'
+var GROUP_ORDER_ERROR_ID = 'unexpectedVariableDeclarationsGroupOrder'
+var EXTRA_SPACING_ERROR_ID = 'extraSpacingBetweenVariableDeclarationsMembers'
+var MISSED_SPACING_ERROR_ID = 'missedSpacingBetweenVariableDeclarationsMembers'
+var DEPENDENCY_ORDER_ERROR_ID = 'unexpectedVariableDeclarationsDependencyOrder'
+/**
+ * Array of all available selectors for variable declarations.
+ *
+ * Used for validation and configuration in the ESLint rule.
+ */
+var allSelectors = ['initialized', 'uninitialized']
+/**
+ * Additional custom group match options JSON schema. Used by ESLint to validate
+ * rule options at configuration time.
+ */
+var additionalCustomGroupMatchOptionsJsonSchema = {
+ selector: buildCustomGroupSelectorJsonSchema(allSelectors),
+}
+export {
+ DEPENDENCY_ORDER_ERROR_ID,
+ EXTRA_SPACING_ERROR_ID,
+ GROUP_ORDER_ERROR_ID,
+ MISSED_SPACING_ERROR_ID,
+ ORDER_ERROR_ID,
+ additionalCustomGroupMatchOptionsJsonSchema,
+ allSelectors,
+}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/types/all-common-options.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/types/all-common-options.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..625efb51c0ab60f509e0a4c39d10cd32d0a701e4
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/types/all-common-options.d.ts
@@ -0,0 +1,14 @@
+import { CommonPartitionOptions } from './common-partition-options.js'
+import { CommonGroupsOptions } from './common-groups-options.js'
+import { CommonOptions } from './common-options.js'
+export type AllCommonOptions<
+ CustomTypeOption extends string,
+ AdditionalSortOptions,
+ CustomGroupMatchOptions,
+> = CommonGroupsOptions<
+ CustomTypeOption,
+ AdditionalSortOptions,
+ CustomGroupMatchOptions
+> &
+ CommonOptions &
+ CommonPartitionOptions
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/types/common-groups-options.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/types/common-groups-options.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..c9bbedb605e25ec5d51d2ba942e2053f908ee9ad
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/types/common-groups-options.d.ts
@@ -0,0 +1,250 @@
+import { CommonOptions, RegexOption } from './common-options.js'
+export interface CommonGroupsOptions<
+ CustomTypeOption extends string,
+ AdditionalSortOptions,
+ AdditionalCustomGroupMatchOptions,
+> {
+ /**
+ * Specify the exact number of newlines required between elements of groups.
+ */
+ newlinesInside:
+ | NewlinesInsideOption
+ /**
+ * @deprecated The `newlinesBetween` value is deprecated and will be removed
+ * in V6.
+ */
+ | 'newlinesBetween'
+ /**
+ * Custom groups for organizing nodes.
+ */
+ customGroups: CustomGroupsOption<
+ CustomTypeOption,
+ AdditionalSortOptions,
+ AdditionalCustomGroupMatchOptions
+ >
+ /**
+ * Defines the order and grouping of nodes. Nodes are sorted within their
+ * groups and groups are ordered as specified.
+ */
+ groups: GroupsOptions
+ /**
+ * Specify the exact number of newlines required between groups.
+ */
+ newlinesBetween: NewlinesBetweenOption
+}
+/**
+ * Configuration for custom groups with sorting and newline options.
+ *
+ * Defines custom groups that can override global sorting settings and specify
+ * how elements should be organized. Each custom group can have its own sorting
+ * algorithm, order, and newline handling behavior.
+ *
+ * @example
+ *
+ * ```ts
+ * const customGroups: CustomGroupsOption = [
+ * {
+ * groupName: 'react',
+ * anyOf: ['react', 'react-*'],
+ * type: 'alphabetical',
+ * order: 'asc',
+ * newlinesInside: 1,
+ * },
+ * {
+ * groupName: 'lodash',
+ * anyOf: ['lodash', 'lodash/*'],
+ * fallbackSort: { type: 'natural' },
+ * },
+ * ]
+ * ```
+ *
+ * @template AdditionalMatchOptions - Options for matching elements to the
+ * custom group.
+ * @template AdditionalSortOptions - Additional sort options that extend the
+ * base configuration.
+ */
+export type CustomGroupsOption<
+ CustomTypeOption extends string,
+ AdditionalSortOptions,
+ AdditionalMatchOptions,
+> = ({
+ /**
+ * Specify the exact number of newlines required between elements of groups.
+ */
+ newlinesInside?: NewlinesInsideOption
+ /**
+ * Regular expression pattern to match the element's name. Elements matching
+ * this pattern will be included in this custom group.
+ */
+ elementNamePattern?: RegexOption
+ /**
+ * Name identifier for the custom group. Used to reference this group in the
+ * groups configuration array.
+ */
+ groupName: string
+} & Partial<
+ Pick<
+ CommonOptions,
+ 'fallbackSort' | 'order' | 'type'
+ >
+> &
+ (AnyOfCustomGroup | Partial) &
+ Partial)[]
+/**
+ * Configuration for groups with overriding settings.
+ *
+ * @example
+ *
+ * ```ts
+ * const groups = [
+ * 'imports',
+ * { group: 'group', commentAbove: '// Component Definitions' },
+ * 'components',
+ * ]
+ * ```
+ */
+export type GroupWithOverridesOption<
+ CustomTypeOption extends string,
+ AdditionalSortOptions,
+> = {
+ /**
+ * Specify the exact number of newlines required inside the group.
+ */
+ newlinesInside?: NewlinesInsideOption
+ /**
+ * Name of the group or array of group names for subgroups.
+ */
+ group: string[] | string
+ /**
+ * Text of the comment to insert above the group. The comment will be
+ * formatted as a line comment (// ...).
+ */
+ commentAbove?: string
+} & Partial<
+ Pick<
+ CommonOptions,
+ 'fallbackSort' | 'order' | 'type'
+ >
+> &
+ Partial
+/**
+ * Configuration for matching multiple patterns in custom groups.
+ *
+ * Allows a custom group to match elements based on any of several patterns,
+ * providing flexibility in how elements are categorized.
+ *
+ * @example
+ *
+ * ```ts
+ * const customGroup: AnyOfCustomGroup = {
+ * anyOf: ['react', 'react-*', '@react/*'],
+ * }
+ * ```
+ *
+ * @template MatchOptions - Options for matching elements to the custom group.
+ */
+export interface AnyOfCustomGroup {
+ /**
+ * Regular expression pattern to match the element's name. Elements matching
+ * this pattern will be included in this custom group.
+ */
+ elementNamePattern?: RegexOption
+ /**
+ * Array of patterns where matching any single pattern includes the element
+ * in the group. Provides OR logic for group membership.
+ */
+ anyOf: Partial[]
+}
+/**
+ * Configuration for managing newlines between sorted elements.
+ *
+ * Controls how blank lines are handled between elements, either preserving,
+ * enforcing, or removing them based on the configuration.
+ *
+ * @example
+ *
+ * ```ts
+ * // Always require one blank line between elements
+ * const newlines: NewlinesBetweenOption = 1
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * // Require exactly 2 blank lines
+ * const newlines: NewlinesBetweenOption = 2
+ * ```
+ */
+export type NewlinesBetweenOption =
+ /**
+ * Preserve existing newlines without modification. The plugin will not add or
+ * remove blank lines.
+ */
+ | 'ignore'
+ /**
+ * Require exactly this number of blank lines between elements. Enforces
+ * consistent spacing with the specified line count.
+ */
+ | number
+/**
+ * Configuration for organizing elements into groups with optional formatting.
+ *
+ * Supports flexible group definitions including simple group names, arrays of
+ * group names for subgroups, and special configuration objects for controlling
+ * newlines and comments between groups.
+ *
+ * @example
+ *
+ * ```ts
+ * const groups: GroupsOptions<'imports' | 'types' | 'components'> = [
+ * 'imports',
+ * { newlinesBetween: 1 },
+ * 'types',
+ * { group: 'components', commentAbove: '// Components' }, // Object-based group
+ * ['services', 'hooks'], // Subgroup
+ * { newlinesBetween: 2 },
+ * 'utils',
+ * ]
+ * ```
+ */
+export type GroupsOptions<
+ CustomTypeOption extends string = string,
+ AdditionalSortOptions = object,
+> = (
+ | GroupWithOverridesOption
+ | GroupNewlinesBetweenOption
+ | string[]
+ | string
+)[]
+/**
+ * Configuration for controlling newlines between groups.
+ *
+ * Placed between group names in the groups array to specify how many blank
+ * lines should separate adjacent groups in the sorted output.
+ *
+ * @example
+ *
+ * ```ts
+ * const groups = [
+ * 'imports',
+ * { newlinesBetween: 1 }, // One newline after imports
+ * 'types',
+ * ]
+ * ```
+ */
+export interface GroupNewlinesBetweenOption {
+ /**
+ * Specifies the newline requirement between adjacent groups. This option is
+ * placed between group names to control their spacing.
+ */
+ newlinesBetween: NewlinesBetweenOption
+}
+export type NewlinesInsideOption =
+ /**
+ * Preserve existing newlines without modification.
+ */
+ | 'ignore'
+ /**
+ * Require exactly this number of blank lines between elements of a group.
+ */
+ | number
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/types/common-options.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/types/common-options.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..8a26454daa637a5e8ad050fa4b30cde1bc80b7c8
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/types/common-options.d.ts
@@ -0,0 +1,285 @@
+/**
+ * Core sorting configuration options used across all Perfectionist rules.
+ *
+ * Provides a comprehensive set of options to control how elements are sorted,
+ * including the sorting algorithm, character handling, locale settings, and
+ * sort direction. These options form the foundation for all sorting operations
+ * in the plugin.
+ *
+ * @example
+ *
+ * ```ts
+ * const options: CommonOptions = {
+ * type: 'natural',
+ * order: 'asc',
+ * ignoreCase: true,
+ * alphabet: '',
+ * locales: 'en-US',
+ * specialCharacters: 'keep',
+ * fallbackSort: {
+ * type: 'alphabetical',
+ * order: 'asc',
+ * },
+ * }
+ * ```
+ */
+export type CommonOptions<
+ CustomTypeOption extends string = string,
+ AdditionalSortOptions = object,
+> = {
+ /**
+ * Secondary sorting method applied when primary comparison returns equal.
+ * Ensures stable and predictable sorting when elements have identical
+ * primary values.
+ */
+ fallbackSort: FallbackSortOption
+ /**
+ * Specifies how to handle special characters during sorting.
+ *
+ * - 'keep': Preserve special characters in their original positions
+ * - 'trim': Remove leading special characters before sorting
+ * - 'remove': Remove all special characters before sorting.
+ */
+ specialCharacters: SpecialCharactersOption
+ /**
+ * Locale(s) to use for locale-aware string comparison. Affects how
+ * characters are ordered according to language-specific rules. Can be a
+ * string locale code or array of locale codes for fallback behavior.
+ */
+ locales: NonNullable
+ /**
+ * Sorting algorithm to use for ordering elements. Each algorithm has
+ * different behavior for handling numbers and special characters.
+ */
+ type: CustomTypeOption
+ /**
+ * Determines whether to perform case-insensitive comparison. When true, 'a'
+ * and 'A' are treated as equivalent during sorting.
+ */
+ ignoreCase: boolean
+ /**
+ * Sort direction for ordering elements.
+ *
+ * - 'asc': Ascending order (A to Z, 0 to 9)
+ * - 'desc': Descending order (Z to A, 9 to 0).
+ */
+ order: OrderOption
+ /**
+ * Custom alphabet string for 'custom' sort type. Defines the exact
+ * character order to use when type is 'custom'. Characters not in the
+ * alphabet are sorted after those in the alphabet.
+ */
+ alphabet: string
+} & AdditionalSortOptions
+/**
+ * Sorting algorithm type that determines how elements are ordered.
+ *
+ * Each algorithm has specific characteristics for handling different types of
+ * content and use cases.
+ *
+ * @example
+ *
+ * ```ts
+ * // Natural sorting for version numbers
+ * const type: TypeOption = 'natural'
+ * // Sorts: ['v1.0', 'v2.0', 'v10.0'] (not ['v1.0', 'v10.0', 'v2.0'])
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * // Line length for visual hierarchy
+ * const type: TypeOption = 'line-length'
+ * // Shorter lines appear before longer lines
+ * ```
+ */
+export type TypeOption =
+ /**
+ * Sort by the subgroup order defined in `groups` arrays. Useful as a fallback
+ * when elements are equal under the primary comparison.
+ */
+ | 'subgroup-order'
+ /**
+ * Traditional alphabetical sorting using locale-aware comparison. Best for
+ * standard text sorting where consistency is important.
+ */
+ | 'alphabetical'
+ /**
+ * Sort by the character length of each line. Useful for creating visual
+ * hierarchies or grouping by complexity.
+ */
+ | 'line-length'
+ /**
+ * Preserves the original order without sorting. Used when you want to apply
+ * other features (like grouping) without reordering.
+ */
+ | 'unsorted'
+ /**
+ * Natural order sorting that handles numbers intelligently. Treats numeric
+ * portions as numbers rather than strings (e.g., 'item2' before 'item10').
+ */
+ | 'natural'
+ /**
+ * Uses a user-defined alphabet for determining sort order. Requires the
+ * 'alphabet' option to specify character precedence.
+ */
+ | 'custom'
+/**
+ * Regular expression pattern configuration for matching strings.
+ *
+ * Supports multiple formats for flexibility in pattern definition, from simple
+ * string patterns to complex regular expressions with flags.
+ *
+ * @example
+ *
+ * ```ts
+ * // Simple string pattern
+ * const pattern: RegexOption = '^TODO:'
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * // Pattern with flags
+ * const pattern: RegexOption = {
+ * pattern: '^(TODO|FIXME):',
+ * flags: 'i',
+ * }
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * // Multiple patterns (OR logic)
+ * const patterns: RegexOption = [
+ * '^TODO:',
+ * { pattern: '^FIXME:', flags: 'i' },
+ * ]
+ * ```
+ */
+export type RegexOption =
+ | SingleRegexOption[]
+ | SingleRegexOption
+/**
+ * Configuration for handling special characters during string comparison.
+ *
+ * Determines how non-alphanumeric characters are processed when sorting,
+ * allowing control over whether special characters affect sort order.
+ *
+ * @example
+ *
+ * ```ts
+ * // With 'remove': '_abc' and 'abc' are treated as identical
+ * const option: SpecialCharactersOption = 'remove'
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * // With 'trim': '_abc' becomes 'abc', but 'a_bc' stays 'a_bc'
+ * const option: SpecialCharactersOption = 'trim'
+ * ```
+ */
+type SpecialCharactersOption =
+ /**
+ * Remove all special characters before comparison. Only alphanumeric characters
+ * are considered for sorting.
+ */
+ | 'remove'
+ /**
+ * Remove leading special characters only. Useful for sorting names that may
+ * have underscore or other prefixes.
+ */
+ | 'trim'
+ /**
+ * Keep all special characters in their original positions. Special characters
+ * participate in the sort comparison.
+ */
+ | 'keep'
+/**
+ * Single regular expression pattern configuration.
+ *
+ * Can be either a simple string pattern or an object with pattern and flags for
+ * more complex matching requirements.
+ *
+ * @internal
+ */
+type SingleRegexOption =
+ | ({
+ /**
+ * The regular expression pattern string. Will be compiled into a RegExp for
+ * matching.
+ */
+ pattern: string
+ /**
+ * Optional RegExp flags to modify pattern matching behavior. Common flags:
+ * 'i' (case-insensitive), 'g' (global), 'm' (multiline).
+ */
+ flags?: string
+ } & AdditionalProperties)
+ | string
+/**
+ * Configuration for fallback sorting when primary comparison returns equal.
+ *
+ * Provides a secondary sorting method to ensure stable and predictable ordering
+ * when elements have identical values according to the primary sort algorithm.
+ * Commonly used to sort by declaration order or another algorithm as a
+ * tiebreaker.
+ *
+ * @example
+ *
+ * ```ts
+ * const fallback: FallbackSortOption = {
+ * type: 'alphabetical',
+ * order: 'asc',
+ * }
+ * ```
+ */
+type FallbackSortOption<
+ CustomTypeOption extends string,
+ AdditionalProperties,
+> = {
+ /**
+ * Sorting algorithm to use as the fallback method. Applied only when the
+ * primary sort comparison returns equal.
+ */
+ type: CustomTypeOption
+ /**
+ * Sort direction for the fallback comparison. If not specified, inherits
+ * from the primary sort order.
+ */
+ order?: OrderOption
+} & Partial
+/**
+ * Sort direction that determines the ordering of elements.
+ *
+ * Controls whether elements are arranged from smallest to largest (ascending)
+ * or largest to smallest (descending) according to the chosen sorting
+ * algorithm.
+ *
+ * @example
+ *
+ * ```ts
+ * // Ascending: A → Z, 0 → 9
+ * const order: OrderOption = 'asc'
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * // Descending: Z → A, 9 → 0
+ * const order: OrderOption = 'desc'
+ * ```
+ */
+type OrderOption =
+ /**
+ * Descending order - from largest to smallest. Letters: Z to A, Numbers: 9 to
+ * 0, Length: longest to shortest.
+ */
+ | 'desc'
+ /**
+ * Ascending order - from smallest to largest. Letters: A to Z, Numbers: 0 to 9,
+ * Length: shortest to longest.
+ */
+ | 'asc'
+export {}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/types/common-partition-options.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/types/common-partition-options.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..e4c2f004a1caaa4f6e89acb3b22078fb35ef9710
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/types/common-partition-options.d.ts
@@ -0,0 +1,67 @@
+import { RegexOption } from './common-options.js'
+/**
+ * Configuration for partition comments that create independent sorting
+ * sections.
+ *
+ * Partitions divide code into separate blocks that are sorted independently,
+ * preventing elements from being moved across partition boundaries. This
+ * preserves logical groupings and intentional code organization.
+ *
+ * @example
+ *
+ * ```ts
+ * // Boolean: Enable/disable partition comments
+ * const partitionOption: PartitionByCommentOption = true
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * // String pattern: Comments matching this pattern create partitions
+ * const partitionOption: PartitionByCommentOption = 'Section:'
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * // Array of patterns: Any matching pattern creates a partition
+ * const partitionOption: PartitionByCommentOption = ['Section:', 'Part:']
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * // Object: Different patterns for block and line comments
+ * const partitionOption: PartitionByCommentOption = {
+ * block: ['Section:', 'Chapter:'],
+ * line: 'Part:',
+ * }
+ * ```
+ */
+export type PartitionByCommentOption =
+ | {
+ /**
+ * Pattern(s) for block comments that create partitions. Block comments are
+ * multi-line comments.
+ */
+ block?: RegexOption | boolean
+ /**
+ * Pattern(s) for line comments that create partitions. Line comments are
+ * single-line comments (// ...).
+ */
+ line?: RegexOption | boolean
+ }
+ | RegexOption
+ | boolean
+export interface CommonPartitionOptions {
+ /**
+ * Partition nodes by comment delimiters. Nodes separated by specific
+ * comments are sorted independently.
+ */
+ partitionByComment: PartitionByCommentOption
+ /**
+ * Whether to partition nodes by newlines. When true, nodes separated by
+ * empty lines are sorted independently.
+ */
+ partitionByNewLine: boolean
+}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/types/node-of-type.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/types/node-of-type.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..5fcbbb3fd68f84cb3e3ff01e256141849f6dba70
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/types/node-of-type.d.ts
@@ -0,0 +1,7 @@
+import { TSESTree } from '@typescript-eslint/types'
+/**
+ * Helper type for a node with a specific AST node type.
+ */
+export type NodeOfType = {
+ type: Type
+} & TSESTree.Node
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/types/scoped-regex-option.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/types/scoped-regex-option.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..9bf1bbc91877efcb9589008f759a8831b12ace2d
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/types/scoped-regex-option.d.ts
@@ -0,0 +1,4 @@
+import { RegexOption } from './common-options.js'
+export type Scope = (typeof regexScopes)[number]
+export type ScopedRegexOption = RegexOption
+export declare let regexScopes: readonly ['shallow', 'deep']
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/types/scoped-regex-option.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/types/scoped-regex-option.js
new file mode 100644
index 0000000000000000000000000000000000000000..b8916759d3e89512da0ec0b6868425ea80d2c5f5
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/types/scoped-regex-option.js
@@ -0,0 +1,2 @@
+var regexScopes = ['shallow', 'deep']
+export { regexScopes }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/types/sorting-node.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/types/sorting-node.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..e49473f63fe06a9ac60cee19656d9f31aa9adc0f
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/types/sorting-node.d.ts
@@ -0,0 +1,106 @@
+import { TSESTree } from '@typescript-eslint/types'
+/**
+ * Core data structure representing a sortable element in the AST.
+ *
+ * This interface wraps AST nodes with metadata required for sorting operations.
+ * Every element that needs to be sorted (imports, properties, class members,
+ * etc.) is transformed into a SortingNode, providing a uniform interface for
+ * all sorting algorithms across the plugin.
+ *
+ * The SortingNode abstraction allows the sorting logic to be decoupled from the
+ * specific AST node types, making the sorting algorithms reusable across
+ * different rule implementations.
+ *
+ * @template Node - Type of the underlying AST node, defaults to any
+ * TSESTree.Node.
+ */
+export interface SortingNode {
+ /**
+ * Decorators associated with this node that are not directly accessible via
+ * the AST node's own `decorators` property.
+ *
+ * Used in contexts where decorators are tracked separately from their
+ * decorated node. When provided, these decorators override the node's own
+ * `decorators` in range calculations, ensuring they are included when the
+ * node is moved during sorting fixes.
+ */
+ implicitDecorators?: TSESTree.Decorator[]
+ /**
+ * Indicates whether a safety semicolon should be added when the node is
+ * moved inline.
+ *
+ * Used to prevent Automatic Semicolon Insertion (ASI) issues when
+ * reordering statements. For example, when moving a statement that starts
+ * with `[` or `(` after another statement without a semicolon, a safety
+ * semicolon is added to prevent the two statements from being incorrectly
+ * interpreted as one.
+ */
+ addSafetySemicolonWhenInline?: boolean
+ /**
+ * Whether ESLint rules are disabled for this node via comments.
+ *
+ * When true, the node maintains its original position during sorting to
+ * respect explicit disable directives like `eslint-disable-line` or
+ * `eslint-disable-next-line`. This ensures that intentionally unsorted
+ * elements remain in their specified positions.
+ */
+ isEslintDisabled: boolean
+ /**
+ * Identifier for the partition (independent sorting section) this node
+ * belongs to.
+ *
+ * Partitions divide code into separate blocks that are sorted
+ * independently. Nodes with different partition IDs are never moved across
+ * partition boundaries, preserving logical code organization. Common
+ * partition boundaries include:
+ *
+ * - Blank lines (when partitionByNewLine is enabled)
+ * - Special comments (when partitionByComment is configured)
+ * - Different code sections (e.g., imports vs code).
+ */
+ partitionId: number
+ /**
+ * The group identifier this node belongs to within the sorting
+ * configuration.
+ *
+ * Groups determine the high-level ordering of elements. Nodes are first
+ * organized by group (e.g., 'external' imports before 'internal' imports),
+ * then sorted within each group according to the sorting algorithm. The
+ * group can be a predefined group, custom group, or 'unknown' for
+ * uncategorized elements.
+ */
+ group: string
+ /**
+ * The string representation used for sorting comparisons.
+ *
+ * This is the primary value used when comparing nodes during sorting. The
+ * exact content depends on the node type and rule implementation:
+ *
+ * - For imports: the module specifier ('react', './utils', etc.)
+ * - For properties: the property key name
+ * - For class members: the member name
+ * - For union types: the type literal or identifier.
+ *
+ * The sorting algorithm uses this value for alphabetical, natural, or
+ * custom sorting comparisons.
+ */
+ name: string
+ /**
+ * The size metric used for line-length sorting.
+ *
+ * Typically represents the character count of the node's source code,
+ * excluding trailing punctuation like commas or semicolons. Used when the
+ * sort type is 'line-length' to order elements from shortest to longest (or
+ * vice versa based on order setting).
+ */
+ size: number
+ /**
+ * The underlying AST node from the TypeScript ESLint parser.
+ *
+ * Preserves the complete AST node information, allowing access to location
+ * data, parent references, and type-specific properties. This is used when
+ * generating fixes to know exactly what text to move and where it's located
+ * in the source code.
+ */
+ node: Node
+}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/alphabet.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/alphabet.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..a1a2e08ea2603f20267f838b1768fdf6ff6a8598
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/alphabet.d.ts
@@ -0,0 +1,219 @@
+/**
+ * Manages a customizable alphabet for sorting operations.
+ *
+ * Provides methods to generate, modify, and sort alphabets based on various
+ * criteria including Unicode ranges, case prioritization, and locale-specific
+ * ordering. Used by the 'custom' sort type to define character precedence.
+ *
+ * The class supports:
+ *
+ * - Generating alphabets from strings or Unicode ranges
+ * - Case prioritization and manipulation
+ * - Character positioning and removal
+ * - Multiple sorting strategies (natural, locale, char code).
+ *
+ * @example
+ *
+ * ```ts
+ * // Create a custom alphabet with specific character order
+ * const alphabet = Alphabet.generateFrom('aAbBcC')
+ * .prioritizeCase('uppercase')
+ * .getCharacters()
+ * // Returns: 'AaBbCc'
+ * ```
+ */
+export declare class Alphabet {
+ private characters
+ private constructor()
+ /**
+ * Generates an alphabet from the given characters.
+ *
+ * @param values - The characters to generate the alphabet from.
+ * @returns - The wrapped alphabet.
+ */
+ static generateFrom(values: string[] | string): Alphabet
+ /**
+ * Generates an alphabet containing relevant characters from the Unicode
+ * standard. Contains the Unicode planes 0 and 1.
+ *
+ * @returns - The generated alphabet.
+ */
+ static generateRecommendedAlphabet(): Alphabet
+ /**
+ * Generates an alphabet containing all characters from the Unicode standard
+ * except for irrelevant Unicode planes. Contains the Unicode planes 0, 1, 2
+ * and 3.
+ *
+ * @returns - The generated alphabet.
+ */
+ static generateCompleteAlphabet(): Alphabet
+ private static getCharactersWithCase
+ /**
+ * Generates an alphabet containing relevant characters from the Unicode
+ * standard.
+ *
+ * @param maxCodePoint - The maximum code point to generate the alphabet to.
+ * @returns - The generated alphabet.
+ */
+ private static generateAlphabetToRange
+ /**
+ * For each character with a lower and upper case, permutes the two cases so
+ * that the alphabet is ordered by the case priority entered.
+ *
+ * @example
+ *
+ * ```ts
+ * Alphabet.generateFrom('aAbBcdCD').prioritizeCase('uppercase') // Returns 'AaBbCDcd'.
+ * ```
+ *
+ * @param casePriority - The case to prioritize.
+ * @returns - The same alphabet instance with the cases prioritized.
+ */
+ prioritizeCase(casePriority: 'lowercase' | 'uppercase'): this
+ /**
+ * Adds specific characters to the end of the alphabet.
+ *
+ * @example
+ *
+ * ```ts
+ * Alphabet.generateFrom('ab').pushCharacters('cd')
+ * // Returns 'abcd'
+ * ```
+ *
+ * @param values - The characters to push to the alphabet.
+ * @returns - The same alphabet instance without the specified characters.
+ */
+ pushCharacters(values: string[] | string): this
+ /**
+ * Permutes characters with cases so that all characters with the entered
+ * case are put before the other characters.
+ *
+ * @param caseToComeFirst - The case to put before the other characters.
+ * @returns - The same alphabet instance with all characters with case
+ * before all the characters with the other case.
+ */
+ placeAllWithCaseBeforeAllWithOtherCase(
+ caseToComeFirst: 'uppercase' | 'lowercase',
+ ): this
+ /**
+ * Places a specific character right before another character in the
+ * alphabet.
+ *
+ * @example
+ *
+ * ```ts
+ * Alphabet.generateFrom('ab-cd/').placeCharacterBefore({
+ * characterBefore: '/',
+ * characterAfter: '-',
+ * })
+ * // Returns 'ab/-cd'
+ * ```
+ *
+ * @param params - The parameters for the operation.
+ * @param params.characterBefore - The character to come before
+ * characterAfter.
+ * @param params.characterAfter - The target character.
+ * @returns - The same alphabet instance with the specific character
+ * prioritized.
+ */
+ placeCharacterBefore({
+ characterBefore,
+ characterAfter,
+ }: {
+ characterBefore: string
+ characterAfter: string
+ }): this
+ /**
+ * Places a specific character right after another character in the
+ * alphabet.
+ *
+ * @example
+ *
+ * ```ts
+ * Alphabet.generateFrom('ab-cd/').placeCharacterAfter({
+ * characterBefore: '/',
+ * characterAfter: '-',
+ * })
+ * // Returns 'abcd/-'
+ * ```
+ *
+ * @param params - The parameters for the operation.
+ * @param params.characterBefore - The target character.
+ * @param params.characterAfter - The character to come after
+ * characterBefore.
+ * @returns - The same alphabet instance with the specific character
+ * prioritized.
+ */
+ placeCharacterAfter({
+ characterBefore,
+ characterAfter,
+ }: {
+ characterBefore: string
+ characterAfter: string
+ }): this
+ /**
+ * Removes specific characters from the alphabet by their range.
+ *
+ * @param range - The Unicode range to remove characters from.
+ * @param range.start - The starting Unicode codepoint.
+ * @param range.end - The ending Unicode codepoint.
+ * @returns - The same alphabet instance without the characters from the
+ * specified range.
+ */
+ removeUnicodeRange({ start, end }: { start: number; end: number }): this
+ /**
+ * Sorts the alphabet by the sorting function provided.
+ *
+ * @param sortingFunction - The sorting function to use.
+ * @returns - The same alphabet instance sorted by the sorting function
+ * provided.
+ */
+ sortBy(
+ sortingFunction: (characterA: string, characterB: string) => number,
+ ): this
+ /**
+ * Sorts the alphabet by the natural order of the characters using
+ * `natural-orderby`.
+ *
+ * @param locale - The locale to use for sorting.
+ * @returns - The same alphabet instance sorted by the natural order of the
+ * characters.
+ */
+ sortByNaturalSort(locale?: string): this
+ /**
+ * Removes specific characters from the alphabet.
+ *
+ * @example
+ *
+ * ```ts
+ * Alphabet.generateFrom('abcd').removeCharacters('dcc')
+ * // Returns 'ab'
+ * ```
+ *
+ * @param values - The characters to remove from the alphabet.
+ * @returns - The same alphabet instance without the specified characters.
+ */
+ removeCharacters(values: string[] | string): this
+ /**
+ * Sorts the alphabet by the character code point.
+ *
+ * @returns - The same alphabet instance sorted by the character code point.
+ */
+ sortByCharCodeAt(): this
+ /**
+ * Sorts the alphabet by the locale order of the characters.
+ *
+ * @param locales - The locales to use for sorting.
+ * @returns - The same alphabet instance sorted by the locale order of the
+ * characters.
+ */
+ sortByLocaleCompare(locales?: Intl.LocalesArgument): this
+ /**
+ * Retrieves the characters from the alphabet.
+ *
+ * @returns The characters from the alphabet.
+ */
+ getCharacters(): string
+ private placeCharacterBeforeOrAfter
+ private getCharactersWithCase
+}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/alphabet.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/alphabet.js
new file mode 100644
index 0000000000000000000000000000000000000000..7e4f265e4f4e804d2238f537ec07ad4ffc64b822
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/alphabet.js
@@ -0,0 +1,397 @@
+import { convertBooleanToSign } from './convert-boolean-to-sign.js'
+import { compare } from 'natural-orderby'
+/**
+ * Manages a customizable alphabet for sorting operations.
+ *
+ * Provides methods to generate, modify, and sort alphabets based on various
+ * criteria including Unicode ranges, case prioritization, and locale-specific
+ * ordering. Used by the 'custom' sort type to define character precedence.
+ *
+ * The class supports:
+ *
+ * - Generating alphabets from strings or Unicode ranges
+ * - Case prioritization and manipulation
+ * - Character positioning and removal
+ * - Multiple sorting strategies (natural, locale, char code).
+ *
+ * @example
+ *
+ * ```ts
+ * // Create a custom alphabet with specific character order
+ * const alphabet = Alphabet.generateFrom('aAbBcC')
+ * .prioritizeCase('uppercase')
+ * .getCharacters()
+ * // Returns: 'AaBbCc'
+ * ```
+ */
+var Alphabet = class Alphabet {
+ characters = []
+ constructor(characters) {
+ this.characters = characters
+ }
+ /**
+ * Generates an alphabet from the given characters.
+ *
+ * @param values - The characters to generate the alphabet from.
+ * @returns - The wrapped alphabet.
+ */
+ static generateFrom(values) {
+ let arrayValues = typeof values === 'string' ? [...values] : values
+ let uniqueValues = new Set(arrayValues)
+ if (arrayValues.length !== uniqueValues.size) {
+ throw new Error('The alphabet must not contain repeated characters')
+ }
+ if (arrayValues.some(value => value.length !== 1)) {
+ throw new Error('The alphabet must contain single characters')
+ }
+ return new Alphabet(
+ arrayValues.map(value =>
+ Alphabet.getCharactersWithCase(value.codePointAt(0)),
+ ),
+ )
+ }
+ /**
+ * Generates an alphabet containing relevant characters from the Unicode
+ * standard. Contains the Unicode planes 0 and 1.
+ *
+ * @returns - The generated alphabet.
+ */
+ static generateRecommendedAlphabet() {
+ return Alphabet.generateAlphabetToRange(131072)
+ }
+ /**
+ * Generates an alphabet containing all characters from the Unicode standard
+ * except for irrelevant Unicode planes. Contains the Unicode planes 0, 1, 2
+ * and 3.
+ *
+ * @returns - The generated alphabet.
+ */
+ static generateCompleteAlphabet() {
+ return Alphabet.generateAlphabetToRange(262144)
+ }
+ static getCharactersWithCase(codePoint) {
+ let character = String.fromCodePoint(codePoint)
+ let lowercaseCharacter = character.toLowerCase()
+ let uppercaseCharacter = character.toUpperCase()
+ return {
+ value: character,
+ codePoint,
+ ...(lowercaseCharacter !== character && {
+ lowercaseCharacterCodePoint: lowercaseCharacter.codePointAt(0),
+ }),
+ ...(uppercaseCharacter !== character && {
+ uppercaseCharacterCodePoint: uppercaseCharacter.codePointAt(0),
+ }),
+ }
+ }
+ /**
+ * Generates an alphabet containing relevant characters from the Unicode
+ * standard.
+ *
+ * @param maxCodePoint - The maximum code point to generate the alphabet to.
+ * @returns - The generated alphabet.
+ */
+ static generateAlphabetToRange(maxCodePoint) {
+ let totalCharacters = Array.from({ length: maxCodePoint }, (_, i) =>
+ Alphabet.getCharactersWithCase(i),
+ )
+ return new Alphabet(totalCharacters)
+ }
+ /**
+ * For each character with a lower and upper case, permutes the two cases so
+ * that the alphabet is ordered by the case priority entered.
+ *
+ * @example
+ *
+ * ```ts
+ * Alphabet.generateFrom('aAbBcdCD').prioritizeCase('uppercase') // Returns 'AaBbCDcd'.
+ * ```
+ *
+ * @param casePriority - The case to prioritize.
+ * @returns - The same alphabet instance with the cases prioritized.
+ */
+ prioritizeCase(casePriority) {
+ let charactersWithCase = this.getCharactersWithCase()
+ let parsedIndexes = /* @__PURE__ */ new Set()
+ let indexByCodePoints = this.characters.reduce(
+ (indexByCodePoint, character, index) => {
+ indexByCodePoint[character.codePoint] = index
+ return indexByCodePoint
+ },
+ {},
+ )
+ for (let { character, index } of charactersWithCase) {
+ if (parsedIndexes.has(index)) {
+ continue
+ }
+ parsedIndexes.add(index)
+ let otherCharacterIndex =
+ indexByCodePoints[
+ character.uppercaseCharacterCodePoint ??
+ character.lowercaseCharacterCodePoint
+ ]
+ if (otherCharacterIndex === void 0) {
+ continue
+ }
+ parsedIndexes.add(otherCharacterIndex)
+ if (!character.uppercaseCharacterCodePoint) {
+ if (
+ (casePriority === 'uppercase' && index < otherCharacterIndex) ||
+ (casePriority === 'lowercase' && index > otherCharacterIndex)
+ ) {
+ continue
+ }
+ } else if (
+ (casePriority === 'uppercase' && index > otherCharacterIndex) ||
+ (casePriority === 'lowercase' && index < otherCharacterIndex)
+ ) {
+ continue
+ }
+ this.characters[index] = this.characters[otherCharacterIndex]
+ this.characters[otherCharacterIndex] = character
+ }
+ return this
+ }
+ /**
+ * Adds specific characters to the end of the alphabet.
+ *
+ * @example
+ *
+ * ```ts
+ * Alphabet.generateFrom('ab').pushCharacters('cd')
+ * // Returns 'abcd'
+ * ```
+ *
+ * @param values - The characters to push to the alphabet.
+ * @returns - The same alphabet instance without the specified characters.
+ */
+ pushCharacters(values) {
+ let arrayValues = typeof values === 'string' ? [...values] : values
+ let valuesSet = new Set(arrayValues)
+ let valuesAlreadyExisting = this.characters.filter(({ value }) =>
+ valuesSet.has(value),
+ )
+ if (valuesAlreadyExisting.length > 0) {
+ throw new Error(
+ `The alphabet already contains the characters ${valuesAlreadyExisting
+ .slice(0, 5)
+ .map(({ value }) => value)
+ .join(', ')}`,
+ )
+ }
+ if (arrayValues.some(value => value.length !== 1)) {
+ throw new Error('Only single characters may be pushed')
+ }
+ this.characters.push(
+ ...[...valuesSet].map(value =>
+ Alphabet.getCharactersWithCase(value.codePointAt(0)),
+ ),
+ )
+ return this
+ }
+ /**
+ * Permutes characters with cases so that all characters with the entered case
+ * are put before the other characters.
+ *
+ * @param caseToComeFirst - The case to put before the other characters.
+ * @returns - The same alphabet instance with all characters with case before
+ * all the characters with the other case.
+ */
+ placeAllWithCaseBeforeAllWithOtherCase(caseToComeFirst) {
+ let otherCaseKey =
+ caseToComeFirst === 'uppercase' ?
+ 'uppercaseCharacterCodePoint'
+ : 'lowercaseCharacterCodePoint'
+ let keep = []
+ let move = []
+ for (let character of this.characters) {
+ ;(character[otherCaseKey] === void 0 ? keep : move).push(character)
+ }
+ this.characters = [...keep, ...move]
+ return this
+ }
+ /**
+ * Places a specific character right before another character in the alphabet.
+ *
+ * @example
+ *
+ * ```ts
+ * Alphabet.generateFrom('ab-cd/').placeCharacterBefore({
+ * characterBefore: '/',
+ * characterAfter: '-',
+ * })
+ * // Returns 'ab/-cd'
+ * ```
+ *
+ * @param params - The parameters for the operation.
+ * @param params.characterBefore - The character to come before
+ * characterAfter.
+ * @param params.characterAfter - The target character.
+ * @returns - The same alphabet instance with the specific character
+ * prioritized.
+ */
+ placeCharacterBefore({ characterBefore, characterAfter }) {
+ return this.placeCharacterBeforeOrAfter({
+ characterBefore,
+ characterAfter,
+ type: 'before',
+ })
+ }
+ /**
+ * Places a specific character right after another character in the alphabet.
+ *
+ * @example
+ *
+ * ```ts
+ * Alphabet.generateFrom('ab-cd/').placeCharacterAfter({
+ * characterBefore: '/',
+ * characterAfter: '-',
+ * })
+ * // Returns 'abcd/-'
+ * ```
+ *
+ * @param params - The parameters for the operation.
+ * @param params.characterBefore - The target character.
+ * @param params.characterAfter - The character to come after characterBefore.
+ * @returns - The same alphabet instance with the specific character
+ * prioritized.
+ */
+ placeCharacterAfter({ characterBefore, characterAfter }) {
+ return this.placeCharacterBeforeOrAfter({
+ characterBefore,
+ characterAfter,
+ type: 'after',
+ })
+ }
+ /**
+ * Removes specific characters from the alphabet by their range.
+ *
+ * @param range - The Unicode range to remove characters from.
+ * @param range.start - The starting Unicode codepoint.
+ * @param range.end - The ending Unicode codepoint.
+ * @returns - The same alphabet instance without the characters from the
+ * specified range.
+ */
+ removeUnicodeRange({ start, end }) {
+ this.characters = this.characters.filter(
+ ({ codePoint }) => codePoint < start || codePoint > end,
+ )
+ return this
+ }
+ /**
+ * Sorts the alphabet by the sorting function provided.
+ *
+ * @param sortingFunction - The sorting function to use.
+ * @returns - The same alphabet instance sorted by the sorting function
+ * provided.
+ */
+ sortBy(sortingFunction) {
+ this.characters.sort((a, b) => sortingFunction(a.value, b.value))
+ return this
+ }
+ /**
+ * Sorts the alphabet by the natural order of the characters using
+ * `natural-orderby`.
+ *
+ * @param locale - The locale to use for sorting.
+ * @returns - The same alphabet instance sorted by the natural order of the
+ * characters.
+ */
+ sortByNaturalSort(locale) {
+ let naturalCompare = compare({ locale })
+ return this.sortBy((a, b) => naturalCompare(a, b))
+ }
+ /**
+ * Removes specific characters from the alphabet.
+ *
+ * @example
+ *
+ * ```ts
+ * Alphabet.generateFrom('abcd').removeCharacters('dcc')
+ * // Returns 'ab'
+ * ```
+ *
+ * @param values - The characters to remove from the alphabet.
+ * @returns - The same alphabet instance without the specified characters.
+ */
+ removeCharacters(values) {
+ this.characters = this.characters.filter(
+ ({ value }) => !values.includes(value),
+ )
+ return this
+ }
+ /**
+ * Sorts the alphabet by the character code point.
+ *
+ * @returns - The same alphabet instance sorted by the character code point.
+ */
+ sortByCharCodeAt() {
+ return this.sortBy((a, b) =>
+ convertBooleanToSign(a.charCodeAt(0) > b.charCodeAt(0)),
+ )
+ }
+ /**
+ * Sorts the alphabet by the locale order of the characters.
+ *
+ * @param locales - The locales to use for sorting.
+ * @returns - The same alphabet instance sorted by the locale order of the
+ * characters.
+ */
+ sortByLocaleCompare(locales) {
+ return this.sortBy((a, b) => a.localeCompare(b, locales))
+ }
+ /**
+ * Retrieves the characters from the alphabet.
+ *
+ * @returns The characters from the alphabet.
+ */
+ getCharacters() {
+ return this.characters.map(({ value }) => value).join('')
+ }
+ placeCharacterBeforeOrAfter({ characterBefore, characterAfter, type }) {
+ let indexOfCharacterAfter = this.characters.findIndex(
+ ({ value }) => value === characterAfter,
+ )
+ if (indexOfCharacterAfter === -1) {
+ throw new Error(`Character ${characterAfter} not found in alphabet`)
+ }
+ let indexOfCharacterBefore = this.characters.findIndex(
+ ({ value }) => value === characterBefore,
+ )
+ if (indexOfCharacterBefore === -1) {
+ throw new Error(`Character ${characterBefore} not found in alphabet`)
+ }
+ if (indexOfCharacterBefore <= indexOfCharacterAfter) {
+ return this
+ }
+ this.characters.splice(
+ type === 'before' ? indexOfCharacterAfter : indexOfCharacterBefore + 1,
+ 0,
+ this.characters[
+ type === 'before' ? indexOfCharacterBefore : indexOfCharacterAfter
+ ],
+ )
+ this.characters.splice(
+ type === 'before' ? indexOfCharacterBefore + 1 : indexOfCharacterAfter,
+ 1,
+ )
+ return this
+ }
+ getCharactersWithCase() {
+ return this.characters
+ .map((character, index) => {
+ if (
+ !character.uppercaseCharacterCodePoint &&
+ !character.lowercaseCharacterCodePoint
+ ) {
+ return null
+ }
+ return {
+ character,
+ index,
+ }
+ })
+ .filter(element => element !== null)
+ }
+}
+export { Alphabet }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/assert-is-never.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/assert-is-never.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..3e6cfcfd669d4ed5e58113e67d790b6bafbedd23
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/assert-is-never.d.ts
@@ -0,0 +1,7 @@
+/**
+ * Assert that the given member is of type `never`. This is useful for
+ * exhaustive checks in switch statements or conditional logic.
+ *
+ * @param _member - The member to check, which should be of type `never`.
+ */
+export declare function assertIsNever(_member: never): void
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/assert-is-never.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/assert-is-never.js
new file mode 100644
index 0000000000000000000000000000000000000000..6d93ac98483df3ed10aa314c3e5e1f7ef2441a14
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/assert-is-never.js
@@ -0,0 +1,8 @@
+/**
+ * Assert that the given member is of type `never`. This is useful for
+ * exhaustive checks in switch statements or conditional logic.
+ *
+ * @param _member - The member to check, which should be of type `never`.
+ */
+function assertIsNever(_member) {}
+export { assertIsNever }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/build-ast-listeners.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/build-ast-listeners.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..6705e7d20eb3aed646cdcb409a35e5ca86557673
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/build-ast-listeners.d.ts
@@ -0,0 +1,46 @@
+import { RuleContext } from '@typescript-eslint/utils/ts-eslint'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+import { NodeOfType } from '../types/node-of-type.js'
+type Sorter<
+ MessageId extends string,
+ Options extends BaseOptions[],
+ NodeTypes extends AST_NODE_TYPES,
+> = (parameters: {
+ context: Readonly>
+ matchedAstSelectors: ReadonlySet
+ node: NodeOfType
+}) => void
+type AstListeners = Record<
+ string,
+ (node: NodeOfType) => void
+>
+interface BaseOptions {
+ useConfigurationIf?: {
+ matchesAstSelector?: string
+ }
+}
+/**
+ * Builds the AST listeners for the rule based on the provided node types,
+ * context, and sorter function.
+ *
+ * @param params - The parameters object.
+ * @param params.nodeTypes - The AST node types to listen for.
+ * @param params.context - The rule context.
+ * @param params.sorter - The function that sorts the nodes based on the
+ * provided parameters.
+ * @returns An object containing the AST listeners for the specified node types.
+ */
+export declare function buildAstListeners<
+ MessageId extends string,
+ Options extends BaseOptions[],
+ NodeTypes extends AST_NODE_TYPES,
+>({
+ nodeTypes,
+ context,
+ sorter,
+}: {
+ sorter: Sorter>
+ context: Readonly>
+ nodeTypes: NodeTypes[]
+}): AstListeners
+export {}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/build-ast-listeners.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/build-ast-listeners.js
new file mode 100644
index 0000000000000000000000000000000000000000..fb5f8d06f5efd6a33819eaf00264a6663e6288dc
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/build-ast-listeners.js
@@ -0,0 +1,67 @@
+/**
+ * Builds the AST listeners for the rule based on the provided node types,
+ * context, and sorter function.
+ *
+ * @param params - The parameters object.
+ * @param params.nodeTypes - The AST node types to listen for.
+ * @param params.context - The rule context.
+ * @param params.sorter - The function that sorts the nodes based on the
+ * provided parameters.
+ * @returns An object containing the AST listeners for the specified node types.
+ */
+function buildAstListeners({ nodeTypes, context, sorter }) {
+ let emptyMatchedAstSelectors = /* @__PURE__ */ new Set()
+ let matchedAstSelectorsByNode = /* @__PURE__ */ new WeakMap()
+ let allAstSelectorMatchers = [
+ ...new Set(
+ context.options
+ .map(option => option.useConfigurationIf?.matchesAstSelector)
+ .filter(matchesAstSelector => matchesAstSelector !== void 0),
+ ),
+ ].map(astSelector => [
+ astSelector,
+ buildMatchedAstSelectorsCollector({
+ matchedAstSelectorsByNode,
+ astSelector,
+ nodeTypes,
+ }),
+ ])
+ return {
+ ...Object.fromEntries(allAstSelectorMatchers),
+ ...Object.fromEntries(nodeTypes.map(buildNodeTypeExitListener)),
+ }
+ function buildNodeTypeExitListener(nodeType) {
+ return [
+ `${nodeType}:exit`,
+ node =>
+ sorter({
+ matchedAstSelectors:
+ matchedAstSelectorsByNode.get(node) ?? emptyMatchedAstSelectors,
+ context,
+ node,
+ }),
+ ]
+ }
+}
+function buildMatchedAstSelectorsCollector({
+ matchedAstSelectorsByNode,
+ astSelector,
+ nodeTypes,
+}) {
+ return collectMatchedAstSelectors
+ function collectMatchedAstSelectors(node) {
+ if (!isNodeOfType(node)) {
+ return
+ }
+ let matchedAstSelectors = matchedAstSelectorsByNode.get(node)
+ if (!matchedAstSelectors) {
+ matchedAstSelectors = /* @__PURE__ */ new Set()
+ matchedAstSelectorsByNode.set(node, matchedAstSelectors)
+ }
+ matchedAstSelectors.add(astSelector)
+ }
+ function isNodeOfType(node) {
+ return nodeTypes.includes(node.type)
+ }
+}
+export { buildAstListeners }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/build-options-by-group-index-computer.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/build-options-by-group-index-computer.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..922a004e1825454b48454a6ddb627a0d090ee13b
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/build-options-by-group-index-computer.d.ts
@@ -0,0 +1,31 @@
+import { OptionsByGroupIndexComputer } from './sort-nodes-by-groups.js'
+import { CommonGroupsOptions } from '../types/common-groups-options.js'
+import { CommonOptions } from '../types/common-options.js'
+type Options = Pick<
+ CommonGroupsOptions,
+ 'customGroups' | 'groups'
+> &
+ CommonOptions
+/**
+ * Creates a function that retrieves overridden options for a specific group
+ * index.
+ *
+ * Returns a closure that captures the options and provides a convenient way to
+ * get overridden options for any group index. This is used in sorting
+ * algorithms that need to apply different sorting rules to different groups.
+ *
+ * @example
+ *
+ * ```ts
+ * const getOverriddenOptions = buildOptionsByGroupIndexComputer(options)
+ * const group1Options = getOverriddenOptions(0)
+ * const group2Options = getOverriddenOptions(1)
+ * ```
+ *
+ * @param options - Base sorting options with group configuration.
+ * @returns Function that takes a group index and returns overridden options.
+ */
+export declare function buildOptionsByGroupIndexComputer(
+ options: T,
+): OptionsByGroupIndexComputer
+export {}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/build-options-by-group-index-computer.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/build-options-by-group-index-computer.js
new file mode 100644
index 0000000000000000000000000000000000000000..41803fe8d54b6d9b2be7d7b7ffaa01ec8c0b1d02
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/build-options-by-group-index-computer.js
@@ -0,0 +1,24 @@
+import { computeOverriddenOptionsByGroupIndex } from './compute-overridden-options-by-group-index.js'
+/**
+ * Creates a function that retrieves overridden options for a specific group
+ * index.
+ *
+ * Returns a closure that captures the options and provides a convenient way to
+ * get overridden options for any group index. This is used in sorting
+ * algorithms that need to apply different sorting rules to different groups.
+ *
+ * @example
+ *
+ * ```ts
+ * const getOverriddenOptions = buildOptionsByGroupIndexComputer(options)
+ * const group1Options = getOverriddenOptions(0)
+ * const group2Options = getOverriddenOptions(1)
+ * ```
+ *
+ * @param options - Base sorting options with group configuration.
+ * @returns Function that takes a group index and returns overridden options.
+ */
+function buildOptionsByGroupIndexComputer(options) {
+ return groupIndex => computeOverriddenOptionsByGroupIndex(options, groupIndex)
+}
+export { buildOptionsByGroupIndexComputer }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/build-sorting-node-by-node-map.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/build-sorting-node-by-node-map.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..e3c655cf036f869963c6725b4f0245291a2c3e2e
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/build-sorting-node-by-node-map.d.ts
@@ -0,0 +1,10 @@
+import { SortingNode } from '../types/sorting-node.js'
+/**
+ * Builds a map from nodes to their corresponding sorting nodes.
+ *
+ * @param sortingNodes - An array of sorting nodes.
+ * @returns A map where each key is a node and the value is its sorting node.
+ */
+export declare function buildSortingNodeByNodeMap<
+ T extends Pick,
+>(sortingNodes: T[]): Map
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/build-sorting-node-by-node-map.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/build-sorting-node-by-node-map.js
new file mode 100644
index 0000000000000000000000000000000000000000..ad8f1b3cffe2549fab558bcc5aabd5af67a90b66
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/build-sorting-node-by-node-map.js
@@ -0,0 +1,14 @@
+/**
+ * Builds a map from nodes to their corresponding sorting nodes.
+ *
+ * @param sortingNodes - An array of sorting nodes.
+ * @returns A map where each key is a node and the value is its sorting node.
+ */
+function buildSortingNodeByNodeMap(sortingNodes) {
+ let sortingNodeByNode = /* @__PURE__ */ new Map()
+ for (let sortingNode of sortingNodes) {
+ sortingNodeByNode.set(sortingNode.node, sortingNode)
+ }
+ return sortingNodeByNode
+}
+export { buildSortingNodeByNodeMap }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/build-line-length-comparator.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/build-line-length-comparator.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..4c4dbb1f46b7a039f4fa0ad3ae5786ed34453694
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/build-line-length-comparator.d.ts
@@ -0,0 +1,13 @@
+import { Comparator } from './default-comparator-by-options-computer.js'
+import { CommonOptions } from '../../types/common-options.js'
+import { SortingNode } from '../../types/sorting-node.js'
+/**
+ * Creates a comparator function that sorts nodes by their line length.
+ *
+ * @param options - Options containing the sort order.
+ * @param options.order - The order direction ('asc' or 'desc').
+ * @returns A comparator function that compares two sorting nodes by their size.
+ */
+export declare function buildLineLengthComparator({
+ order,
+}: Pick): Comparator
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/build-line-length-comparator.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/build-line-length-comparator.js
new file mode 100644
index 0000000000000000000000000000000000000000..2dfb9d713763096d661b585c0411681d82914f82
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/build-line-length-comparator.js
@@ -0,0 +1,15 @@
+import { computeOrderedValue } from './compute-ordered-value.js'
+/**
+ * Creates a comparator function that sorts nodes by their line length.
+ *
+ * @param options - Options containing the sort order.
+ * @param options.order - The order direction ('asc' or 'desc').
+ * @returns A comparator function that compares two sorting nodes by their size.
+ */
+function buildLineLengthComparator({ order }) {
+ return (a, b) => {
+ let result = a.size - b.size
+ return computeOrderedValue(result, order)
+ }
+}
+export { buildLineLengthComparator }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/build-string-formatter.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/build-string-formatter.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..2bbdee990fd2207a30ae5749d06682f74d8c4d18
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/build-string-formatter.d.ts
@@ -0,0 +1,28 @@
+import { CommonOptions } from '../../types/common-options.js'
+/**
+ * Creates a function that formats strings for comparison.
+ *
+ * Applies transformations based on the provided options:
+ *
+ * - Case normalization (lowercase if ignoreCase is true)
+ * - Special character handling (keep, trim, or remove)
+ * - Whitespace removal (always applied).
+ *
+ * @param params - Parameters for string formatting.
+ * @param params.ignoreCase - Whether to convert strings to lowercase.
+ * @param params.specialCharacters - How to handle special characters:
+ *
+ * - 'keep': Keep all characters as-is
+ * - 'trim': Remove leading special characters
+ * - 'remove': Remove all special characters.
+ *
+ * @returns Function that formats a string for comparison.
+ * @throws {UnreachableCaseError} If an unknown special characters option is
+ * specified.
+ */
+export declare function buildStringFormatter({
+ specialCharacters,
+ ignoreCase,
+}: Pick): (
+ value: string,
+) => string
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/build-string-formatter.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/build-string-formatter.js
new file mode 100644
index 0000000000000000000000000000000000000000..58b067dcc57a164e55b2cf1c826736829db0d950
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/build-string-formatter.js
@@ -0,0 +1,51 @@
+import { UnreachableCaseError } from '../unreachable-case-error.js'
+/**
+ * Creates a function that formats strings for comparison.
+ *
+ * Applies transformations based on the provided options:
+ *
+ * - Case normalization (lowercase if ignoreCase is true)
+ * - Special character handling (keep, trim, or remove)
+ * - Whitespace removal (always applied).
+ *
+ * @param params - Parameters for string formatting.
+ * @param params.ignoreCase - Whether to convert strings to lowercase.
+ * @param params.specialCharacters - How to handle special characters:
+ *
+ * - 'keep': Keep all characters as-is
+ * - 'trim': Remove leading special characters
+ * - 'remove': Remove all special characters.
+ *
+ * @returns Function that formats a string for comparison.
+ * @throws {UnreachableCaseError} If an unknown special characters option is
+ * specified.
+ */
+function buildStringFormatter({ specialCharacters, ignoreCase }) {
+ return value => {
+ let valueToCompare = value
+ if (ignoreCase) {
+ valueToCompare = valueToCompare.toLowerCase()
+ }
+ switch (specialCharacters) {
+ case 'remove':
+ valueToCompare = valueToCompare.replaceAll(
+ /[^a-z\u{C0}-\u{24F}\u{1E00}-\u{1EFF}]+/giu,
+ '',
+ )
+ break
+ case 'trim':
+ valueToCompare = valueToCompare.replaceAll(
+ /^[^a-z\u{C0}-\u{24F}\u{1E00}-\u{1EFF}]+/giu,
+ '',
+ )
+ break
+ case 'keep':
+ break
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(specialCharacters)
+ }
+ return valueToCompare.replaceAll(/\s/gu, '')
+ }
+}
+export { buildStringFormatter }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/build-subgroup-order-comparator.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/build-subgroup-order-comparator.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..c95649bab640b6ab156a53eb50b7ffe5787304e3
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/build-subgroup-order-comparator.d.ts
@@ -0,0 +1,10 @@
+import { Comparator } from './default-comparator-by-options-computer.js'
+import { AllCommonOptions } from '../../types/all-common-options.js'
+import { SortingNode } from '../../types/sorting-node.js'
+export declare function buildSubgroupOrderComparator({
+ groups,
+ order,
+}: Pick<
+ AllCommonOptions,
+ 'groups' | 'order'
+>): Comparator
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/build-subgroup-order-comparator.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/build-subgroup-order-comparator.js
new file mode 100644
index 0000000000000000000000000000000000000000..6388820e060f3fe3765635c98004fa904cc3bf6a
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/build-subgroup-order-comparator.js
@@ -0,0 +1,51 @@
+import { isGroupWithOverridesOption } from '../is-group-with-overrides-option.js'
+import { isNewlinesBetweenOption } from '../is-newlines-between-option.js'
+import { UnreachableCaseError } from '../unreachable-case-error.js'
+import { computeOrderedValue } from './compute-ordered-value.js'
+function buildSubgroupOrderComparator({ groups, order }) {
+ return (a, b) => {
+ let subgroupContainingA = computeSubgroupContainingNode(a, groups)
+ let subgroupContainingB = computeSubgroupContainingNode(b, groups)
+ if (
+ !subgroupContainingA ||
+ !subgroupContainingB ||
+ subgroupContainingA !== subgroupContainingB
+ ) {
+ return 0
+ }
+ let result =
+ subgroupContainingA.indexOf(a.group) -
+ subgroupContainingB.indexOf(b.group)
+ return computeOrderedValue(result, order)
+ }
+}
+function computeSubgroupContainingNode(sortingNode, groups) {
+ for (let group of groups) {
+ if (isNewlinesBetweenOption(group)) {
+ continue
+ }
+ if (typeof group === 'string' || Array.isArray(group)) {
+ if (doesStringSubgroupContainsNode(sortingNode, group)) {
+ return group
+ }
+ continue
+ }
+ /* v8 ignore else -- @preserve Exhaustive guard for unsupported group option. */
+ if (isGroupWithOverridesOption(group)) {
+ if (doesStringSubgroupContainsNode(sortingNode, group.group)) {
+ return group.group
+ }
+ continue
+ }
+ /* v8 ignore next -- @preserve Exhaustive guard for unsupported group option. */
+ throw new UnreachableCaseError(group)
+ }
+ return null
+}
+function doesStringSubgroupContainsNode(sortingNode, subgroup) {
+ if (typeof subgroup === 'string') {
+ return false
+ }
+ return subgroup.includes(sortingNode.group)
+}
+export { buildSubgroupOrderComparator }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/compare-alphabetically.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/compare-alphabetically.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..59f2081e8c1aba9511d9ada3ce674edbc9ea049a
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/compare-alphabetically.d.ts
@@ -0,0 +1,29 @@
+import { CommonOptions } from '../../types/common-options.js'
+/**
+ * Compares two strings alphabetically using locale-aware comparison.
+ *
+ * Applies string formatting based on options (case sensitivity, special
+ * characters handling) before performing the comparison.
+ *
+ * @param a - The first string to compare.
+ * @param b - The second string to compare.
+ * @param options - Comparison options.
+ * @param options.specialCharacters - How to handle special characters.
+ * @param options.ignoreCase - Whether to ignore case differences.
+ * @param options.locales - The locale(s) to use for comparison.
+ * @param options.order - The order direction ('asc' or 'desc').
+ * @returns A negative number if a < b, positive if a > b, or 0 if equal.
+ */
+export declare function compareAlphabetically(
+ a: string,
+ b: string,
+ {
+ specialCharacters,
+ ignoreCase,
+ locales,
+ order,
+ }: Pick<
+ CommonOptions,
+ 'specialCharacters' | 'ignoreCase' | 'locales' | 'order'
+ >,
+): number
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/compare-alphabetically.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/compare-alphabetically.js
new file mode 100644
index 0000000000000000000000000000000000000000..c59a6d0247ad5a6a4e4f19845cd08a298d119b38
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/compare-alphabetically.js
@@ -0,0 +1,30 @@
+import { computeOrderedValue } from './compute-ordered-value.js'
+import { buildStringFormatter } from './build-string-formatter.js'
+/**
+ * Compares two strings alphabetically using locale-aware comparison.
+ *
+ * Applies string formatting based on options (case sensitivity, special
+ * characters handling) before performing the comparison.
+ *
+ * @param a - The first string to compare.
+ * @param b - The second string to compare.
+ * @param options - Comparison options.
+ * @param options.specialCharacters - How to handle special characters.
+ * @param options.ignoreCase - Whether to ignore case differences.
+ * @param options.locales - The locale(s) to use for comparison.
+ * @param options.order - The order direction ('asc' or 'desc').
+ * @returns A negative number if a < b, positive if a > b, or 0 if equal.
+ */
+function compareAlphabetically(
+ a,
+ b,
+ { specialCharacters, ignoreCase, locales, order },
+) {
+ let formatString = buildStringFormatter({
+ specialCharacters,
+ ignoreCase,
+ })
+ let result = formatString(a).localeCompare(formatString(b), locales)
+ return computeOrderedValue(result, order)
+}
+export { compareAlphabetically }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/compare-by-custom-sort.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/compare-by-custom-sort.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..1e7c74d44cf6e78010cc42d2a180d65c89f6baf3
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/compare-by-custom-sort.d.ts
@@ -0,0 +1,14 @@
+import { CommonOptions } from '../../types/common-options.js'
+export declare function compareByCustomSort(
+ a: string,
+ b: string,
+ {
+ specialCharacters,
+ ignoreCase,
+ alphabet,
+ order,
+ }: Pick<
+ CommonOptions,
+ 'specialCharacters' | 'ignoreCase' | 'alphabet' | 'order'
+ >,
+): number
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/compare-by-custom-sort.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/compare-by-custom-sort.js
new file mode 100644
index 0000000000000000000000000000000000000000..2e5340f241666935afe0a84b2d155ba1ac4bdd58
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/compare-by-custom-sort.js
@@ -0,0 +1,51 @@
+import { computeOrderedValue } from './compute-ordered-value.js'
+import { buildStringFormatter } from './build-string-formatter.js'
+import { convertBooleanToSign } from '../convert-boolean-to-sign.js'
+/**
+ * Cache for pre-computed character index maps to avoid recalculating for the
+ * same custom alphabets across multiple comparisons.
+ */
+var alphabetCache = /* @__PURE__ */ new Map()
+function compareByCustomSort(
+ a,
+ b,
+ { specialCharacters, ignoreCase, alphabet, order },
+) {
+ let formatString = buildStringFormatter({
+ specialCharacters,
+ ignoreCase,
+ })
+ let indexByCharacters = alphabetCache.get(alphabet)
+ if (!indexByCharacters) {
+ indexByCharacters = /* @__PURE__ */ new Map()
+ for (let [index, character] of [...alphabet].entries()) {
+ indexByCharacters.set(character, index)
+ }
+ alphabetCache.set(alphabet, indexByCharacters)
+ }
+ let aValue = formatString(a)
+ let bValue = formatString(b)
+ let minLength = Math.min(aValue.length, bValue.length)
+ for (let i = 0; i < minLength; i++) {
+ let aCharacter = aValue[i]
+ let bCharacter = bValue[i]
+ let indexOfA = indexByCharacters.get(aCharacter)
+ let indexOfB = indexByCharacters.get(bCharacter)
+ indexOfA ??= Infinity
+ indexOfB ??= Infinity
+ if (indexOfA !== indexOfB) {
+ return computeOrderedValue(
+ convertBooleanToSign(indexOfA > indexOfB),
+ order,
+ )
+ }
+ }
+ if (aValue.length === bValue.length) {
+ return 0
+ }
+ return computeOrderedValue(
+ convertBooleanToSign(aValue.length > bValue.length),
+ order,
+ )
+}
+export { compareByCustomSort }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/compare-naturally.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/compare-naturally.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..de8a17cd7028e1ab29e068868a008c308d917202
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/compare-naturally.d.ts
@@ -0,0 +1,30 @@
+import { CommonOptions } from '../../types/common-options.js'
+/**
+ * Compares two strings using natural sort order.
+ *
+ * Natural sorting handles embedded numbers intelligently, so "item2" comes
+ * before "item10". Applies string formatting based on options before performing
+ * the comparison.
+ *
+ * @param a - The first string to compare.
+ * @param b - The second string to compare.
+ * @param options - Comparison options.
+ * @param options.specialCharacters - How to handle special characters.
+ * @param options.ignoreCase - Whether to ignore case differences.
+ * @param options.locales - The locale(s) to use for comparison.
+ * @param options.order - The order direction ('asc' or 'desc').
+ * @returns A negative number if a < b, positive if a > b, or 0 if equal.
+ */
+export declare function compareNaturally(
+ a: string,
+ b: string,
+ {
+ specialCharacters,
+ ignoreCase,
+ locales,
+ order,
+ }: Pick<
+ CommonOptions,
+ 'specialCharacters' | 'ignoreCase' | 'locales' | 'order'
+ >,
+): number
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/compare-naturally.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/compare-naturally.js
new file mode 100644
index 0000000000000000000000000000000000000000..e0d266fae9e4d2877b913851661d0f7f49253942
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/compare-naturally.js
@@ -0,0 +1,33 @@
+import { computeOrderedValue } from './compute-ordered-value.js'
+import { buildStringFormatter } from './build-string-formatter.js'
+import { compare } from 'natural-orderby'
+/**
+ * Compares two strings using natural sort order.
+ *
+ * Natural sorting handles embedded numbers intelligently, so "item2" comes
+ * before "item10". Applies string formatting based on options before performing
+ * the comparison.
+ *
+ * @param a - The first string to compare.
+ * @param b - The second string to compare.
+ * @param options - Comparison options.
+ * @param options.specialCharacters - How to handle special characters.
+ * @param options.ignoreCase - Whether to ignore case differences.
+ * @param options.locales - The locale(s) to use for comparison.
+ * @param options.order - The order direction ('asc' or 'desc').
+ * @returns A negative number if a < b, positive if a > b, or 0 if equal.
+ */
+function compareNaturally(
+ a,
+ b,
+ { specialCharacters, ignoreCase, locales, order },
+) {
+ let naturalCompare = compare({ locale: locales.toString() })
+ let formatString = buildStringFormatter({
+ specialCharacters,
+ ignoreCase,
+ })
+ let result = naturalCompare(formatString(a), formatString(b))
+ return computeOrderedValue(result, order)
+}
+export { compareNaturally }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/compute-comparators.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/compute-comparators.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..58d94ad4bf149966601488ddb934dbf77dd063a0
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/compute-comparators.d.ts
@@ -0,0 +1,25 @@
+import {
+ ComparatorByOptionsComputer,
+ Comparator,
+} from './default-comparator-by-options-computer.js'
+import { CommonOptions } from '../../types/common-options.js'
+import { SortingNode } from '../../types/sorting-node.js'
+/**
+ * Computes the array of comparators to use for sorting based on options.
+ *
+ * Returns an array containing the main comparator and a fallback comparator. If
+ * the main comparator is the unsorted comparator, returns an empty array since
+ * no sorting should be performed.
+ *
+ * @param comparatorByOptionsComputer - Function that creates a comparator from
+ * options.
+ * @param options - The sorting options including fallback sort configuration.
+ * @returns An array of comparators, or empty array if sorting is disabled.
+ */
+export declare function computeComparators<
+ Options extends Pick,
+ T extends SortingNode,
+>(
+ comparatorByOptionsComputer: ComparatorByOptionsComputer,
+ options: Options,
+): Comparator[]
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/compute-comparators.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/compute-comparators.js
new file mode 100644
index 0000000000000000000000000000000000000000..3c683494d6649ed179e5e229b976ce6fee92cc70
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/compute-comparators.js
@@ -0,0 +1,27 @@
+import { unsortedComparator } from './unsorted-comparator.js'
+/**
+ * Computes the array of comparators to use for sorting based on options.
+ *
+ * Returns an array containing the main comparator and a fallback comparator. If
+ * the main comparator is the unsorted comparator, returns an empty array since
+ * no sorting should be performed.
+ *
+ * @param comparatorByOptionsComputer - Function that creates a comparator from
+ * options.
+ * @param options - The sorting options including fallback sort configuration.
+ * @returns An array of comparators, or empty array if sorting is disabled.
+ */
+function computeComparators(comparatorByOptionsComputer, options) {
+ let mainComparator = comparatorByOptionsComputer(options)
+ if (mainComparator === unsortedComparator) {
+ return []
+ }
+ return [
+ mainComparator,
+ comparatorByOptionsComputer({
+ ...options,
+ ...options.fallbackSort,
+ }),
+ ]
+}
+export { computeComparators }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/compute-ordered-value.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/compute-ordered-value.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..d85da8df3c72d846ca0387d5a28e6794d7e7c780
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/compute-ordered-value.d.ts
@@ -0,0 +1,15 @@
+import { CommonOptions } from '../../types/common-options.js'
+/**
+ * Adjusts a comparison result value based on the specified sort order.
+ *
+ * For ascending order, returns the value unchanged. For descending order,
+ * negates the value to reverse the sort direction.
+ *
+ * @param value - The comparison result value to adjust.
+ * @param order - The order direction ('asc' or 'desc').
+ * @returns The adjusted comparison value.
+ */
+export declare function computeOrderedValue(
+ value: number,
+ order: CommonOptions['order'],
+): number
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/compute-ordered-value.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/compute-ordered-value.js
new file mode 100644
index 0000000000000000000000000000000000000000..8145c6c487911d06e44e873486e6b9a9cf58687b
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/compute-ordered-value.js
@@ -0,0 +1,23 @@
+import { UnreachableCaseError } from '../unreachable-case-error.js'
+/**
+ * Adjusts a comparison result value based on the specified sort order.
+ *
+ * For ascending order, returns the value unchanged. For descending order,
+ * negates the value to reverse the sort direction.
+ *
+ * @param value - The comparison result value to adjust.
+ * @param order - The order direction ('asc' or 'desc').
+ * @returns The adjusted comparison value.
+ */
+function computeOrderedValue(value, order) {
+ switch (order) {
+ case 'desc':
+ return -value
+ case 'asc':
+ return value
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(order)
+ }
+}
+export { computeOrderedValue }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/default-comparator-by-options-computer.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/default-comparator-by-options-computer.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..72cb64c3c6e4a2a63b88f1e8ca682df7158f5550
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/default-comparator-by-options-computer.d.ts
@@ -0,0 +1,19 @@
+import { CommonOptions, TypeOption } from '../../types/common-options.js'
+import { GroupsOptions } from '../../types/common-groups-options.js'
+import { SortingNode } from '../../types/sorting-node.js'
+export type ComparatorByOptionsComputer = (
+ options: S,
+) => Comparator
+export type Comparator = (a: T, b: T) => number
+type Options = Pick<
+ CommonOptions,
+ 'specialCharacters' | 'ignoreCase' | 'alphabet' | 'locales' | 'order' | 'type'
+> &
+ Pick & {
+ groups?: GroupsOptions
+ }
+export declare let defaultComparatorByOptionsComputer: ComparatorByOptionsComputer<
+ Options,
+ SortingNode
+>
+export {}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/default-comparator-by-options-computer.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/default-comparator-by-options-computer.js
new file mode 100644
index 0000000000000000000000000000000000000000..351e1d4c6cd6702c55ff61d1901261ced46f2950
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/default-comparator-by-options-computer.js
@@ -0,0 +1,33 @@
+import { UnreachableCaseError } from '../unreachable-case-error.js'
+import { buildSubgroupOrderComparator } from './build-subgroup-order-comparator.js'
+import { buildLineLengthComparator } from './build-line-length-comparator.js'
+import { compareAlphabetically } from './compare-alphabetically.js'
+import { compareByCustomSort } from './compare-by-custom-sort.js'
+import { unsortedComparator } from './unsorted-comparator.js'
+import { compareNaturally } from './compare-naturally.js'
+var defaultComparatorByOptionsComputer = options => {
+ switch (options.type) {
+ case 'subgroup-order':
+ if (!options.groups) {
+ return unsortedComparator
+ }
+ return buildSubgroupOrderComparator({
+ ...options,
+ groups: options.groups,
+ })
+ case 'alphabetical':
+ return (a, b) => compareAlphabetically(a.name, b.name, options)
+ case 'line-length':
+ return buildLineLengthComparator(options)
+ case 'unsorted':
+ return unsortedComparator
+ case 'natural':
+ return (a, b) => compareNaturally(a.name, b.name, options)
+ case 'custom':
+ return (a, b) => compareByCustomSort(a.name, b.name, options)
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(options.type)
+ }
+}
+export { defaultComparatorByOptionsComputer }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/unsorted-comparator.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/unsorted-comparator.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..d8ab24a8913aeffef8a95fc22cb0a7098ac5e6a4
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/unsorted-comparator.d.ts
@@ -0,0 +1,3 @@
+import { Comparator } from './default-comparator-by-options-computer.js'
+import { SortingNode } from '../../types/sorting-node.js'
+export declare let unsortedComparator: Comparator
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/unsorted-comparator.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/unsorted-comparator.js
new file mode 100644
index 0000000000000000000000000000000000000000..a1cf8ffdd46b7f219b217b8ea4650dd0c4eff115
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compare/unsorted-comparator.js
@@ -0,0 +1,2 @@
+var unsortedComparator = () => 0
+export { unsortedComparator }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/complete.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/complete.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..0ff57ce09c8ad773f1b0d57bcfccfdecdc1d134a
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/complete.d.ts
@@ -0,0 +1,36 @@
+import { Settings } from './get-settings.js'
+/**
+ * Merges configuration options with settings and defaults in priority order.
+ *
+ * Combines three levels of configuration with increasing priority:
+ *
+ * 1. Default values (lowest priority)
+ * 2. Global settings from ESLint configuration.
+ * 3. Rule-specific options (highest priority).
+ *
+ * This ensures that user-provided options always override settings, and
+ * settings always override defaults.
+ *
+ * @example
+ *
+ * ```ts
+ * const finalOptions = complete(
+ * { type: 'natural' }, // User options (highest priority)
+ * { order: 'asc' }, // Global settings
+ * { type: 'alphabetical', order: 'desc' }, // Defaults (lowest priority)
+ * )
+ * // Returns: { type: 'natural', order: 'asc' }
+ * ```
+ *
+ * @template T - Type of the configuration object.
+ * @param options - Rule-specific options provided by the user (highest
+ * priority).
+ * @param settings - Global settings from ESLint configuration.
+ * @param defaults - Default values for the configuration (lowest priority).
+ * @returns Merged configuration object with all three levels combined.
+ */
+export declare function complete>(
+ options?: Partial,
+ settings?: Settings,
+ defaults?: T,
+): T
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/complete.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/complete.js
new file mode 100644
index 0000000000000000000000000000000000000000..f39ea415ac7825dcd559775676da134bb1ab1a60
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/complete.js
@@ -0,0 +1,38 @@
+/**
+ * Merges configuration options with settings and defaults in priority order.
+ *
+ * Combines three levels of configuration with increasing priority:
+ *
+ * 1. Default values (lowest priority)
+ * 2. Global settings from ESLint configuration.
+ * 3. Rule-specific options (highest priority).
+ *
+ * This ensures that user-provided options always override settings, and
+ * settings always override defaults.
+ *
+ * @example
+ *
+ * ```ts
+ * const finalOptions = complete(
+ * { type: 'natural' }, // User options (highest priority)
+ * { order: 'asc' }, // Global settings
+ * { type: 'alphabetical', order: 'desc' }, // Defaults (lowest priority)
+ * )
+ * // Returns: { type: 'natural', order: 'asc' }
+ * ```
+ *
+ * @template T - Type of the configuration object.
+ * @param options - Rule-specific options provided by the user (highest
+ * priority).
+ * @param settings - Global settings from ESLint configuration.
+ * @param defaults - Default values for the configuration (lowest priority).
+ * @returns Merged configuration object with all three levels combined.
+ */
+function complete(options = {}, settings = {}, defaults = {}) {
+ return {
+ ...defaults,
+ ...settings,
+ ...options,
+ }
+}
+export { complete }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compute-deep-scope-references.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compute-deep-scope-references.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..af4e56ec87a7976321994b4c69e693c126b5dde9
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compute-deep-scope-references.d.ts
@@ -0,0 +1,13 @@
+import { TSESLint } from '@typescript-eslint/utils'
+import { TSESTree } from '@typescript-eslint/types'
+/**
+ * Recursively computes all scope references deeply for a given node.
+ *
+ * @param node - The AST node.
+ * @param sourceCode - The source code object.
+ * @returns The list of scope references.
+ */
+export declare function computeDeepScopeReferences(
+ node: TSESTree.Node,
+ sourceCode: TSESLint.SourceCode,
+): TSESLint.Scope.Reference[]
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compute-deep-scope-references.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compute-deep-scope-references.js
new file mode 100644
index 0000000000000000000000000000000000000000..4af7b563854161207dfa8aa73972a3e919c11b19
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compute-deep-scope-references.js
@@ -0,0 +1,17 @@
+/**
+ * Recursively computes all scope references deeply for a given node.
+ *
+ * @param node - The AST node.
+ * @param sourceCode - The source code object.
+ * @returns The list of scope references.
+ */
+function computeDeepScopeReferences(node, sourceCode) {
+ return computeScopeReference(sourceCode.getScope(node))
+ function computeScopeReference(scope) {
+ return [
+ ...scope.references,
+ ...scope.childScopes.flatMap(computeScopeReference),
+ ]
+ }
+}
+export { computeDeepScopeReferences }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compute-dependencies-by-sorting-node.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compute-dependencies-by-sorting-node.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..581cc5221aaf2c1ce1d01d70a5f0b73e8ee81e23
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compute-dependencies-by-sorting-node.d.ts
@@ -0,0 +1,42 @@
+import { TSESTree } from '@typescript-eslint/types'
+import { TSESLint } from '@typescript-eslint/utils'
+import { SortingNodeWithDependencies } from './sort-nodes-by-dependencies.js'
+export type ShouldIgnoreIdentifierComputer = (parameters: {
+ identifier: TSESTree.JSXIdentifier | TSESTree.Identifier
+ referencingSortingNode: T
+}) => boolean
+export type AdditionalIdentifierDependenciesComputer = (parameters: {
+ reference: TSESLint.Scope.Reference
+ referencingSortingNode: T
+}) => T[]
+export type ShouldIgnoreSortingNodeComputer = (sortingNode: T) => boolean
+/**
+ * Compute the list of dependencies for each sorting node.
+ *
+ * @param params - The parameters object.
+ * @param params.additionalIdentifierDependenciesComputer - A function to
+ * compute additional dependencies for an identifier.
+ * @param params.shouldIgnoreSortingNodeComputer - A function to determine if a
+ * sorting node should be ignored.
+ * @param params.shouldIgnoreIdentifierComputer - A function to determine if an
+ * identifier should be ignored.
+ * @param params.sortingNodes - The sorting nodes to compute dependencies for.
+ * @param params.sourceCode - The source code object.
+ * @returns A map of sorting nodes to their dependencies.
+ */
+export declare function computeDependenciesBySortingNode<
+ Node extends TSESTree.Node,
+ T extends Pick, 'dependencyNames' | 'node'>,
+>({
+ additionalIdentifierDependenciesComputer,
+ shouldIgnoreSortingNodeComputer,
+ shouldIgnoreIdentifierComputer,
+ sortingNodes,
+ sourceCode,
+}: {
+ additionalIdentifierDependenciesComputer?: AdditionalIdentifierDependenciesComputer
+ shouldIgnoreSortingNodeComputer?: ShouldIgnoreSortingNodeComputer
+ shouldIgnoreIdentifierComputer?: ShouldIgnoreIdentifierComputer
+ sourceCode: TSESLint.SourceCode
+ sortingNodes: T[]
+}): Map
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compute-dependencies-by-sorting-node.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compute-dependencies-by-sorting-node.js
new file mode 100644
index 0000000000000000000000000000000000000000..b27255648dbecfd81fe01ef317b7bdffb2e91c1c
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compute-dependencies-by-sorting-node.js
@@ -0,0 +1,103 @@
+import { computeDeepScopeReferences } from './compute-deep-scope-references.js'
+import { rangeContainsRange } from './range-contains-range.js'
+/**
+ * Compute the list of dependencies for each sorting node.
+ *
+ * @param params - The parameters object.
+ * @param params.additionalIdentifierDependenciesComputer - A function to
+ * compute additional dependencies for an identifier.
+ * @param params.shouldIgnoreSortingNodeComputer - A function to determine if a
+ * sorting node should be ignored.
+ * @param params.shouldIgnoreIdentifierComputer - A function to determine if an
+ * identifier should be ignored.
+ * @param params.sortingNodes - The sorting nodes to compute dependencies for.
+ * @param params.sourceCode - The source code object.
+ * @returns A map of sorting nodes to their dependencies.
+ */
+function computeDependenciesBySortingNode({
+ additionalIdentifierDependenciesComputer,
+ shouldIgnoreSortingNodeComputer,
+ shouldIgnoreIdentifierComputer,
+ sortingNodes,
+ sourceCode,
+}) {
+ let returnValue = /* @__PURE__ */ new Map()
+ let references = sortingNodes.flatMap(sortingNode =>
+ computeDeepScopeReferences(sortingNode.node, sourceCode),
+ )
+ let uniqueReferences = new Set(references)
+ for (let reference of uniqueReferences) {
+ let { identifier, resolved } = reference
+ if (!resolved) {
+ continue
+ }
+ let referencingSortingNode = findSortingNodeContainingIdentifier(
+ sortingNodes,
+ identifier,
+ )
+ if (!referencingSortingNode) {
+ continue
+ }
+ if (shouldIgnoreSortingNodeComputer?.(referencingSortingNode)) {
+ continue
+ }
+ let referencedNodes = returnValue.get(referencingSortingNode) ?? []
+ returnValue.set(referencingSortingNode, referencedNodes)
+ referencedNodes.push(
+ ...computeMainIdentifierDependencies({
+ shouldIgnoreSortingNodeComputer,
+ shouldIgnoreIdentifierComputer,
+ referencingSortingNode,
+ sortingNodes,
+ identifier,
+ resolved,
+ }),
+ ...(additionalIdentifierDependenciesComputer?.({
+ referencingSortingNode,
+ reference,
+ }) ?? []),
+ )
+ }
+ return returnValue
+}
+function computeMainIdentifierDependencies({
+ shouldIgnoreSortingNodeComputer,
+ shouldIgnoreIdentifierComputer,
+ referencingSortingNode,
+ sortingNodes,
+ identifier,
+ resolved,
+}) {
+ if (
+ shouldIgnoreIdentifierComputer?.({
+ referencingSortingNode,
+ identifier,
+ })
+ ) {
+ return []
+ }
+ let [firstIdentifier] = resolved.identifiers
+ if (!firstIdentifier) {
+ return []
+ }
+ let referencedSortingNode = findSortingNodeContainingIdentifier(
+ sortingNodes,
+ firstIdentifier,
+ )
+ if (!referencedSortingNode) {
+ return []
+ }
+ if (shouldIgnoreSortingNodeComputer?.(referencedSortingNode)) {
+ return []
+ }
+ if (referencedSortingNode === referencingSortingNode) {
+ return []
+ }
+ return [referencedSortingNode]
+}
+function findSortingNodeContainingIdentifier(sortingNodes, identifier) {
+ return sortingNodes.find(sortingNode =>
+ rangeContainsRange(sortingNode.node.range, identifier.range),
+ )
+}
+export { computeDependenciesBySortingNode }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compute-dependencies-outside-functions-by-sorting-node.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compute-dependencies-outside-functions-by-sorting-node.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..debadb761f6ecfb784f57bf4f679061c5c09338e
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compute-dependencies-outside-functions-by-sorting-node.d.ts
@@ -0,0 +1,13 @@
+import { TSESTree } from '@typescript-eslint/types'
+import { TSESLint } from '@typescript-eslint/utils'
+import { SortingNodeWithDependencies } from './sort-nodes-by-dependencies.js'
+export declare function computeDependenciesOutsideFunctionsBySortingNode<
+ Node extends TSESTree.Node,
+ T extends Pick, 'dependencyNames' | 'node'>,
+>({
+ sortingNodes,
+ sourceCode,
+}: {
+ sourceCode: TSESLint.SourceCode
+ sortingNodes: T[]
+}): Map
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compute-dependencies-outside-functions-by-sorting-node.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compute-dependencies-outside-functions-by-sorting-node.js
new file mode 100644
index 0000000000000000000000000000000000000000..83b7b1345b219cf0c72d8124854b7a897f5a654f
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compute-dependencies-outside-functions-by-sorting-node.js
@@ -0,0 +1,30 @@
+import { computeDependenciesBySortingNode } from './compute-dependencies-by-sorting-node.js'
+import { computeParentNodesWithTypes } from './compute-parent-nodes-with-types.js'
+import { isNodeImmediatelyCalled } from './is-node-immediately-called.js'
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+function computeDependenciesOutsideFunctionsBySortingNode({
+ sortingNodes,
+ sourceCode,
+}) {
+ return computeDependenciesBySortingNode({
+ shouldIgnoreIdentifierComputer: buildShouldIgnoreIdentifierComputer(),
+ sortingNodes,
+ sourceCode,
+ })
+ function buildShouldIgnoreIdentifierComputer() {
+ return ({ referencingSortingNode, identifier }) => {
+ return computeParentNodesWithTypes({
+ allowedTypes: [
+ AST_NODE_TYPES.FunctionExpression,
+ AST_NODE_TYPES.ArrowFunctionExpression,
+ ],
+ maxParent: referencingSortingNode.node,
+ consecutiveOnly: false,
+ node: identifier,
+ }).some(
+ functionParentNode => !isNodeImmediatelyCalled(functionParentNode),
+ )
+ }
+ }
+}
+export { computeDependenciesOutsideFunctionsBySortingNode }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compute-group-name.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compute-group-name.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..73c5789d04d68a11f45de1a924a3215948ff3b18
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compute-group-name.d.ts
@@ -0,0 +1,13 @@
+import { GroupsOptions } from '../types/common-groups-options.js'
+/**
+ * Computes the name of a group based on the provided group object.
+ *
+ * @param group - The group object.
+ * @returns A string if:
+ *
+ * - The group is a string.
+ * - The group is a commentAbove option with a string group.
+ */
+export declare function computeGroupName(
+ group: GroupsOptions[number],
+): string | null
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compute-group-name.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compute-group-name.js
new file mode 100644
index 0000000000000000000000000000000000000000..e22e388c897ab13b863f630e7cf208d2cd8b827d
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compute-group-name.js
@@ -0,0 +1,33 @@
+import { isGroupWithOverridesOption } from './is-group-with-overrides-option.js'
+import { isNewlinesBetweenOption } from './is-newlines-between-option.js'
+import { UnreachableCaseError } from './unreachable-case-error.js'
+/**
+ * Computes the name of a group based on the provided group object.
+ *
+ * @param group - The group object.
+ * @returns A string if:
+ *
+ * - The group is a string.
+ * - The group is a commentAbove option with a string group.
+ */
+function computeGroupName(group) {
+ if (typeof group === 'string' || Array.isArray(group)) {
+ return computeStringGroupName(group)
+ }
+ if (isGroupWithOverridesOption(group)) {
+ return computeStringGroupName(group.group)
+ }
+ /* v8 ignore else -- @preserve Exhaustive guard for unsupported group option. */
+ if (isNewlinesBetweenOption(group)) {
+ return null
+ }
+ /* v8 ignore next -- @preserve Exhaustive guard for unsupported group option. */
+ throw new UnreachableCaseError(group)
+}
+function computeStringGroupName(group) {
+ if (typeof group === 'string') {
+ return group
+ }
+ return null
+}
+export { computeGroupName }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compute-group.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compute-group.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..10c2edde404663143f6bac377a6c0723ea06d8a8
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compute-group.d.ts
@@ -0,0 +1,72 @@
+import {
+ CommonGroupsOptions,
+ AnyOfCustomGroup,
+} from '../types/common-groups-options.js'
+/**
+ * Parameters for computing the group of an element.
+ *
+ * @template CustomGroupMatchOptions - Type of custom group match options.
+ */
+interface ComputeGroupParameters {
+ /**
+ * Configuration options for grouping.
+ */
+ options: Pick<
+ CommonGroupsOptions,
+ 'customGroups' | 'groups'
+ >
+ /**
+ * Function to test if an element matches a custom group. Takes a custom
+ * group configuration and returns true if the element matches.
+ */
+ customGroupMatcher: CustomGroupMatcher
+ /**
+ * List of predefined groups that the element belongs to. These are checked
+ * after custom groups as a fallback.
+ */
+ predefinedGroups: string[]
+}
+type CustomGroupMatcher = (
+ customGroup: AnyOfCustomGroup | Partial,
+) => boolean
+/**
+ * Determines which group an element belongs to based on custom and predefined
+ * groups.
+ *
+ * The function checks groups in the following priority order:
+ *
+ * 1. Custom groups (if defined) - checked first, highest priority
+ * 2. Predefined groups - checked as fallback
+ * 3. Returns 'unknown' if no matching group is found.
+ *
+ * Only groups that exist in options.groups are considered valid.
+ *
+ * @example
+ *
+ * ```ts
+ * const group = computeGroup({
+ * options: {
+ * groups: ['react', 'external', 'internal'],
+ * customGroups: [{ groupName: 'react', anyOf: ['react', 'react-*'] }],
+ * },
+ * customGroupMatcher: customGroup => customGroup.anyOf.includes('react'),
+ * predefinedGroups: ['external'],
+ * name: 'react-dom',
+ * })
+ * // Returns: 'react'
+ * ```
+ *
+ * @template CustomGroupMatchOptions - Type of custom group match options.
+ * @param params - Parameters for group computation.
+ * @param params.options - Configuration with available groups and custom
+ * groups.
+ * @param params.customGroupMatcher - Matcher function for custom groups.
+ * @param params.predefinedGroups - Fallback predefined groups to check.
+ * @returns The matched group name or 'unknown' if no group matches.
+ */
+export declare function computeGroup({
+ customGroupMatcher,
+ predefinedGroups,
+ options,
+}: ComputeGroupParameters): 'unknown' | string
+export {}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compute-group.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compute-group.js
new file mode 100644
index 0000000000000000000000000000000000000000..29e457921272cd269bdcf1e109415d47100d78f0
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compute-group.js
@@ -0,0 +1,64 @@
+import { computeGroupsNames } from './compute-groups-names.js'
+/**
+ * Determines which group an element belongs to based on custom and predefined
+ * groups.
+ *
+ * The function checks groups in the following priority order:
+ *
+ * 1. Custom groups (if defined) - checked first, highest priority
+ * 2. Predefined groups - checked as fallback
+ * 3. Returns 'unknown' if no matching group is found.
+ *
+ * Only groups that exist in options.groups are considered valid.
+ *
+ * @example
+ *
+ * ```ts
+ * const group = computeGroup({
+ * options: {
+ * groups: ['react', 'external', 'internal'],
+ * customGroups: [{ groupName: 'react', anyOf: ['react', 'react-*'] }],
+ * },
+ * customGroupMatcher: customGroup => customGroup.anyOf.includes('react'),
+ * predefinedGroups: ['external'],
+ * name: 'react-dom',
+ * })
+ * // Returns: 'react'
+ * ```
+ *
+ * @template CustomGroupMatchOptions - Type of custom group match options.
+ * @param params - Parameters for group computation.
+ * @param params.options - Configuration with available groups and custom
+ * groups.
+ * @param params.customGroupMatcher - Matcher function for custom groups.
+ * @param params.predefinedGroups - Fallback predefined groups to check.
+ * @returns The matched group name or 'unknown' if no group matches.
+ */
+function computeGroup({ customGroupMatcher, predefinedGroups, options }) {
+ let groupsSet = new Set(computeGroupsNames(options.groups))
+ return (
+ computeFirstMatchingCustomGroupName(
+ groupsSet,
+ options.customGroups,
+ customGroupMatcher,
+ ) ??
+ predefinedGroups.find(group => groupsSet.has(group)) ??
+ 'unknown'
+ )
+}
+function computeFirstMatchingCustomGroupName(
+ groupsSet,
+ customGroups,
+ customGroupMatcher,
+) {
+ for (let customGroup of customGroups) {
+ if (
+ customGroupMatcher(customGroup) &&
+ groupsSet.has(customGroup.groupName)
+ ) {
+ return customGroup.groupName
+ }
+ }
+ return null
+}
+export { computeGroup }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compute-groups-names.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compute-groups-names.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..01675a573a91e8ba4e0eabb8a88a95a507b25b8f
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compute-groups-names.d.ts
@@ -0,0 +1,8 @@
+import { GroupsOptions } from '../types/common-groups-options.js'
+/**
+ * Computes the names of all groups based on the provided `GroupsOptions`.
+ *
+ * @param groups - An array of group options.
+ * @returns An array of computed group names as strings.
+ */
+export declare function computeGroupsNames(groups: GroupsOptions): string[]
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compute-groups-names.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compute-groups-names.js
new file mode 100644
index 0000000000000000000000000000000000000000..c6cc065d0556f119656356f3941a2e301f92a3cb
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compute-groups-names.js
@@ -0,0 +1,33 @@
+import { isGroupWithOverridesOption } from './is-group-with-overrides-option.js'
+import { isNewlinesBetweenOption } from './is-newlines-between-option.js'
+import { UnreachableCaseError } from './unreachable-case-error.js'
+/**
+ * Computes the names of all groups based on the provided `GroupsOptions`.
+ *
+ * @param groups - An array of group options.
+ * @returns An array of computed group names as strings.
+ */
+function computeGroupsNames(groups) {
+ return groups.flatMap(group => computeGroupNames(group))
+}
+function computeGroupNames(group) {
+ if (typeof group === 'string' || Array.isArray(group)) {
+ return computeStringGroupNames(group)
+ }
+ if (isGroupWithOverridesOption(group)) {
+ return computeStringGroupNames(group.group)
+ }
+ /* v8 ignore else -- @preserve Exhaustive guard for unsupported group option. */
+ if (isNewlinesBetweenOption(group)) {
+ return []
+ }
+ /* v8 ignore next -- @preserve Exhaustive guard for unsupported group option. */
+ throw new UnreachableCaseError(group)
+}
+function computeStringGroupNames(group) {
+ if (typeof group === 'string') {
+ return [group]
+ }
+ return group
+}
+export { computeGroupsNames }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compute-nodes-in-circular-dependencies.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compute-nodes-in-circular-dependencies.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..b16cfcb85cccec030c1ed8ea06a4308a650d4502
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compute-nodes-in-circular-dependencies.d.ts
@@ -0,0 +1,39 @@
+import { SortingNodeWithDependencies } from './sort-nodes-by-dependencies.js'
+/**
+ * Detects nodes that are part of circular dependency chains.
+ *
+ * Uses a depth-first search (DFS) algorithm with three-color marking to
+ * identify cycles in the dependency graph. When a cycle is detected, all nodes
+ * in that cycle are added to the result set.
+ *
+ * The algorithm tracks three states for each node:
+ *
+ * - Not visited: Node hasn't been processed yet
+ * - Visiting: Currently in the DFS path (gray in three-color marking)
+ * - Visited: Completely processed (black in three-color marking).
+ *
+ * A cycle is detected when we encounter a node that is already in the
+ * "visiting" state, meaning we've found a back edge in the graph.
+ *
+ * @example
+ *
+ * ```ts
+ * const nodes = [
+ * { name: 'A', dependencies: ['B'], dependencyNames: ['A'] },
+ * { name: 'B', dependencies: ['C'], dependencyNames: ['B'] },
+ * { name: 'C', dependencies: ['A'], dependencyNames: ['C'] },
+ * ]
+ * const circularNodes = computeNodesInCircularDependencies(nodes)
+ * // Returns: Set containing all three nodes (A, B, C)
+ * ```
+ *
+ * @template T - Type of sorting node with dependencies.
+ * @param elements - Array of nodes with dependency information.
+ * @returns Set of nodes that participate in circular dependencies.
+ */
+export declare function computeNodesInCircularDependencies<
+ T extends Pick<
+ SortingNodeWithDependencies,
+ 'dependencyNames' | 'dependencies'
+ >,
+>(elements: T[]): Set
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compute-nodes-in-circular-dependencies.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compute-nodes-in-circular-dependencies.js
new file mode 100644
index 0000000000000000000000000000000000000000..74d6d355fb82c7a0f709ebeae73389ad55e688c7
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compute-nodes-in-circular-dependencies.js
@@ -0,0 +1,85 @@
+/**
+ * Detects nodes that are part of circular dependency chains.
+ *
+ * Uses a depth-first search (DFS) algorithm with three-color marking to
+ * identify cycles in the dependency graph. When a cycle is detected, all nodes
+ * in that cycle are added to the result set.
+ *
+ * The algorithm tracks three states for each node:
+ *
+ * - Not visited: Node hasn't been processed yet
+ * - Visiting: Currently in the DFS path (gray in three-color marking)
+ * - Visited: Completely processed (black in three-color marking).
+ *
+ * A cycle is detected when we encounter a node that is already in the
+ * "visiting" state, meaning we've found a back edge in the graph.
+ *
+ * @example
+ *
+ * ```ts
+ * const nodes = [
+ * { name: 'A', dependencies: ['B'], dependencyNames: ['A'] },
+ * { name: 'B', dependencies: ['C'], dependencyNames: ['B'] },
+ * { name: 'C', dependencies: ['A'], dependencyNames: ['C'] },
+ * ]
+ * const circularNodes = computeNodesInCircularDependencies(nodes)
+ * // Returns: Set containing all three nodes (A, B, C)
+ * ```
+ *
+ * @template T - Type of sorting node with dependencies.
+ * @param elements - Array of nodes with dependency information.
+ * @returns Set of nodes that participate in circular dependencies.
+ */
+function computeNodesInCircularDependencies(elements) {
+ let elementsInCycles = /* @__PURE__ */ new Set()
+ let visitingElements = /* @__PURE__ */ new Set()
+ let visitedElements = /* @__PURE__ */ new Set()
+ /**
+ * Performs depth-first search to detect cycles starting from the given
+ * element.
+ *
+ * Recursively traverses the dependency graph, maintaining a path of the
+ * current traversal. If a node in the current path is encountered again, a
+ * cycle is detected and all nodes in the cycle are marked.
+ *
+ * @param element - Current node being visited.
+ * @param path - Array of nodes in the current DFS path.
+ */
+ function depthFirstSearch(element, path) {
+ if (visitedElements.has(element)) {
+ return
+ }
+ if (visitingElements.has(element)) {
+ let cycleStartIndex = path.indexOf(element)
+ /* v8 ignore else -- @preserve Visiting path already contains the element when this branch executes. */
+ if (cycleStartIndex !== -1) {
+ for (let cycleElements of path.slice(cycleStartIndex)) {
+ elementsInCycles.add(cycleElements)
+ }
+ }
+ return
+ }
+ visitingElements.add(element)
+ path.push(element)
+ for (let dependency of element.dependencies) {
+ let dependencyElement = elements
+ .filter(currentElement => currentElement !== element)
+ .find(currentElement =>
+ currentElement.dependencyNames.includes(dependency),
+ )
+ /* v8 ignore next -- @preserve Dependencies are pre-filtered; missing entries are defensive fallback. */
+ if (dependencyElement) {
+ depthFirstSearch(dependencyElement, [...path])
+ }
+ }
+ visitingElements.delete(element)
+ visitedElements.add(element)
+ }
+ for (let element of elements) {
+ if (!visitedElements.has(element)) {
+ depthFirstSearch(element, [])
+ }
+ }
+ return elementsInCycles
+}
+export { computeNodesInCircularDependencies }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compute-overridden-options-by-group-index.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compute-overridden-options-by-group-index.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..cae29c3562442175375ea6a9433ebe6703fe2689
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compute-overridden-options-by-group-index.d.ts
@@ -0,0 +1,51 @@
+import { CommonGroupsOptions } from '../types/common-groups-options.js'
+import { CommonOptions } from '../types/common-options.js'
+type Options = Pick<
+ CommonGroupsOptions,
+ 'customGroups' | 'groups'
+> &
+ CommonOptions
+/**
+ * Retrieves sorting options potentially overridden by a custom group or group
+ * with settings configuration.
+ *
+ * Checks if the group at the specified index is a custom group with its own
+ * sorting configuration. If so, returns the overridden options (type, order,
+ * fallbackSort). Otherwise, returns the original options.
+ *
+ * Custom groups can override:
+ *
+ * - Sort type (e.g., use 'natural' instead of global 'alphabetical')
+ * - Sort order (e.g., use 'desc' instead of global 'asc')
+ * - Fallback sort configuration.
+ *
+ * @example
+ *
+ * ```ts
+ * const options = {
+ * type: 'alphabetical',
+ * order: 'asc',
+ * fallbackSort: { type: 'natural' },
+ * groups: ['custom-group', 'other'],
+ * customGroups: [
+ * {
+ * groupName: 'custom-group',
+ * type: 'natural',
+ * order: 'desc',
+ * },
+ * ],
+ * }
+ * const overridden = computeOverriddenOptionsByGroupIndex(options, 0)
+ * // Returns: { type: 'natural', order: 'desc', fallbackSort: { type: 'natural' } }
+ * ```
+ *
+ * @param options - Combined group and sorting options.
+ * @param groupIndex - Index of the group to check for overrides.
+ * @returns Sorting options, potentially overridden by custom group
+ * configuration.
+ */
+export declare function computeOverriddenOptionsByGroupIndex(
+ options: T,
+ groupIndex: number,
+): T
+export {}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compute-overridden-options-by-group-index.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compute-overridden-options-by-group-index.js
new file mode 100644
index 0000000000000000000000000000000000000000..31beda0ce2695ff54d7100bd8672bce74fb9e29b
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compute-overridden-options-by-group-index.js
@@ -0,0 +1,86 @@
+import { isGroupWithOverridesOption } from './is-group-with-overrides-option.js'
+import { computeGroupName } from './compute-group-name.js'
+/**
+ * Retrieves sorting options potentially overridden by a custom group or group
+ * with settings configuration.
+ *
+ * Checks if the group at the specified index is a custom group with its own
+ * sorting configuration. If so, returns the overridden options (type, order,
+ * fallbackSort). Otherwise, returns the original options.
+ *
+ * Custom groups can override:
+ *
+ * - Sort type (e.g., use 'natural' instead of global 'alphabetical')
+ * - Sort order (e.g., use 'desc' instead of global 'asc')
+ * - Fallback sort configuration.
+ *
+ * @example
+ *
+ * ```ts
+ * const options = {
+ * type: 'alphabetical',
+ * order: 'asc',
+ * fallbackSort: { type: 'natural' },
+ * groups: ['custom-group', 'other'],
+ * customGroups: [
+ * {
+ * groupName: 'custom-group',
+ * type: 'natural',
+ * order: 'desc',
+ * },
+ * ],
+ * }
+ * const overridden = computeOverriddenOptionsByGroupIndex(options, 0)
+ * // Returns: { type: 'natural', order: 'desc', fallbackSort: { type: 'natural' } }
+ * ```
+ *
+ * @param options - Combined group and sorting options.
+ * @param groupIndex - Index of the group to check for overrides.
+ * @returns Sorting options, potentially overridden by custom group
+ * configuration.
+ */
+function computeOverriddenOptionsByGroupIndex(options, groupIndex) {
+ let { customGroups, groups } = options
+ let matchingGroup = groups[groupIndex]
+ let matchingGroupName = matchingGroup ? computeGroupName(matchingGroup) : null
+ let customGroup = customGroups.find(
+ currentGroup => matchingGroupName === currentGroup.groupName,
+ )
+ let returnValue = { ...options }
+ if (matchingGroup && isGroupWithOverridesOption(matchingGroup)) {
+ let {
+ newlinesInside,
+ commentAbove,
+ fallbackSort,
+ group,
+ ...relevantGroupFields
+ } = matchingGroup
+ returnValue = {
+ ...returnValue,
+ ...relevantGroupFields,
+ fallbackSort: {
+ ...returnValue.fallbackSort,
+ ...fallbackSort,
+ },
+ }
+ }
+ if (customGroup) {
+ let {
+ elementNamePattern,
+ newlinesInside,
+ fallbackSort,
+ groupName,
+ ...relevantCustomGroupFields
+ } = customGroup
+ returnValue = {
+ ...returnValue,
+ ...relevantCustomGroupFields,
+ fallbackSort: {
+ ...returnValue.fallbackSort,
+ ...fallbackSort,
+ },
+ }
+ }
+ return returnValue
+}
+export { computeOverriddenOptionsByGroupIndex }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compute-parent-nodes-with-types.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compute-parent-nodes-with-types.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..87e6d80ed62d375a31a578860b6fbc7097f388e3
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compute-parent-nodes-with-types.d.ts
@@ -0,0 +1,28 @@
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+import { TSESTree } from '@typescript-eslint/types'
+import { NodeOfType } from '../types/node-of-type.js'
+/**
+ * Finds all parent nodes matching one of the specified AST node types.
+ *
+ * @param options - Options for the search.
+ * @param options.allowedTypes - Array of AST node types to match.
+ * @param options.consecutiveOnly - If true, stops searching after the first
+ * non-matching parent node is found.
+ * @param options.node - Starting node to search from.
+ * @param options.maxParent - Optional maximum exclusive parent node to stop the
+ * search at.
+ * @returns List of matching parent nodes.
+ */
+export declare function computeParentNodesWithTypes<
+ NodeType extends AST_NODE_TYPES,
+>({
+ consecutiveOnly,
+ allowedTypes,
+ maxParent,
+ node,
+}: {
+ maxParent: TSESTree.Node | null
+ consecutiveOnly: boolean
+ allowedTypes: NodeType[]
+ node: TSESTree.Node
+}): NodeOfType[]
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compute-parent-nodes-with-types.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compute-parent-nodes-with-types.js
new file mode 100644
index 0000000000000000000000000000000000000000..554a2b4bbe5df23216b7a48f3ddf38a50760056c
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/compute-parent-nodes-with-types.js
@@ -0,0 +1,35 @@
+/**
+ * Finds all parent nodes matching one of the specified AST node types.
+ *
+ * @param options - Options for the search.
+ * @param options.allowedTypes - Array of AST node types to match.
+ * @param options.consecutiveOnly - If true, stops searching after the first
+ * non-matching parent node is found.
+ * @param options.node - Starting node to search from.
+ * @param options.maxParent - Optional maximum exclusive parent node to stop the
+ * search at.
+ * @returns List of matching parent nodes.
+ */
+function computeParentNodesWithTypes({
+ consecutiveOnly,
+ allowedTypes,
+ maxParent,
+ node,
+}) {
+ let allowedTypesSet = new Set(allowedTypes)
+ let returnValue = []
+ let { parent } = node
+ while (parent) {
+ if (parent === maxParent) {
+ break
+ }
+ if (allowedTypesSet.has(parent.type)) {
+ returnValue.push(parent)
+ } else if (consecutiveOnly) {
+ break
+ }
+ ;({ parent } = parent)
+ }
+ return returnValue
+}
+export { computeParentNodesWithTypes }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/context-matching/passes-all-names-match-pattern-filter.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/context-matching/passes-all-names-match-pattern-filter.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..02887eccf39b7ca6a57e4a41baa2709807380e68
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/context-matching/passes-all-names-match-pattern-filter.d.ts
@@ -0,0 +1,18 @@
+import { RegexOption } from '../../types/common-options.js'
+/**
+ * Checks if all node names match the specified pattern.
+ *
+ * @param params - The parameters object.
+ * @param params.allNamesMatchPattern - The pattern to match against all node
+ * names.
+ * @param params.nodeNames - Array of node names to test against patterns.
+ * @returns True if all node names match the specified pattern, or if no pattern
+ * is specified; otherwise, false.
+ */
+export declare function passesAllNamesMatchPatternFilter({
+ allNamesMatchPattern,
+ nodeNames,
+}: {
+ allNamesMatchPattern?: RegexOption
+ nodeNames: string[]
+}): boolean
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/context-matching/passes-all-names-match-pattern-filter.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/context-matching/passes-all-names-match-pattern-filter.js
new file mode 100644
index 0000000000000000000000000000000000000000..07b8043a989771fdb549953f7d95625a21b69fce
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/context-matching/passes-all-names-match-pattern-filter.js
@@ -0,0 +1,18 @@
+import { matches } from '../matches.js'
+/**
+ * Checks if all node names match the specified pattern.
+ *
+ * @param params - The parameters object.
+ * @param params.allNamesMatchPattern - The pattern to match against all node
+ * names.
+ * @param params.nodeNames - Array of node names to test against patterns.
+ * @returns True if all node names match the specified pattern, or if no pattern
+ * is specified; otherwise, false.
+ */
+function passesAllNamesMatchPatternFilter({ allNamesMatchPattern, nodeNames }) {
+ if (!allNamesMatchPattern) {
+ return true
+ }
+ return nodeNames.every(nodeName => matches(nodeName, allNamesMatchPattern))
+}
+export { passesAllNamesMatchPatternFilter }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/context-matching/passes-ast-selector-filter.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/context-matching/passes-ast-selector-filter.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..22fdff4f8c8bb4c69e29ac1e3f0e065aaefdb76a
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/context-matching/passes-ast-selector-filter.d.ts
@@ -0,0 +1,17 @@
+/**
+ * Checks if the given AST selector matches the expected AST selector.
+ *
+ * @param params - The parameters object.
+ * @param params.matchesAstSelector - The AST selector to match against, or
+ * undefined if no selector is specified.
+ * @param params.matchedAstSelectors - The matched AST selectors for a node.
+ * @returns True if the given AST selector matches the expected AST selector, or
+ * if no selector is specified; otherwise, false.
+ */
+export declare function passesAstSelectorFilter({
+ matchedAstSelectors,
+ matchesAstSelector,
+}: {
+ matchedAstSelectors: ReadonlySet
+ matchesAstSelector: undefined | string
+}): boolean
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/context-matching/passes-ast-selector-filter.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/context-matching/passes-ast-selector-filter.js
new file mode 100644
index 0000000000000000000000000000000000000000..4051ada9a4a0fb22b774f6cbbb87905fc225f793
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/context-matching/passes-ast-selector-filter.js
@@ -0,0 +1,17 @@
+/**
+ * Checks if the given AST selector matches the expected AST selector.
+ *
+ * @param params - The parameters object.
+ * @param params.matchesAstSelector - The AST selector to match against, or
+ * undefined if no selector is specified.
+ * @param params.matchedAstSelectors - The matched AST selectors for a node.
+ * @returns True if the given AST selector matches the expected AST selector, or
+ * if no selector is specified; otherwise, false.
+ */
+function passesAstSelectorFilter({ matchedAstSelectors, matchesAstSelector }) {
+ if (!matchesAstSelector) {
+ return true
+ }
+ return matchedAstSelectors.has(matchesAstSelector)
+}
+export { passesAstSelectorFilter }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/convert-boolean-to-sign.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/convert-boolean-to-sign.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..8f070c269ec7636d7b2d20edc9a512dc995f46f0
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/convert-boolean-to-sign.d.ts
@@ -0,0 +1,27 @@
+/**
+ * Converts a boolean value to a sort direction multiplier.
+ *
+ * Used in sorting functions to convert boolean comparisons into numeric values
+ * suitable for array sort callbacks. This allows for concise expression of sort
+ * direction logic.
+ *
+ * @example
+ *
+ * ```ts
+ * // In ascending sort
+ * convertBooleanToSign(true) // Returns: 1
+ * convertBooleanToSign(false) // Returns: -1
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * // Usage in sorting
+ * const sortMultiplier = convertBooleanToSign(order === 'asc')
+ * return sortMultiplier * (a - b)
+ * ```
+ *
+ * @param value - Boolean value to convert to a sign.
+ * @returns 1 if value is true, -1 if value is false.
+ */
+export declare function convertBooleanToSign(value: boolean): -1 | 1
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/convert-boolean-to-sign.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/convert-boolean-to-sign.js
new file mode 100644
index 0000000000000000000000000000000000000000..cc114f1df5d9e98bef4a2584d9a9c657b4160560
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/convert-boolean-to-sign.js
@@ -0,0 +1,30 @@
+/**
+ * Converts a boolean value to a sort direction multiplier.
+ *
+ * Used in sorting functions to convert boolean comparisons into numeric values
+ * suitable for array sort callbacks. This allows for concise expression of sort
+ * direction logic.
+ *
+ * @example
+ *
+ * ```ts
+ * // In ascending sort
+ * convertBooleanToSign(true) // Returns: 1
+ * convertBooleanToSign(false) // Returns: -1
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * // Usage in sorting
+ * const sortMultiplier = convertBooleanToSign(order === 'asc')
+ * return sortMultiplier * (a - b)
+ * ```
+ *
+ * @param value - Boolean value to convert to a sign.
+ * @returns 1 if value is true, -1 if value is false.
+ */
+function convertBooleanToSign(value) {
+ return value ? 1 : -1
+}
+export { convertBooleanToSign }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/create-eslint-rule.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/create-eslint-rule.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..ebf8bb76a1068e98e74e39593873ccb819735f47
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/create-eslint-rule.d.ts
@@ -0,0 +1,48 @@
+import { ESLintUtils } from '@typescript-eslint/utils'
+/**
+ * Factory function for creating ESLint rules with consistent structure and
+ * documentation.
+ *
+ * Wraps the ESLintUtils.RuleCreator to automatically generate documentation
+ * URLs for each rule based on its name. All rules created with this function
+ * will have their documentation hosted at perfectionist.dev.
+ *
+ * @see {@link https://typescript-eslint.io/packages/utils/} - TypeScript ESLint
+ * Utils documentation
+ * @see {@link https://perfectionist.dev/} - Perfectionist plugin documentation
+ */
+export declare let createEslintRule: <
+ Options extends readonly unknown[],
+ MessageIds extends string,
+>({
+ meta,
+ name,
+ ...rule
+}: Readonly<
+ ESLintUtils.RuleWithMetaAndName<
+ Options,
+ MessageIds,
+ {
+ /**
+ * Indicates whether the rule is part of the recommended configuration.
+ *
+ * @default false
+ */
+ recommended?: boolean
+ }
+ >
+>) => ESLintUtils.RuleModule<
+ MessageIds,
+ Options,
+ {
+ /**
+ * Indicates whether the rule is part of the recommended configuration.
+ *
+ * @default false
+ */
+ recommended?: boolean
+ },
+ ESLintUtils.RuleListener
+> & {
+ name: string
+}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/create-eslint-rule.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/create-eslint-rule.js
new file mode 100644
index 0000000000000000000000000000000000000000..7253d86e12dd275913fceab8b18e64b6c70195bb
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/create-eslint-rule.js
@@ -0,0 +1,17 @@
+import { ESLintUtils } from '@typescript-eslint/utils'
+/**
+ * Factory function for creating ESLint rules with consistent structure and
+ * documentation.
+ *
+ * Wraps the ESLintUtils.RuleCreator to automatically generate documentation
+ * URLs for each rule based on its name. All rules created with this function
+ * will have their documentation hosted at perfectionist.dev.
+ *
+ * @see {@link https://typescript-eslint.io/packages/utils/} - TypeScript ESLint
+ * Utils documentation
+ * @see {@link https://perfectionist.dev/} - Perfectionist plugin documentation
+ */
+var createEslintRule = ESLintUtils.RuleCreator(
+ ruleName => `https://perfectionist.dev/rules/${ruleName}`,
+)
+export { createEslintRule }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/create-node-index-map.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/create-node-index-map.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..9a8a7c876acb8fc12ec700d32a3d3bad615fdb64
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/create-node-index-map.d.ts
@@ -0,0 +1,30 @@
+import { TSESTree } from '@typescript-eslint/types'
+import { SortingNode } from '../types/sorting-node.js'
+/**
+ * Creates a Map for efficient lookup of node positions in the sorted array.
+ *
+ * Builds an index map that associates each sorting node with its position in
+ * the array. This is used to quickly determine the relative order of nodes
+ * without repeated array searches, improving performance when generating error
+ * messages for incorrectly sorted elements.
+ *
+ * @example
+ *
+ * ```ts
+ * const nodes = [
+ * { name: 'foo', node: fooNode },
+ * { name: 'bar', node: barNode },
+ * { name: 'baz', node: bazNode },
+ * ]
+ * const indexMap = createNodeIndexMap(nodes)
+ * indexMap.get(nodes[0]) // Returns: 0
+ * indexMap.get(nodes[2]) // Returns: 2
+ * ```
+ *
+ * @template Node - Type of the AST node.
+ * @param nodes - Array of sorting nodes in their sorted order.
+ * @returns Map where keys are sorting nodes and values are their indices.
+ */
+export declare function createNodeIndexMap(
+ nodes: SortingNode[],
+): Map
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/create-node-index-map.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/create-node-index-map.js
new file mode 100644
index 0000000000000000000000000000000000000000..2a3bbf814c126b96f48d92e014c23b49e2af5bfd
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/create-node-index-map.js
@@ -0,0 +1,33 @@
+/**
+ * Creates a Map for efficient lookup of node positions in the sorted array.
+ *
+ * Builds an index map that associates each sorting node with its position in
+ * the array. This is used to quickly determine the relative order of nodes
+ * without repeated array searches, improving performance when generating error
+ * messages for incorrectly sorted elements.
+ *
+ * @example
+ *
+ * ```ts
+ * const nodes = [
+ * { name: 'foo', node: fooNode },
+ * { name: 'bar', node: barNode },
+ * { name: 'baz', node: bazNode },
+ * ]
+ * const indexMap = createNodeIndexMap(nodes)
+ * indexMap.get(nodes[0]) // Returns: 0
+ * indexMap.get(nodes[2]) // Returns: 2
+ * ```
+ *
+ * @template Node - Type of the AST node.
+ * @param nodes - Array of sorting nodes in their sorted order.
+ * @returns Map where keys are sorting nodes and values are their indices.
+ */
+function createNodeIndexMap(nodes) {
+ let nodeIndexMap = /* @__PURE__ */ new Map()
+ for (let [index, node] of nodes.entries()) {
+ nodeIndexMap.set(node, index)
+ }
+ return nodeIndexMap
+}
+export { createNodeIndexMap }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/does-custom-group-match.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/does-custom-group-match.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..078c354cdf40adcd47243a3ccaec3db5049ff820
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/does-custom-group-match.d.ts
@@ -0,0 +1,128 @@
+import { AnyOfCustomGroup } from '../types/common-groups-options.js'
+import { RegexOption } from '../types/common-options.js'
+/**
+ * Parameters for testing if an element matches a custom group.
+ *
+ * Contains all the properties of an element that can be used for matching
+ * against custom group criteria.
+ */
+interface DoesCustomGroupMatchParameters {
+ /**
+ * Optional value of the element. Used for matching against
+ * elementValuePattern in custom groups.
+ */
+ elementValue?: string | null
+ /**
+ * Optional list of decorator names applied to the element. Used for
+ * matching against decoratorNamePattern in custom groups.
+ */
+ decoratorNames?: string[]
+ /**
+ * List of modifiers applied to the element (e.g., 'static', 'private',
+ * 'async'). Must include all modifiers specified in the custom group.
+ */
+ modifiers: string[]
+ /**
+ * List of selectors that describe the element type. Used for matching
+ * against the selector field in custom groups.
+ */
+ selectors: string[]
+ /**
+ * Name of the element. Used for matching against elementNamePattern in
+ * custom groups.
+ */
+ elementName: string
+}
+/**
+ * Base structure for a single custom group configuration.
+ *
+ * Defines matching criteria that an element must satisfy to belong to this
+ * custom group. All specified criteria must match for the element to be
+ * considered part of the group.
+ */
+interface BaseCustomGroupMatchOptions {
+ /**
+ * Pattern to match against decorator names. Element must have at least one
+ * decorator matching this pattern.
+ */
+ decoratorNamePattern?: RegexOption
+ /**
+ * Pattern to match against the element's value. Used for matching literal
+ * values, initializers, or expressions.
+ */
+ elementValuePattern?: RegexOption
+ /**
+ * Regular expression pattern to match the element's name. Elements matching
+ * this pattern will be included in this custom group.
+ */
+ elementNamePattern?: RegexOption
+ /**
+ * List of required modifiers. Element must have ALL specified modifiers to
+ * match.
+ */
+ modifiers?: string[]
+ /**
+ * Required selector type. Element must have this exact selector to match.
+ */
+ selector?: string
+}
+/**
+ * Checks whether an element matches the criteria of a custom group.
+ *
+ * Supports both single custom groups and "anyOf" groups (where matching any
+ * subgroup is sufficient). For single groups, all specified criteria must
+ * match. For "anyOf" groups, at least one subgroup must match.
+ *
+ * @example
+ *
+ * ```ts
+ * // Single custom group
+ * doesCustomGroupMatch({
+ * customGroup: {
+ * selector: 'property',
+ * modifiers: ['static'],
+ * elementNamePattern: 'on*',
+ * },
+ * elementName: 'onClick',
+ * selectors: ['property'],
+ * modifiers: ['static', 'readonly'],
+ * elementValue: null,
+ * decoratorNames: [],
+ * })
+ * // Returns: true
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * // AnyOf custom group
+ * doesCustomGroupMatch({
+ * customGroup: {
+ * anyOf: [
+ * { selector: 'method' },
+ * { selector: 'property', modifiers: ['static'] },
+ * ],
+ * },
+ * elementName: 'foo',
+ * selectors: ['method'],
+ * modifiers: [],
+ * elementValue: null,
+ * })
+ * // Returns: true (matches first subgroup)
+ * ```
+ *
+ * @template CustomGroupMatchOptions - Type of custom group match options.
+ * @param props - Combined parameters including the custom group and element
+ * properties.
+ * @returns True if the element matches the custom group criteria, false
+ * otherwise.
+ */
+export declare function doesCustomGroupMatch<
+ CustomGroupMatchOptions extends BaseCustomGroupMatchOptions,
+>(
+ props: {
+ customGroup:
+ AnyOfCustomGroup | CustomGroupMatchOptions
+ } & DoesCustomGroupMatchParameters,
+): boolean
+export {}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/does-custom-group-match.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/does-custom-group-match.js
new file mode 100644
index 0000000000000000000000000000000000000000..e0d0a2bef47fb60235fecff863b17eea6b737881
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/does-custom-group-match.js
@@ -0,0 +1,131 @@
+import { matches } from './matches.js'
+/**
+ * Checks whether an element matches the criteria of a custom group.
+ *
+ * Supports both single custom groups and "anyOf" groups (where matching any
+ * subgroup is sufficient). For single groups, all specified criteria must
+ * match. For "anyOf" groups, at least one subgroup must match.
+ *
+ * @example
+ *
+ * ```ts
+ * // Single custom group
+ * doesCustomGroupMatch({
+ * customGroup: {
+ * selector: 'property',
+ * modifiers: ['static'],
+ * elementNamePattern: 'on*',
+ * },
+ * elementName: 'onClick',
+ * selectors: ['property'],
+ * modifiers: ['static', 'readonly'],
+ * elementValue: null,
+ * decoratorNames: [],
+ * })
+ * // Returns: true
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * // AnyOf custom group
+ * doesCustomGroupMatch({
+ * customGroup: {
+ * anyOf: [
+ * { selector: 'method' },
+ * { selector: 'property', modifiers: ['static'] },
+ * ],
+ * },
+ * elementName: 'foo',
+ * selectors: ['method'],
+ * modifiers: [],
+ * elementValue: null,
+ * })
+ * // Returns: true (matches first subgroup)
+ * ```
+ *
+ * @template CustomGroupMatchOptions - Type of custom group match options.
+ * @param props - Combined parameters including the custom group and element
+ * properties.
+ * @returns True if the element matches the custom group criteria, false
+ * otherwise.
+ */
+function doesCustomGroupMatch(props) {
+ if ('anyOf' in props.customGroup) {
+ return props.customGroup.anyOf.some(subgroup =>
+ doesSingleCustomGroupMatch({
+ ...props,
+ customGroup: subgroup,
+ }),
+ )
+ }
+ return doesSingleCustomGroupMatch({
+ ...props,
+ customGroup: props.customGroup,
+ })
+}
+/**
+ * Checks whether an element matches a single custom group's criteria.
+ *
+ * Tests each criterion in sequence, returning false as soon as any criterion
+ * fails. All specified criteria must match for the function to return true. The
+ * checks are performed in the following order:
+ *
+ * 1. Selector match (exact)
+ * 2. Modifiers match (all required modifiers must be present)
+ * 3. Element name pattern match
+ * 4. Element value pattern match
+ * 5. Decorator name pattern match (at least one decorator must match).
+ *
+ * @param params - Parameters for matching.
+ * @param params.customGroup - Custom group configuration with matching
+ * criteria.
+ * @param params.elementName - Name of the element to test.
+ * @param params.elementValue - Optional value of the element.
+ * @param params.selectors - Element's selectors.
+ * @param params.modifiers - Element's modifiers.
+ * @param params.decoratorNames - Element's decorator names.
+ * @returns True if all specified criteria match, false otherwise.
+ */
+function doesSingleCustomGroupMatch({
+ decoratorNames,
+ elementValue,
+ customGroup,
+ elementName,
+ selectors,
+ modifiers,
+}) {
+ if (customGroup.selector && !selectors?.includes(customGroup.selector)) {
+ return false
+ }
+ if (customGroup.modifiers) {
+ for (let modifier of customGroup.modifiers) {
+ if (!modifiers?.includes(modifier)) {
+ return false
+ }
+ }
+ }
+ if ('elementNamePattern' in customGroup && customGroup.elementNamePattern) {
+ if (!matches(elementName, customGroup.elementNamePattern)) {
+ return false
+ }
+ }
+ if ('elementValuePattern' in customGroup && customGroup.elementValuePattern) {
+ if (!matches(elementValue ?? '', customGroup.elementValuePattern)) {
+ return false
+ }
+ }
+ if (
+ 'decoratorNamePattern' in customGroup &&
+ customGroup.decoratorNamePattern
+ ) {
+ let decoratorPattern = customGroup.decoratorNamePattern
+ if (
+ !decoratorNames?.some(decorator => matches(decorator, decoratorPattern))
+ ) {
+ return false
+ }
+ }
+ return true
+}
+export { doesCustomGroupMatch }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/does-sorting-node-have-one-of-dependency-names.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/does-sorting-node-have-one-of-dependency-names.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..f892c5ad61d75e518c6e5e67f52f68872b8d7d68
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/does-sorting-node-have-one-of-dependency-names.d.ts
@@ -0,0 +1,14 @@
+import { SortingNodeWithDependencies } from './sort-nodes-by-dependencies.js'
+/**
+ * Checks whether the given sorting node has at least one of the given
+ * dependency names.
+ *
+ * @param sortingNode - The sorting node to check.
+ * @param dependencyNames - The dependency names to look for.
+ * @returns True if the sorting node has at least one of the dependency names,
+ * false otherwise.
+ */
+export declare function doesSortingNodeHaveOneOfDependencyNames(
+ sortingNode: Pick,
+ dependencyNames: string[],
+): boolean
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/does-sorting-node-have-one-of-dependency-names.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/does-sorting-node-have-one-of-dependency-names.js
new file mode 100644
index 0000000000000000000000000000000000000000..3078b5fb713c2cd9d68bb7beb60a17ef26ba23b4
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/does-sorting-node-have-one-of-dependency-names.js
@@ -0,0 +1,16 @@
+/**
+ * Checks whether the given sorting node has at least one of the given
+ * dependency names.
+ *
+ * @param sortingNode - The sorting node to check.
+ * @param dependencyNames - The dependency names to look for.
+ * @returns True if the sorting node has at least one of the dependency names,
+ * false otherwise.
+ */
+function doesSortingNodeHaveOneOfDependencyNames(sortingNode, dependencyNames) {
+ let sortingNodeDependencyNames = new Set(sortingNode.dependencyNames)
+ return dependencyNames.some(dependencyName =>
+ sortingNodeDependencyNames.has(dependencyName),
+ )
+}
+export { doesSortingNodeHaveOneOfDependencyNames }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/generate-predefined-groups.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/generate-predefined-groups.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..8cddb792fc32e690dbe12a87ef5c53c6d415a22f
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/generate-predefined-groups.d.ts
@@ -0,0 +1,25 @@
+interface GeneratePredefinedGroupsParameters {
+ cache: Map
+ modifiers: string[]
+ selectors: string[]
+}
+/**
+ * Generates an ordered list of group names associated with the provided
+ * modifiers and selectors. The groups are generated by combining all possible
+ * combinations of modifiers with each selector at the end. Selectors are
+ * prioritized over the quantity of modifiers. For example, `protected abstract
+ * override get fields();` should prioritize the `'get-method'` group over the
+ * `'protected-abstract-override-method'` group.
+ *
+ * @param props - The properties including selectors, modifiers, and cache.
+ * @param props.selectors - The list of selectors.
+ * @param props.modifiers - The list of modifiers.
+ * @param props.cache - Cache to store computed groups.
+ * @returns An array of generated group names.
+ */
+export declare function generatePredefinedGroups({
+ selectors,
+ modifiers,
+ cache,
+}: GeneratePredefinedGroupsParameters): string[]
+export {}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/generate-predefined-groups.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/generate-predefined-groups.js
new file mode 100644
index 0000000000000000000000000000000000000000..226d6fcb824da21672acd92718eab7be999b716c
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/generate-predefined-groups.js
@@ -0,0 +1,75 @@
+import { getArrayCombinations } from './get-array-combinations.js'
+/**
+ * Generates an ordered list of group names associated with the provided
+ * modifiers and selectors. The groups are generated by combining all possible
+ * combinations of modifiers with each selector at the end. Selectors are
+ * prioritized over the quantity of modifiers. For example, `protected abstract
+ * override get fields();` should prioritize the `'get-method'` group over the
+ * `'protected-abstract-override-method'` group.
+ *
+ * @param props - The properties including selectors, modifiers, and cache.
+ * @param props.selectors - The list of selectors.
+ * @param props.modifiers - The list of modifiers.
+ * @param props.cache - Cache to store computed groups.
+ * @returns An array of generated group names.
+ */
+function generatePredefinedGroups({ selectors, modifiers, cache }) {
+ let modifiersAndSelectorsKey = `${modifiers.join('&')}/${selectors.join('&')}`
+ let cachedValue = cache.get(modifiersAndSelectorsKey)
+ if (cachedValue) {
+ return cachedValue
+ }
+ let allModifiersCombinations = []
+ for (let i = modifiers.length; i > 0; i--) {
+ allModifiersCombinations.push(...getArrayCombinations(modifiers, i))
+ }
+ let allModifiersCombinationPermutations = allModifiersCombinations.flatMap(
+ result => getPermutations(result),
+ )
+ let returnValue = []
+ for (let selector of selectors) {
+ returnValue.push(
+ ...allModifiersCombinationPermutations.map(
+ modifiersCombinationPermutation =>
+ [...modifiersCombinationPermutation, selector].join('-'),
+ ),
+ selector,
+ )
+ }
+ cache.set(modifiersAndSelectorsKey, returnValue)
+ return returnValue
+}
+/**
+ * Generates all permutations of an array. This allows variations like
+ * `'abstract-override-protected-get-method'`,
+ * `'override-protected-abstract-get-method'`,
+ * `'protected-abstract-override-get-method'`, etc., to be entered by the user
+ * and always match the same group. Note that this can theoretically cause
+ * performance issues if too many modifiers are entered at once (e.g., 8
+ * modifiers result in 40,320 permutations, 9 in 362,880).
+ *
+ * @param elements - The array of elements to permute.
+ * @returns An array containing all permutations of the input elements.
+ */
+function getPermutations(elements) {
+ let result = []
+ function swapElements(indexA, indexB) {
+ let temporaryElement = elements[indexA]
+ elements[indexA] = elements[indexB]
+ elements[indexB] = temporaryElement
+ }
+ function backtrack(first) {
+ if (first === elements.length) {
+ result.push([...elements])
+ return
+ }
+ for (let i = first; i < elements.length; i++) {
+ swapElements(first, i)
+ backtrack(first + 1)
+ swapElements(first, i)
+ }
+ }
+ backtrack(0)
+ return result
+}
+export { generatePredefinedGroups }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-array-combinations.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-array-combinations.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..57d8fa17270ebde56df9290cd68d788e41abdfb6
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-array-combinations.d.ts
@@ -0,0 +1,11 @@
+/**
+ * Generates all possible combinations of a specific size from an array.
+ *
+ * @param array - The array of strings to generate combinations from.
+ * @param number - The number of elements in each combination.
+ * @returns An array containing all possible combinations.
+ */
+export declare function getArrayCombinations(
+ array: string[],
+ number: number,
+): string[][]
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-array-combinations.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-array-combinations.js
new file mode 100644
index 0000000000000000000000000000000000000000..25fc691e92acf8aa738019e48ce9cc4c0c42f454
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-array-combinations.js
@@ -0,0 +1,24 @@
+/**
+ * Generates all possible combinations of a specific size from an array.
+ *
+ * @param array - The array of strings to generate combinations from.
+ * @param number - The number of elements in each combination.
+ * @returns An array containing all possible combinations.
+ */
+function getArrayCombinations(array, number) {
+ let result = []
+ function backtrack(start, comb) {
+ if (comb.length === number) {
+ result.push([...comb])
+ return
+ }
+ for (let i = start; i < array.length; i++) {
+ comb.push(array[i])
+ backtrack(i + 1, comb)
+ comb.pop()
+ }
+ }
+ backtrack(0, [])
+ return result
+}
+export { getArrayCombinations }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-comment-above-that-should-exist.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-comment-above-that-should-exist.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..a827db7d781e1ccac4464ec0ff3792c37a134139
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-comment-above-that-should-exist.d.ts
@@ -0,0 +1,88 @@
+import { TSESLint } from '@typescript-eslint/utils'
+import { CommonGroupsOptions } from '../types/common-groups-options.js'
+import { SortingNode } from '../types/sorting-node.js'
+/**
+ * Parameters for checking if a required comment above a node exists.
+ *
+ * @template T - Type of the sorting node.
+ */
+interface GetCommentAboveMissingParameters {
+ /**
+ * Configuration options for grouping.
+ */
+ options: Pick<
+ CommonGroupsOptions,
+ 'customGroups' | 'groups'
+ >
+ /**
+ * ESLint source code object for accessing comments.
+ */
+ sourceCode: TSESLint.SourceCode
+ /**
+ * Index of the group on the left side (previous element). Null if there is
+ * no previous element.
+ */
+ leftGroupIndex: number | null
+ /**
+ * Index of the group on the right side (current element).
+ */
+ rightGroupIndex: number
+ /**
+ * The sorting node to check for required comments above.
+ */
+ sortingNode: T
+}
+/**
+ * Determines if a comment should exist above a node when transitioning between
+ * groups.
+ *
+ * Checks if the group configuration requires a comment above nodes when they
+ * are the first element of their group following a different group. This is
+ * used to enforce comment separators between different sections of sorted
+ * code.
+ *
+ * The function returns null if:
+ *
+ * - The left and right elements are in the same or reversed group order
+ * - The group configuration doesn't require a comment above.
+ *
+ * @example
+ *
+ * ```ts
+ * const result = getCommentAboveThatShouldExist({
+ * options: {
+ * groups: [
+ * 'external',
+ * { commentAbove: 'Internal imports' },
+ * 'internal',
+ * ],
+ * },
+ * leftGroupIndex: 0, // 'external' group
+ * rightGroupIndex: 2, // 'internal' group
+ * sortingNode: internalImportNode,
+ * sourceCode,
+ * })
+ * // Returns: { comment: 'Internal imports', exists: false }
+ * ```
+ *
+ * @template T - Type of the sorting node.
+ * @param params - Parameters for checking comment requirements.
+ * @param params.options - Configuration with groups that may require comments.
+ * @param params.leftGroupIndex - Index of the previous element's group.
+ * @param params.rightGroupIndex - Index of the current element's group.
+ * @param params.sortingNode - Node to check for required comments.
+ * @param params.sourceCode - ESLint source code for accessing comments.
+ * @returns Object with required comment text and existence status, or null if
+ * no comment required.
+ */
+export declare function getCommentAboveThatShouldExist({
+ rightGroupIndex,
+ leftGroupIndex,
+ sortingNode,
+ sourceCode,
+ options,
+}: GetCommentAboveMissingParameters): {
+ comment: string
+ exists: boolean
+} | null
+export {}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-comment-above-that-should-exist.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-comment-above-that-should-exist.js
new file mode 100644
index 0000000000000000000000000000000000000000..7e49150d277a2e09b7b8b63ce504ef971427c3fc
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-comment-above-that-should-exist.js
@@ -0,0 +1,75 @@
+import { isGroupWithOverridesOption } from './is-group-with-overrides-option.js'
+import { getCommentsBefore } from './get-comments-before.js'
+/**
+ * Determines if a comment should exist above a node when transitioning between
+ * groups.
+ *
+ * Checks if the group configuration requires a comment above nodes when they
+ * are the first element of their group following a different group. This is
+ * used to enforce comment separators between different sections of sorted
+ * code.
+ *
+ * The function returns null if:
+ *
+ * - The left and right elements are in the same or reversed group order
+ * - The group configuration doesn't require a comment above.
+ *
+ * @example
+ *
+ * ```ts
+ * const result = getCommentAboveThatShouldExist({
+ * options: {
+ * groups: [
+ * 'external',
+ * { commentAbove: 'Internal imports' },
+ * 'internal',
+ * ],
+ * },
+ * leftGroupIndex: 0, // 'external' group
+ * rightGroupIndex: 2, // 'internal' group
+ * sortingNode: internalImportNode,
+ * sourceCode,
+ * })
+ * // Returns: { comment: 'Internal imports', exists: false }
+ * ```
+ *
+ * @template T - Type of the sorting node.
+ * @param params - Parameters for checking comment requirements.
+ * @param params.options - Configuration with groups that may require comments.
+ * @param params.leftGroupIndex - Index of the previous element's group.
+ * @param params.rightGroupIndex - Index of the current element's group.
+ * @param params.sortingNode - Node to check for required comments.
+ * @param params.sourceCode - ESLint source code for accessing comments.
+ * @returns Object with required comment text and existence status, or null if
+ * no comment required.
+ */
+function getCommentAboveThatShouldExist({
+ rightGroupIndex,
+ leftGroupIndex,
+ sortingNode,
+ sourceCode,
+ options,
+}) {
+ if (leftGroupIndex !== null && leftGroupIndex >= rightGroupIndex) {
+ return null
+ }
+ let rightGroup = options.groups[rightGroupIndex]
+ if (!rightGroup || !isGroupWithOverridesOption(rightGroup)) {
+ return null
+ }
+ let rightGroupCommentAbove = rightGroup.commentAbove
+ if (!rightGroupCommentAbove) {
+ return null
+ }
+ return {
+ comment: rightGroupCommentAbove,
+ exists: !!getCommentsBefore({
+ node: sortingNode.node,
+ sourceCode,
+ }).find(comment => commentMatches(comment.value, rightGroupCommentAbove)),
+ }
+}
+function commentMatches(comment, expected) {
+ return comment.toLowerCase().includes(expected.toLowerCase().trim())
+}
+export { getCommentAboveThatShouldExist }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-comments-before.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-comments-before.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..6e4b999feda76a28f69898936af1e1e6fb4dfd11
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-comments-before.d.ts
@@ -0,0 +1,24 @@
+import { TSESLint } from '@typescript-eslint/utils'
+import { TSESTree } from '@typescript-eslint/types'
+interface GetCommentsBeforeParameters {
+ tokenValueToIgnoreBefore?: string
+ sourceCode: TSESLint.SourceCode
+ node: TSESTree.Node
+}
+/**
+ * Returns a list of comments before a given node, excluding ones that are right
+ * after code. Includes comment blocks, ignore shebang comments.
+ *
+ * @param params - Parameters object.
+ * @param params.node - The node to get comments before.
+ * @param params.sourceCode - The source code object.
+ * @param [params.tokenValueToIgnoreBefore] - Allows the following token to
+ * directly precede the node.
+ * @returns An array of comments before the given node.
+ */
+export declare function getCommentsBefore({
+ tokenValueToIgnoreBefore,
+ sourceCode,
+ node,
+}: GetCommentsBeforeParameters): TSESTree.Comment[]
+export {}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-comments-before.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-comments-before.js
new file mode 100644
index 0000000000000000000000000000000000000000..95ce1dccadbc2898e3de684b6a26a42a40e0c7e6
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-comments-before.js
@@ -0,0 +1,37 @@
+/**
+ * Returns a list of comments before a given node, excluding ones that are right
+ * after code. Includes comment blocks, ignore shebang comments.
+ *
+ * @param params - Parameters object.
+ * @param params.node - The node to get comments before.
+ * @param params.sourceCode - The source code object.
+ * @param [params.tokenValueToIgnoreBefore] - Allows the following token to
+ * directly precede the node.
+ * @returns An array of comments before the given node.
+ */
+function getCommentsBefore({ tokenValueToIgnoreBefore, sourceCode, node }) {
+ let commentsBefore = getRelevantCommentsBeforeNodeOrToken(sourceCode, node)
+ let tokenBeforeNode = sourceCode.getTokenBefore(node)
+ if (
+ !tokenValueToIgnoreBefore ||
+ commentsBefore.length > 0 ||
+ tokenBeforeNode?.value !== tokenValueToIgnoreBefore
+ ) {
+ return commentsBefore
+ }
+ return getRelevantCommentsBeforeNodeOrToken(sourceCode, tokenBeforeNode)
+}
+function getRelevantCommentsBeforeNodeOrToken(source, node) {
+ return source
+ .getCommentsBefore(node)
+ .filter(comment => !isShebangComment(comment))
+ .filter(comment => {
+ return (
+ source.getTokenBefore(comment)?.loc.end.line !== comment.loc.start.line
+ )
+ })
+}
+function isShebangComment(comment) {
+ return comment.type === 'Shebang' || comment.type === 'Hashbang'
+}
+export { getCommentsBefore }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-decorator-name.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-decorator-name.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..a37d1d2c222f6f92b6e5f851125487fcc9168c13
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-decorator-name.d.ts
@@ -0,0 +1,45 @@
+import { TSESTree } from '@typescript-eslint/types'
+import { TSESLint } from '@typescript-eslint/utils'
+/**
+ * Extracts the name of a decorator from its AST node.
+ *
+ * Processes the decorator text to extract just the name portion, removing the
+ * '@' prefix if present and any parameters or arguments that follow the name.
+ * This is useful for sorting and matching decorators by their base name.
+ *
+ * @example
+ *
+ * ```ts
+ * // Simple decorator
+ * getDecoratorName({ sourceCode, decorator: @Component });
+ * // Returns: 'Component'
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * // Decorator with parameters
+ * getDecoratorName({ sourceCode, decorator: @Injectable({ providedIn: 'root' }) });
+ * // Returns: 'Injectable'
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * // Namespaced decorator
+ * getDecoratorName({ sourceCode, decorator: @angular.Component() });
+ * // Returns: 'angular.Component'
+ * ```
+ *
+ * @param params - Parameters object.
+ * @param params.sourceCode - ESLint source code object for text extraction.
+ * @param params.decorator - Decorator AST node to extract name from.
+ * @returns The decorator name without '@' prefix and parameters.
+ */
+export declare function getDecoratorName({
+ sourceCode,
+ decorator,
+}: {
+ sourceCode: TSESLint.SourceCode
+ decorator: TSESTree.Decorator
+}): string
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-decorator-name.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-decorator-name.js
new file mode 100644
index 0000000000000000000000000000000000000000..5c81500df23b13267bb4024c2d148dbdc4773919
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-decorator-name.js
@@ -0,0 +1,44 @@
+/**
+ * Extracts the name of a decorator from its AST node.
+ *
+ * Processes the decorator text to extract just the name portion, removing the
+ * '@' prefix if present and any parameters or arguments that follow the name.
+ * This is useful for sorting and matching decorators by their base name.
+ *
+ * @example
+ *
+ * ```ts
+ * // Simple decorator
+ * getDecoratorName({ sourceCode, decorator: @Component });
+ * // Returns: 'Component'
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * // Decorator with parameters
+ * getDecoratorName({ sourceCode, decorator: @Injectable({ providedIn: 'root' }) });
+ * // Returns: 'Injectable'
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * // Namespaced decorator
+ * getDecoratorName({ sourceCode, decorator: @angular.Component() });
+ * // Returns: 'angular.Component'
+ * ```
+ *
+ * @param params - Parameters object.
+ * @param params.sourceCode - ESLint source code object for text extraction.
+ * @param params.decorator - Decorator AST node to extract name from.
+ * @returns The decorator name without '@' prefix and parameters.
+ */
+function getDecoratorName({ sourceCode, decorator }) {
+ let fullName = sourceCode.getText(decorator)
+ if (fullName.startsWith('@')) {
+ fullName = fullName.slice(1)
+ }
+ return fullName.split('(', 1)[0]
+}
+export { getDecoratorName }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-enum-members.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-enum-members.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..04fbb96b853d9f9b54e856260246ebd06e72e1bb
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-enum-members.d.ts
@@ -0,0 +1,28 @@
+import { TSESTree } from '@typescript-eslint/types'
+/**
+ * Retrieves enum members from a TypeScript enum declaration node.
+ *
+ * Handles AST shape changes in TS-ESTree `@typescript-eslint/types`:
+ *
+ * - Newer parser versions wrap enum members in `body.members` and deprecate
+ * `members` on the enum node.
+ * - Older parser versions expose members directly on the enum node as `members`.
+ * The fallback keeps backward compatibility with older parser releases.
+ *
+ * @example
+ *
+ * ```ts
+ * enum Color {
+ * Red = 'RED',
+ * Green = 'GREEN',
+ * Blue = 'BLUE',
+ * }
+ * // Returns array of three TSEnumMember nodes
+ * ```
+ *
+ * @param value - TypeScript enum declaration AST node.
+ * @returns Array of enum member nodes.
+ */
+export declare function getEnumMembers(
+ value: TSESTree.TSEnumDeclaration,
+): TSESTree.TSEnumMember[]
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-enum-members.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-enum-members.js
new file mode 100644
index 0000000000000000000000000000000000000000..242bea427cc82b52a6b7fe9fa6aac825b61430bf
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-enum-members.js
@@ -0,0 +1,28 @@
+/**
+ * Retrieves enum members from a TypeScript enum declaration node.
+ *
+ * Handles AST shape changes in TS-ESTree `@typescript-eslint/types`:
+ *
+ * - Newer parser versions wrap enum members in `body.members` and deprecate
+ * `members` on the enum node.
+ * - Older parser versions expose members directly on the enum node as `members`.
+ * The fallback keeps backward compatibility with older parser releases.
+ *
+ * @example
+ *
+ * ```ts
+ * enum Color {
+ * Red = 'RED',
+ * Green = 'GREEN',
+ * Blue = 'BLUE',
+ * }
+ * // Returns array of three TSEnumMember nodes
+ * ```
+ *
+ * @param value - TypeScript enum declaration AST node.
+ * @returns Array of enum member nodes.
+ */
+function getEnumMembers(value) {
+ return value.body?.members ?? value.members
+}
+export { getEnumMembers }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-eslint-disabled-lines.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-eslint-disabled-lines.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..eeb48eb694f9d9fb15a87e00614a18b05d35897d
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-eslint-disabled-lines.d.ts
@@ -0,0 +1,47 @@
+import { TSESLint } from '@typescript-eslint/utils'
+/**
+ * Determines which lines have the specified ESLint rule disabled via comments.
+ *
+ * Parses ESLint disable comments in the source code to identify lines where a
+ * specific rule should not be enforced. Handles all ESLint disable directives:
+ *
+ * - `eslint-disable-next-line` - Disables the rule for the next line
+ * - `eslint-disable-line` - Disables the rule for the current line
+ * - `eslint-disable` - Disables the rule from this point forward
+ * - `eslint-enable` - Re-enables the rule after a previous disable.
+ *
+ * The function correctly handles:
+ *
+ * - Rule-specific disables (e.g., `eslint-disable-next-line rule-name`)
+ * - Global disables (e.g., `eslint-disable-next-line` without specific rules)
+ * - Nested disable/enable pairs.
+ *
+ * @example
+ *
+ * ```ts
+ * // Source code with disable comments:
+ * // eslint-disable-next-line perfectionist/sort-imports
+ * import { z } from 'zod'
+ * import { a } from 'a'
+ *
+ * // eslint-disable perfectionist/sort-imports
+ * import { y } from 'y'
+ * import { b } from 'b'
+ * // eslint-enable perfectionist/sort-imports
+ *
+ * getEslintDisabledLines({
+ * sourceCode,
+ * ruleName: 'perfectionist/sort-imports',
+ * })
+ * // Returns: [2, 5, 6] (lines where the rule is disabled)
+ * ```
+ *
+ * @param props - Configuration object.
+ * @param props.sourceCode - ESLint source code object containing comments.
+ * @param props.ruleName - Name of the rule to check for disable directives.
+ * @returns Array of line numbers (1-indexed) where the rule is disabled.
+ */
+export declare function getEslintDisabledLines(props: {
+ sourceCode: TSESLint.SourceCode
+ ruleName: string
+}): number[]
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-eslint-disabled-lines.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-eslint-disabled-lines.js
new file mode 100644
index 0000000000000000000000000000000000000000..b0070d4166d456fd7c252444106766aa4a5f1729
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-eslint-disabled-lines.js
@@ -0,0 +1,113 @@
+import { UnreachableCaseError } from './unreachable-case-error.js'
+import { getEslintDisabledRules } from './get-eslint-disabled-rules.js'
+/**
+ * Determines which lines have the specified ESLint rule disabled via comments.
+ *
+ * Parses ESLint disable comments in the source code to identify lines where a
+ * specific rule should not be enforced. Handles all ESLint disable directives:
+ *
+ * - `eslint-disable-next-line` - Disables the rule for the next line
+ * - `eslint-disable-line` - Disables the rule for the current line
+ * - `eslint-disable` - Disables the rule from this point forward
+ * - `eslint-enable` - Re-enables the rule after a previous disable.
+ *
+ * The function correctly handles:
+ *
+ * - Rule-specific disables (e.g., `eslint-disable-next-line rule-name`)
+ * - Global disables (e.g., `eslint-disable-next-line` without specific rules)
+ * - Nested disable/enable pairs.
+ *
+ * @example
+ *
+ * ```ts
+ * // Source code with disable comments:
+ * // eslint-disable-next-line perfectionist/sort-imports
+ * import { z } from 'zod'
+ * import { a } from 'a'
+ *
+ * // eslint-disable perfectionist/sort-imports
+ * import { y } from 'y'
+ * import { b } from 'b'
+ * // eslint-enable perfectionist/sort-imports
+ *
+ * getEslintDisabledLines({
+ * sourceCode,
+ * ruleName: 'perfectionist/sort-imports',
+ * })
+ * // Returns: [2, 5, 6] (lines where the rule is disabled)
+ * ```
+ *
+ * @param props - Configuration object.
+ * @param props.sourceCode - ESLint source code object containing comments.
+ * @param props.ruleName - Name of the rule to check for disable directives.
+ * @returns Array of line numbers (1-indexed) where the rule is disabled.
+ */
+function getEslintDisabledLines(props) {
+ let { sourceCode, ruleName } = props
+ let returnValue = []
+ let lineRulePermanentlyDisabled = null
+ for (let comment of sourceCode.getAllComments()) {
+ let eslintDisabledRules = getEslintDisabledRules(comment.value)
+ if (!eslintDisabledRules) {
+ continue
+ }
+ /* v8 ignore next 3 -- @preserve Hard to test this false branch. */
+ if (!(
+ eslintDisabledRules.rules === 'all' ||
+ eslintDisabledRules.rules.includes(ruleName)
+ )) {
+ continue
+ }
+ switch (eslintDisabledRules.eslintDisableDirective) {
+ case 'eslint-disable-next-line':
+ returnValue.push(comment.loc.end.line + 1)
+ continue
+ case 'eslint-disable-line':
+ returnValue.push(comment.loc.start.line)
+ continue
+ case 'eslint-disable':
+ lineRulePermanentlyDisabled ??= comment.loc.start.line
+ break
+ case 'eslint-enable':
+ /* v8 ignore next -- @preserve Hard to cover in test without raising another ESLint error. */
+ if (!lineRulePermanentlyDisabled) {
+ continue
+ }
+ returnValue.push(
+ ...createArrayFromTo(
+ lineRulePermanentlyDisabled + 1,
+ comment.loc.start.line,
+ ),
+ )
+ lineRulePermanentlyDisabled = null
+ break
+ /* v8 ignore next 2 -- @preserve Exhaustive guard. */
+ default:
+ throw new UnreachableCaseError(
+ eslintDisabledRules.eslintDisableDirective,
+ )
+ }
+ }
+ return returnValue
+}
+/**
+ * Creates an array of consecutive integers from start to end (inclusive).
+ *
+ * Helper function to generate an array of line numbers for ranges disabled by
+ * eslint-disable/eslint-enable comment pairs.
+ *
+ * @example
+ *
+ * ```ts
+ * createArrayFromTo(5, 8)
+ * // Returns: [5, 6, 7, 8]
+ * ```
+ *
+ * @param i - Starting number (inclusive).
+ * @param index - Ending number (inclusive).
+ * @returns Array of consecutive integers from i to index.
+ */
+function createArrayFromTo(i, index) {
+ return Array.from({ length: index - i + 1 }, (_, item) => i + item)
+}
+export { getEslintDisabledLines }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-eslint-disabled-rules.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-eslint-disabled-rules.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..6655944de4136dcef8b9bb50b58cfaee28690a33
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-eslint-disabled-rules.d.ts
@@ -0,0 +1,57 @@
+/**
+ * Array of all ESLint disable directive types. Used to identify and parse
+ * ESLint disable comments in source code.
+ */
+declare let eslintDisableDirectives: readonly [
+ 'eslint-disable',
+ 'eslint-enable',
+ 'eslint-disable-line',
+ 'eslint-disable-next-line',
+]
+/**
+ * Type representing one of the ESLint disable directive types. Can be
+ * 'eslint-disable', 'eslint-enable', 'eslint-disable-line', or
+ * 'eslint-disable-next-line'.
+ */
+type EslintDisableDirective = (typeof eslintDisableDirectives)[number]
+/**
+ * Parses an ESLint disable comment to extract the directive type and affected
+ * rules.
+ *
+ * Analyzes comment text to determine if it contains an ESLint disable directive
+ * and which rules are affected. Returns null if the comment is not a valid
+ * ESLint disable directive.
+ *
+ * @example
+ *
+ * ```ts
+ * getEslintDisabledRules('eslint-disable')
+ * // Returns: { eslintDisableDirective: 'eslint-disable', rules: 'all' }
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * getEslintDisabledRules('eslint-disable-next-line no-console, no-alert')
+ * // Returns: {
+ * // eslintDisableDirective: 'eslint-disable-next-line',
+ * // rules: ['no-console', 'no-alert']
+ * // }
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * getEslintDisabledRules('regular comment')
+ * // Returns: null
+ * ```
+ *
+ * @param comment - Comment text to parse (without comment delimiters).
+ * @returns Object containing directive type and affected rules, or null if not
+ * a disable comment.
+ */
+export declare function getEslintDisabledRules(comment: string): {
+ eslintDisableDirective: EslintDisableDirective
+ rules: string[] | 'all'
+} | null
+export {}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-eslint-disabled-rules.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-eslint-disabled-rules.js
new file mode 100644
index 0000000000000000000000000000000000000000..c10d8e6653011a82cefb75fd3d71586a2d0b6c36
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-eslint-disabled-rules.js
@@ -0,0 +1,116 @@
+/**
+ * Array of all ESLint disable directive types. Used to identify and parse
+ * ESLint disable comments in source code.
+ */
+var eslintDisableDirectives = [
+ 'eslint-disable',
+ 'eslint-enable',
+ 'eslint-disable-line',
+ 'eslint-disable-next-line',
+]
+/**
+ * Parses an ESLint disable comment to extract the directive type and affected
+ * rules.
+ *
+ * Analyzes comment text to determine if it contains an ESLint disable directive
+ * and which rules are affected. Returns null if the comment is not a valid
+ * ESLint disable directive.
+ *
+ * @example
+ *
+ * ```ts
+ * getEslintDisabledRules('eslint-disable')
+ * // Returns: { eslintDisableDirective: 'eslint-disable', rules: 'all' }
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * getEslintDisabledRules('eslint-disable-next-line no-console, no-alert')
+ * // Returns: {
+ * // eslintDisableDirective: 'eslint-disable-next-line',
+ * // rules: ['no-console', 'no-alert']
+ * // }
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * getEslintDisabledRules('regular comment')
+ * // Returns: null
+ * ```
+ *
+ * @param comment - Comment text to parse (without comment delimiters).
+ * @returns Object containing directive type and affected rules, or null if not
+ * a disable comment.
+ */
+function getEslintDisabledRules(comment) {
+ for (let eslintDisableDirective of eslintDisableDirectives) {
+ let disabledRules = getEslintDisabledRulesByType(
+ comment,
+ eslintDisableDirective,
+ )
+ if (disabledRules) {
+ return {
+ eslintDisableDirective,
+ rules: disabledRules,
+ }
+ }
+ }
+ return null
+}
+/**
+ * Extracts disabled rules from a comment for a specific ESLint directive type.
+ *
+ * Attempts to parse the comment as the specified ESLint disable directive.
+ * Returns the list of disabled rules if the comment matches the directive,
+ * 'all' if no specific rules are mentioned (global disable), or null if the
+ * comment doesn't match the directive pattern.
+ *
+ * @example
+ *
+ * ```ts
+ * getEslintDisabledRulesByType('eslint-disable', 'eslint-disable')
+ * // Returns: 'all'
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * getEslintDisabledRulesByType(
+ * 'eslint-disable-line rule1, rule2',
+ * 'eslint-disable-line',
+ * )
+ * // Returns: ['rule1', 'rule2']
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * getEslintDisabledRulesByType(
+ * 'eslint-disable-line rule1',
+ * 'eslint-disable-next-line',
+ * )
+ * // Returns: null (wrong directive type)
+ * ```
+ *
+ * @param comment - Comment text to parse.
+ * @param eslintDisableDirective - Specific directive type to match against.
+ * @returns Array of rule names, 'all' for global disable, or null if no match.
+ */
+function getEslintDisabledRulesByType(comment, eslintDisableDirective) {
+ let trimmedCommentValue = comment.trim()
+ if (eslintDisableDirective === trimmedCommentValue) {
+ return 'all'
+ }
+ let regexp = new RegExp(String.raw`^${eslintDisableDirective} ((?:.|\s)*)$`)
+ let disableRulesMatchValue = trimmedCommentValue.match(regexp)?.[1]
+ if (!disableRulesMatchValue) {
+ return null
+ }
+ return disableRulesMatchValue
+ .split(',')
+ .map(rule => rule.trim())
+ .filter(rule => !!rule)
+}
+export { getEslintDisabledRules }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-group-index.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-group-index.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..48b523fdc7cff8bed1f75780a4fcfa8630d6b043
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-group-index.d.ts
@@ -0,0 +1,41 @@
+import { GroupsOptions } from '../types/common-groups-options.js'
+import { SortingNode } from '../types/sorting-node.js'
+/**
+ * Type representing a single group or an array of group names. Used in group
+ * configuration where elements can belong to multiple subgroups.
+ */
+type Group = GroupsOptions[number]
+/**
+ * Determines the index of the group that a node belongs to.
+ *
+ * Searches through the groups array to find which group contains the node.
+ * Supports simple groups (string), subgroups (array of strings) and objects
+ * containing a `group` property. For subgroups, the node matches if its group
+ * is any element in the array.
+ *
+ * The function returns the index of the matching group. If no group matches, it
+ * returns the length of the groups array, which conventionally represents the
+ * "unknown" group and ensures such nodes are sorted last.
+ *
+ * @example
+ *
+ * ```ts
+ * const groups = ['imports', ['types', 'interfaces'], 'functions']
+ * const node1 = { group: 'imports', name: 'lodash' }
+ * const node2 = { group: 'types', name: 'User' }
+ * const node3 = { group: 'unknown-group', name: 'misc' }
+ *
+ * getGroupIndex(groups, node1) // Returns: 0
+ * getGroupIndex(groups, node2) // Returns: 1 (matches subgroup)
+ * getGroupIndex(groups, node3) // Returns: 3 (groups.length, unknown group)
+ * ```
+ *
+ * @param groups - Array of group configurations (strings or arrays of strings).
+ * @param node - Sorting node with a group property to match.
+ * @returns Index of the matching group, or groups.length if no match found.
+ */
+export declare function getGroupIndex(
+ groups: Group[],
+ node: SortingNode,
+): number
+export {}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-group-index.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-group-index.js
new file mode 100644
index 0000000000000000000000000000000000000000..a5d3659202f603abf8a8bd7b5952ed846385d8de
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-group-index.js
@@ -0,0 +1,62 @@
+import { isGroupWithOverridesOption } from './is-group-with-overrides-option.js'
+import { isNewlinesBetweenOption } from './is-newlines-between-option.js'
+import { UnreachableCaseError } from './unreachable-case-error.js'
+/**
+ * Determines the index of the group that a node belongs to.
+ *
+ * Searches through the groups array to find which group contains the node.
+ * Supports simple groups (string), subgroups (array of strings) and objects
+ * containing a `group` property. For subgroups, the node matches if its group
+ * is any element in the array.
+ *
+ * The function returns the index of the matching group. If no group matches, it
+ * returns the length of the groups array, which conventionally represents the
+ * "unknown" group and ensures such nodes are sorted last.
+ *
+ * @example
+ *
+ * ```ts
+ * const groups = ['imports', ['types', 'interfaces'], 'functions']
+ * const node1 = { group: 'imports', name: 'lodash' }
+ * const node2 = { group: 'types', name: 'User' }
+ * const node3 = { group: 'unknown-group', name: 'misc' }
+ *
+ * getGroupIndex(groups, node1) // Returns: 0
+ * getGroupIndex(groups, node2) // Returns: 1 (matches subgroup)
+ * getGroupIndex(groups, node3) // Returns: 3 (groups.length, unknown group)
+ * ```
+ *
+ * @param groups - Array of group configurations (strings or arrays of strings).
+ * @param node - Sorting node with a group property to match.
+ * @returns Index of the matching group, or groups.length if no match found.
+ */
+function getGroupIndex(groups, node) {
+ for (let max = groups.length, i = 0; i < max; i++) {
+ let currentGroup = groups[i]
+ if (doesGroupMatch(currentGroup, node.group)) {
+ return i
+ }
+ }
+ return groups.length
+}
+function doesGroupMatch(group, groupName) {
+ if (typeof group === 'string' || Array.isArray(group)) {
+ return doesStringGroupMatch(group, groupName)
+ }
+ if (isGroupWithOverridesOption(group)) {
+ return doesStringGroupMatch(group.group, groupName)
+ }
+ /* v8 ignore else -- @preserve Exhaustive guard: other directives are filtered out earlier. */
+ if (isNewlinesBetweenOption(group)) {
+ return false
+ }
+ /* v8 ignore next -- @preserve Exhaustive guard: other directives are filtered out earlier. */
+ throw new UnreachableCaseError(group)
+}
+function doesStringGroupMatch(group, groupName) {
+ if (typeof group === 'string') {
+ return group === groupName
+ }
+ return group.includes(groupName)
+}
+export { getGroupIndex }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-lines-between.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-lines-between.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..a4a4fab6117eae253f1e17714ec092092cb56dea
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-lines-between.d.ts
@@ -0,0 +1,44 @@
+import { TSESLint } from '@typescript-eslint/utils'
+import { SortingNode } from '../types/sorting-node.js'
+/**
+ * Counts the number of empty lines between two AST nodes.
+ *
+ * Extracts the lines between the end of the left node and the start of the
+ * right node, then counts only the completely empty lines (containing only
+ * whitespace). This is used to determine if nodes are separated by newlines and
+ * to enforce newline formatting rules.
+ *
+ * @example
+ *
+ * ```ts
+ * // Source code:
+ * // const a = 1;
+ * //
+ * // const b = 2;
+ *
+ * getLinesBetween(sourceCode, nodeA, nodeB)
+ * // Returns: 1 (one empty line between nodes)
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * // Source code:
+ * // const a = 1;
+ * // // comment
+ * // const b = 2;
+ *
+ * getLinesBetween(sourceCode, nodeA, nodeB)
+ * // Returns: 0 (no empty lines, comment line is not empty)
+ * ```
+ *
+ * @param source - ESLint source code object containing the lines array.
+ * @param left - Node or object containing the left/first node.
+ * @param right - Node or object containing the right/second node.
+ * @returns Number of empty lines between the two nodes.
+ */
+export declare function getLinesBetween(
+ source: TSESLint.SourceCode,
+ left: Pick,
+ right: Pick,
+): number
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-lines-between.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-lines-between.js
new file mode 100644
index 0000000000000000000000000000000000000000..8949b853aa9244c0d5a11d52583ee9ba836a718f
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-lines-between.js
@@ -0,0 +1,43 @@
+/**
+ * Counts the number of empty lines between two AST nodes.
+ *
+ * Extracts the lines between the end of the left node and the start of the
+ * right node, then counts only the completely empty lines (containing only
+ * whitespace). This is used to determine if nodes are separated by newlines and
+ * to enforce newline formatting rules.
+ *
+ * @example
+ *
+ * ```ts
+ * // Source code:
+ * // const a = 1;
+ * //
+ * // const b = 2;
+ *
+ * getLinesBetween(sourceCode, nodeA, nodeB)
+ * // Returns: 1 (one empty line between nodes)
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * // Source code:
+ * // const a = 1;
+ * // // comment
+ * // const b = 2;
+ *
+ * getLinesBetween(sourceCode, nodeA, nodeB)
+ * // Returns: 0 (no empty lines, comment line is not empty)
+ * ```
+ *
+ * @param source - ESLint source code object containing the lines array.
+ * @param left - Node or object containing the left/first node.
+ * @param right - Node or object containing the right/second node.
+ * @returns Number of empty lines between the two nodes.
+ */
+function getLinesBetween(source, left, right) {
+ return source.lines
+ .slice(left.node.loc.end.line, right.node.loc.start.line - 1)
+ .filter(line => line.trim().length === 0).length
+}
+export { getLinesBetween }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-newlines-between-errors.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-newlines-between-errors.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..320be66b350621772e0b998b118b2508941970d6
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-newlines-between-errors.d.ts
@@ -0,0 +1,126 @@
+import { TSESLint } from '@typescript-eslint/utils'
+import {
+ NewlinesBetweenOption,
+ CommonGroupsOptions,
+} from '../types/common-groups-options.js'
+import { SortingNode } from '../types/sorting-node.js'
+/**
+ * Function type for customizing newlines between specific nodes.
+ *
+ * Allows overriding the computed newlines requirement based on the specific
+ * nodes being compared. Can return 'ignore' to skip newline checking or a
+ * number to specify exact newlines required.
+ *
+ * @template T - Type of the sorting node.
+ * @param props - Properties for computing newlines.
+ * @param props.computedNewlinesBetween - Default computed newlines requirement.
+ * @param props.left - Left/first node.
+ * @param props.right - Right/second node.
+ * @returns Number of required newlines or 'ignore' to skip checking.
+ */
+export type NewlinesBetweenValueGetter = (props: {
+ computedNewlinesBetween: NewlinesBetweenOption
+ right: T
+ left: T
+}) => NewlinesBetweenOption
+/**
+ * Parameters for checking newlines between nodes and generating errors.
+ *
+ * @template MessageIds - Type of error message identifiers.
+ * @template T - Type of the sorting node.
+ */
+interface GetNewlinesBetweenErrorsParameters<
+ MessageIds extends string,
+ T extends SortingNode,
+> {
+ /**
+ * Optional function to customize newlines between specific nodes.
+ */
+ newlinesBetweenValueGetter?: NewlinesBetweenValueGetter
+ /**
+ * Configuration options for newlines and groups.
+ */
+ options: CommonGroupsOptions
+ /**
+ * ESLint source code object for accessing lines.
+ */
+ sourceCode: TSESLint.SourceCode
+ /**
+ * Error message ID for missing required newlines.
+ */
+ missedSpacingError: MessageIds
+ /**
+ * Error message ID for extra unwanted newlines.
+ */
+ extraSpacingError: MessageIds
+ /**
+ * Group index of the right/second node.
+ */
+ rightGroupIndex: number
+ /**
+ * Group index of the left/first node.
+ */
+ leftGroupIndex: number
+ /**
+ * Right/second node in the comparison.
+ */
+ right: T
+ /**
+ * Left/first node in the comparison.
+ */
+ left: T
+}
+/**
+ * Checks if the newlines between two nodes match the required configuration.
+ *
+ * Validates the number of empty lines between two nodes against the expected
+ * newlines based on their group indices and configuration. Generates
+ * appropriate error messages when the actual newlines don't match the
+ * requirement.
+ *
+ * The function returns no errors if:
+ *
+ * - The left node's group index is greater than the right's (wrong order)
+ * - The nodes are in different partitions
+ * - The newlines configuration is set to 'ignore'
+ * - The actual newlines match the expected newlines.
+ *
+ * @example
+ *
+ * ```ts
+ * // Configuration requires 1 newline between different groups
+ * const errors = getNewlinesBetweenErrors({
+ * options: { newlinesBetween: 1, groups: ['imports', 'types'] },
+ * leftGroupIndex: 0, // imports group
+ * rightGroupIndex: 1, // types group
+ * left: importNode,
+ * right: typeNode,
+ * sourceCode,
+ * missedSpacingError: 'missedNewline',
+ * extraSpacingError: 'extraNewline',
+ * })
+ * // If no newline between nodes: Returns ['missedNewline']
+ * // If 2+ newlines between nodes: Returns ['extraNewline']
+ * // If exactly 1 newline: Returns []
+ * ```
+ *
+ * @template MessageIds - Type of error message identifiers.
+ * @template T - Type of the sorting node.
+ * @param params - Parameters for newline checking.
+ * @returns Array of error message IDs (empty if no errors).
+ */
+export declare function getNewlinesBetweenErrors<
+ MessageIds extends string,
+ T extends SortingNode,
+>({
+ newlinesBetweenValueGetter,
+ missedSpacingError,
+ extraSpacingError,
+ rightGroupIndex,
+ leftGroupIndex,
+ sourceCode,
+ options,
+ right,
+ left,
+}: GetNewlinesBetweenErrorsParameters): MessageIds[]
+export {}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-newlines-between-errors.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-newlines-between-errors.js
new file mode 100644
index 0000000000000000000000000000000000000000..5ec2b297815ce4b58d8a1aa084aeb1bc61061d1d
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-newlines-between-errors.js
@@ -0,0 +1,82 @@
+import { getNewlinesBetweenOption } from './get-newlines-between-option.js'
+import { getLinesBetween } from './get-lines-between.js'
+/**
+ * Checks if the newlines between two nodes match the required configuration.
+ *
+ * Validates the number of empty lines between two nodes against the expected
+ * newlines based on their group indices and configuration. Generates
+ * appropriate error messages when the actual newlines don't match the
+ * requirement.
+ *
+ * The function returns no errors if:
+ *
+ * - The left node's group index is greater than the right's (wrong order)
+ * - The nodes are in different partitions
+ * - The newlines configuration is set to 'ignore'
+ * - The actual newlines match the expected newlines.
+ *
+ * @example
+ *
+ * ```ts
+ * // Configuration requires 1 newline between different groups
+ * const errors = getNewlinesBetweenErrors({
+ * options: { newlinesBetween: 1, groups: ['imports', 'types'] },
+ * leftGroupIndex: 0, // imports group
+ * rightGroupIndex: 1, // types group
+ * left: importNode,
+ * right: typeNode,
+ * sourceCode,
+ * missedSpacingError: 'missedNewline',
+ * extraSpacingError: 'extraNewline',
+ * })
+ * // If no newline between nodes: Returns ['missedNewline']
+ * // If 2+ newlines between nodes: Returns ['extraNewline']
+ * // If exactly 1 newline: Returns []
+ * ```
+ *
+ * @template MessageIds - Type of error message identifiers.
+ * @template T - Type of the sorting node.
+ * @param params - Parameters for newline checking.
+ * @returns Array of error message IDs (empty if no errors).
+ */
+function getNewlinesBetweenErrors({
+ newlinesBetweenValueGetter,
+ missedSpacingError,
+ extraSpacingError,
+ rightGroupIndex,
+ leftGroupIndex,
+ sourceCode,
+ options,
+ right,
+ left,
+}) {
+ if (
+ leftGroupIndex > rightGroupIndex ||
+ left.partitionId !== right.partitionId
+ ) {
+ return []
+ }
+ let newlinesBetween = getNewlinesBetweenOption({
+ nextNodeGroupIndex: rightGroupIndex,
+ nodeGroupIndex: leftGroupIndex,
+ options,
+ })
+ newlinesBetween =
+ newlinesBetweenValueGetter?.({
+ computedNewlinesBetween: newlinesBetween,
+ right,
+ left,
+ }) ?? newlinesBetween
+ if (newlinesBetween === 'ignore') {
+ return []
+ }
+ let numberOfEmptyLinesBetween = getLinesBetween(sourceCode, left, right)
+ if (numberOfEmptyLinesBetween < newlinesBetween) {
+ return [missedSpacingError]
+ }
+ if (numberOfEmptyLinesBetween > newlinesBetween) {
+ return [extraSpacingError]
+ }
+ return []
+}
+export { getNewlinesBetweenErrors }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-newlines-between-option.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-newlines-between-option.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..494c1d2ca0f67fb9543117614e1c4fa508a5a2bc
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-newlines-between-option.d.ts
@@ -0,0 +1,43 @@
+import {
+ NewlinesBetweenOption,
+ CommonGroupsOptions,
+} from '../types/common-groups-options.js'
+/**
+ * Parameters for determining newlines requirement between nodes.
+ *
+ * Contains group indices and configuration options needed to calculate the
+ * required number of newlines between two nodes.
+ */
+export interface GetNewlinesBetweenOptionParameters {
+ /**
+ * Configuration options for newlines and groups.
+ */
+ options: CommonGroupsOptions
+ /**
+ * Group index of the next/second node.
+ */
+ nextNodeGroupIndex: number
+ /**
+ * Group index of the current/first node.
+ */
+ nodeGroupIndex: number
+}
+/**
+ * Get the `newlinesBetween` option to use between two consecutive nodes. The
+ * result is based on the global `newlinesBetween` option and the custom groups,
+ * which can override the global option.
+ *
+ * - If the two nodes are in the same custom group, the `newlinesInside` option of
+ * the group is used.
+ *
+ * @param props - The function arguments.
+ * @param props.nextNodeGroupIndex - The next node index to sort.
+ * @param props.nodeGroupIndex - The current node index to sort.
+ * @param props.options - Newlines between related options.
+ * @returns - The `newlinesBetween` option to use.
+ */
+export declare function getNewlinesBetweenOption({
+ nextNodeGroupIndex,
+ nodeGroupIndex,
+ options,
+}: GetNewlinesBetweenOptionParameters): NewlinesBetweenOption
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-newlines-between-option.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-newlines-between-option.js
new file mode 100644
index 0000000000000000000000000000000000000000..82f5214c549011669072f5d6cfa042ec67b8912c
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-newlines-between-option.js
@@ -0,0 +1,145 @@
+import { isGroupWithOverridesOption } from './is-group-with-overrides-option.js'
+import { isNewlinesBetweenOption } from './is-newlines-between-option.js'
+import { computeGroupName } from './compute-group-name.js'
+/**
+ * Get the `newlinesBetween` option to use between two consecutive nodes. The
+ * result is based on the global `newlinesBetween` option and the custom groups,
+ * which can override the global option.
+ *
+ * - If the two nodes are in the same custom group, the `newlinesInside` option of
+ * the group is used.
+ *
+ * @param props - The function arguments.
+ * @param props.nextNodeGroupIndex - The next node index to sort.
+ * @param props.nodeGroupIndex - The current node index to sort.
+ * @param props.options - Newlines between related options.
+ * @returns - The `newlinesBetween` option to use.
+ */
+function getNewlinesBetweenOption({
+ nextNodeGroupIndex,
+ nodeGroupIndex,
+ options,
+}) {
+ if (nodeGroupIndex === nextNodeGroupIndex) {
+ return computeNewlinesInsideOption({
+ groupIndex: nodeGroupIndex,
+ options,
+ })
+ }
+ if (nextNodeGroupIndex >= nodeGroupIndex + 2) {
+ return computeNewlinesBetweenOptionForDifferentGroups({
+ nextNodeGroupIndex,
+ nodeGroupIndex,
+ options,
+ })
+ }
+ return options.newlinesBetween
+}
+function computeNewlinesBetweenOptionForDifferentGroups({
+ nextNodeGroupIndex,
+ nodeGroupIndex,
+ options,
+}) {
+ if (nextNodeGroupIndex === nodeGroupIndex + 2) {
+ let groupBetween = options.groups[nodeGroupIndex + 1]
+ if (isNewlinesBetweenOption(groupBetween)) {
+ return groupBetween.newlinesBetween
+ }
+ return options.newlinesBetween
+ }
+ let groupsWithAllNewlinesBetween = buildGroupsWithAllNewlinesBetween(
+ options.groups.slice(nodeGroupIndex, nextNodeGroupIndex + 1),
+ options.newlinesBetween,
+ )
+ let newlinesBetweenOptions = new Set(
+ groupsWithAllNewlinesBetween
+ .filter(isNewlinesBetweenOption)
+ .map(group => group.newlinesBetween),
+ )
+ let numberNewlinesBetween = [...newlinesBetweenOptions].filter(
+ option => typeof option === 'number',
+ )
+ let maxNewlinesBetween =
+ numberNewlinesBetween.length > 0 ? Math.max(...numberNewlinesBetween) : null
+ if (maxNewlinesBetween !== null && maxNewlinesBetween >= 1) {
+ return maxNewlinesBetween
+ }
+ if (newlinesBetweenOptions.has('ignore')) {
+ return 'ignore'
+ }
+ return 0
+}
+function computeNewlinesInsideOption({ groupIndex, options }) {
+ let globalNewlinesInsideOption = computeGlobalNewlinesInsideOption()
+ let group = options.groups[groupIndex]
+ if (!group) {
+ return globalNewlinesInsideOption
+ }
+ let groupName = computeGroupName(group)
+ let nodeCustomGroup = options.customGroups.find(
+ customGroup => customGroup.groupName === groupName,
+ )
+ let groupOverrideNewlinesInside =
+ isGroupWithOverridesOption(group) ? group.newlinesInside : null
+ return (
+ nodeCustomGroup?.newlinesInside ??
+ groupOverrideNewlinesInside ??
+ globalNewlinesInsideOption
+ )
+ function computeGlobalNewlinesInsideOption() {
+ switch (options.newlinesInside) {
+ case 'newlinesBetween':
+ return options.newlinesBetween === 'ignore' ? 'ignore' : 0
+ case 'ignore':
+ return 'ignore'
+ default:
+ return options.newlinesInside
+ }
+ }
+}
+/**
+ * Inserts newlines settings between groups that don't already have them.
+ *
+ * Fills in missing newlines settings between adjacent groups using the global
+ * newlines option. This ensures every transition between groups has an explicit
+ * newlines setting for consistent calculation.
+ *
+ * @example
+ *
+ * ```ts
+ * buildGroupsWithAllNewlinesBetween(
+ * ['imports', 'types', { newlinesBetween: 2 }, 'functions'],
+ * 1,
+ * )
+ * // Returns: [
+ * // 'imports',
+ * // { newlinesBetween: 1 }, // Added
+ * // 'types',
+ * // { newlinesBetween: 2 }, // Already existed
+ * // 'functions'
+ * // ]
+ * ```
+ *
+ * @param groups - Array of groups with optional inline newlines settings.
+ * @param globalNewlinesBetweenOption - Default newlines to use for missing
+ * settings.
+ * @returns Groups array with newlines settings filled in between all groups.
+ */
+function buildGroupsWithAllNewlinesBetween(
+ groups,
+ globalNewlinesBetweenOption,
+) {
+ let returnValue = []
+ for (let i = 0; i < groups.length; i++) {
+ let group = groups[i]
+ if (!isNewlinesBetweenOption(group)) {
+ let previousGroup = groups[i - 1]
+ if (previousGroup && !isNewlinesBetweenOption(previousGroup)) {
+ returnValue.push({ newlinesBetween: globalNewlinesBetweenOption })
+ }
+ }
+ returnValue.push(group)
+ }
+ return returnValue
+}
+export { getNewlinesBetweenOption }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-node-decorators.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-node-decorators.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..57c420e1d351f2a0d8f402961654e61dded9aeee
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-node-decorators.d.ts
@@ -0,0 +1,33 @@
+import { TSESTree } from '@typescript-eslint/types'
+/**
+ * Type representing an AST node that may have decorators.
+ *
+ * Extends the base Node type with an optional decorators array. Used for
+ * TypeScript/JavaScript decorators on classes, methods, and properties.
+ */
+type NodeWithDecorator = {
+ decorators: TSESTree.Decorator[]
+} & TSESTree.Node
+/**
+ * Safely retrieves decorators from an AST node.
+ *
+ * Provides a safe way to access the decorators property which may not exist on
+ * all nodes or in all parser versions. Returns an empty array when decorators
+ * are undefined, ensuring consistent behavior across different AST structures.
+ *
+ * @example
+ *
+ * ```ts
+ * // Node without decorators
+ * const plainMethod = { type: 'MethodDefinition', ... };
+ * getNodeDecorators(plainMethod);
+ * // Returns: []
+ * ```
+ *
+ * @param node - AST node that may contain decorators.
+ * @returns Array of decorator nodes, empty array if none exist.
+ */
+export declare function getNodeDecorators(
+ node: NodeWithDecorator,
+): TSESTree.Decorator[]
+export {}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-node-decorators.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-node-decorators.js
new file mode 100644
index 0000000000000000000000000000000000000000..989156be6543203ab91d7240454b1fa527ed9619
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-node-decorators.js
@@ -0,0 +1,23 @@
+/**
+ * Safely retrieves decorators from an AST node.
+ *
+ * Provides a safe way to access the decorators property which may not exist on
+ * all nodes or in all parser versions. Returns an empty array when decorators
+ * are undefined, ensuring consistent behavior across different AST structures.
+ *
+ * @example
+ *
+ * ```ts
+ * // Node without decorators
+ * const plainMethod = { type: 'MethodDefinition', ... };
+ * getNodeDecorators(plainMethod);
+ * // Returns: []
+ * ```
+ *
+ * @param node - AST node that may contain decorators.
+ * @returns Array of decorator nodes, empty array if none exist.
+ */
+function getNodeDecorators(node) {
+ return node.decorators ?? []
+}
+export { getNodeDecorators }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-node-range.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-node-range.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..bf9c21ebf1c3639f7b3c2a77e563618c3e217980
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-node-range.d.ts
@@ -0,0 +1,95 @@
+import { TSESTree } from '@typescript-eslint/types'
+import { TSESLint } from '@typescript-eslint/utils'
+import { CommonPartitionOptions } from '../types/common-partition-options.js'
+/**
+ * Parameters for determining the complete range of a node.
+ *
+ * Configures how to calculate the node's range including associated comments
+ * and parentheses.
+ */
+interface GetNodeRangeParameters {
+ /**
+ * Optional configuration for comment handling.
+ */
+ options?: Pick
+ /**
+ * Decorators associated with this node that are not directly accessible via
+ * the AST node's own `decorators` property.
+ *
+ * Used in contexts where decorators are tracked separately from their
+ * decorated node. When provided, these decorators override the node's own
+ * `decorators` in range calculations, ensuring they are included when the
+ * node is moved during sorting fixes.
+ */
+ implicitDecorators?: TSESTree.Decorator[]
+ /**
+ * Whether to exclude the highest-level block comment from the range. Useful
+ * for preserving file-level documentation comments in their original
+ * position.
+ */
+ ignoreHighestBlockComment?: boolean
+ /**
+ * ESLint source code object for accessing comments and tokens.
+ */
+ sourceCode: TSESLint.SourceCode
+ /**
+ * AST node to get the range for.
+ */
+ node: TSESTree.Node
+}
+/**
+ * Determines the complete range of a node including its associated comments.
+ *
+ * Calculates the full range that should be considered when moving or analyzing
+ * a node. This includes:
+ *
+ * - The node itself
+ * - Parentheses surrounding the node (if any)
+ * - Preceding comments that "belong" to the node.
+ *
+ * The function intelligently determines which comments should be included by:
+ *
+ * - Including comments directly above the node (no empty lines between)
+ * - Stopping at partition comments (used to separate sections)
+ * - Stopping at ESLint disable/enable comments
+ * - Optionally excluding the highest block comment (e.g., file headers).
+ *
+ * @example
+ *
+ * ```ts
+ * // Source code:
+ * // This comment belongs to the function
+ * // So does this one
+ * function foo() {}
+ *
+ * const range = getNodeRange({ node: functionNode, sourceCode })
+ * // Returns range including both comments
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * // Source code:
+ * /* File header comment *\/
+ * // Function comment
+ * function bar() { }
+ *
+ * const range = getNodeRange({
+ * node: functionNode,
+ * sourceCode,
+ * ignoreHighestBlockComment: true
+ * });
+ * // Returns range including line comment but not block comment
+ * ```
+ *
+ * @param params - Parameters for range calculation.
+ * @returns Tuple of [start, end] positions including relevant comments.
+ */
+export declare function getNodeRange({
+ ignoreHighestBlockComment,
+ implicitDecorators,
+ sourceCode,
+ options,
+ node,
+}: GetNodeRangeParameters): TSESTree.Range
+export {}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-node-range.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-node-range.js
new file mode 100644
index 0000000000000000000000000000000000000000..1ac032221d2fff09c692c207f683d7736679e523
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-node-range.js
@@ -0,0 +1,142 @@
+import { getEslintDisabledRules } from './get-eslint-disabled-rules.js'
+import { isPartitionComment } from './is-partition-comment.js'
+import { getCommentsBefore } from './get-comments-before.js'
+import { ASTUtils } from '@typescript-eslint/utils'
+/**
+ * Determines the complete range of a node including its associated comments.
+ *
+ * Calculates the full range that should be considered when moving or analyzing
+ * a node. This includes:
+ *
+ * - The node itself
+ * - Parentheses surrounding the node (if any)
+ * - Preceding comments that "belong" to the node.
+ *
+ * The function intelligently determines which comments should be included by:
+ *
+ * - Including comments directly above the node (no empty lines between)
+ * - Stopping at partition comments (used to separate sections)
+ * - Stopping at ESLint disable/enable comments
+ * - Optionally excluding the highest block comment (e.g., file headers).
+ *
+ * @example
+ *
+ * ```ts
+ * // Source code:
+ * // This comment belongs to the function
+ * // So does this one
+ * function foo() {}
+ *
+ * const range = getNodeRange({ node: functionNode, sourceCode })
+ * // Returns range including both comments
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * // Source code:
+ * /* File header comment *\/
+ * // Function comment
+ * function bar() { }
+ *
+ * const range = getNodeRange({
+ * node: functionNode,
+ * sourceCode,
+ * ignoreHighestBlockComment: true
+ * });
+ * // Returns range including line comment but not block comment
+ * ```
+ *
+ * @param params - Parameters for range calculation.
+ * @returns Tuple of [start, end] positions including relevant comments.
+ */
+function getNodeRange({
+ ignoreHighestBlockComment,
+ implicitDecorators,
+ sourceCode,
+ options,
+ node,
+}) {
+ let start = node.range.at(0)
+ let end = node.range.at(1)
+ let decorators =
+ implicitDecorators ?? ('decorators' in node ? node.decorators : [])
+ if (decorators[0]) {
+ start = Math.min(start, decorators[0].range[0])
+ let decoratorTopCommentStart = computeHighestCommentStart({
+ comments: getCommentsBefore({
+ node: decorators[0],
+ sourceCode,
+ }),
+ anchorLine: decorators[0].loc.start.line,
+ ignoreHighestBlockComment,
+ options,
+ })
+ if (decoratorTopCommentStart !== void 0) {
+ start = Math.min(start, decoratorTopCommentStart)
+ }
+ }
+ if (ASTUtils.isParenthesized(node, sourceCode)) {
+ let bodyOpeningParen = sourceCode.getTokenBefore(
+ node,
+ ASTUtils.isOpeningParenToken,
+ )
+ let bodyClosingParen = sourceCode.getTokenAfter(
+ node,
+ ASTUtils.isClosingParenToken,
+ )
+ start = Math.min(start, bodyOpeningParen.range.at(0))
+ end = bodyClosingParen.range.at(1)
+ }
+ let topCommentStart = computeHighestCommentStart({
+ comments: getCommentsBefore({
+ sourceCode,
+ node,
+ }),
+ anchorLine: node.loc.start.line,
+ ignoreHighestBlockComment,
+ options,
+ })
+ if (topCommentStart !== void 0) {
+ start = Math.min(start, topCommentStart)
+ }
+ return [start, end]
+}
+function computeHighestCommentStart({
+ ignoreHighestBlockComment,
+ anchorLine,
+ comments,
+ options,
+}) {
+ let highestBlockComment = comments.find(comment => comment.type === 'Block')
+ let highestCommentStart
+ for (let i = comments.length - 1; i >= 0; i--) {
+ let comment = comments[i]
+ if (ignoreHighestBlockComment && comment === highestBlockComment) {
+ break
+ }
+ let eslintDisabledRules = getEslintDisabledRules(comment.value)
+ if (
+ isPartitionComment({
+ partitionByComment: options?.partitionByComment ?? false,
+ comment,
+ }) ||
+ eslintDisabledRules?.eslintDisableDirective === 'eslint-disable' ||
+ eslintDisabledRules?.eslintDisableDirective === 'eslint-enable'
+ ) {
+ break
+ }
+ /**
+ * Check for newlines between comments or between the first comment and the
+ * node.
+ */
+ let previousCommentOrAnchorLine =
+ i === comments.length - 1 ? anchorLine : comments[i + 1].loc.start.line
+ if (comment.loc.end.line !== previousCommentOrAnchorLine - 1) {
+ break
+ }
+ highestCommentStart = comment.range.at(0)
+ }
+ return highestCommentStart
+}
+export { getNodeRange }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-options-with-clean-groups.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-options-with-clean-groups.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..5fb85bf36f4e28347d6231d75c24ff423c56d428
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-options-with-clean-groups.d.ts
@@ -0,0 +1,58 @@
+import { GroupsOptions } from '../types/common-groups-options.js'
+/**
+ * Parameters for cleaning and normalizing groups configuration.
+ *
+ * Contains the groups array that needs to be cleaned up.
+ */
+interface GetOptionsWithCleanGroupsParameters {
+ /**
+ * Groups configuration that may contain empty arrays or single-element
+ * arrays.
+ */
+ groups: GroupsOptions
+}
+/**
+ * Cleans and normalizes the groups configuration in options.
+ *
+ * Performs the following optimizations on the groups array:
+ *
+ * - Removes empty arrays (they serve no purpose in grouping)
+ * - Converts single-element arrays to plain strings (simplifies structure)
+ * - Preserves multi-element arrays as-is (maintains subgroups).
+ *
+ * This normalization ensures consistent group handling and eliminates
+ * unnecessary complexity in the configuration.
+ *
+ * @example
+ *
+ * ```ts
+ * getOptionsWithCleanGroups({
+ * groups: [
+ * 'imports',
+ * ['types'], // Single element - will become 'types'
+ * ['hooks', 'utils'], // Multiple elements - preserved as array
+ * [], // Empty - will be removed
+ * 'components',
+ * ],
+ * })
+ * // Returns: {
+ * // groups: [
+ * // 'imports',
+ * // 'types',
+ * // ['hooks', 'utils'],
+ * // 'components'
+ * // ]
+ * // }
+ * ```
+ *
+ * @template CustomTypeOption - Custom type option string for GroupsOptions.
+ * @template Options - Type of options extending
+ * GetOptionsWithCleanGroupsParameters.
+ * @param options - Options object containing groups to clean.
+ * @returns Options with cleaned and normalized groups array.
+ */
+export declare function getOptionsWithCleanGroups<
+ CustomTypeOption extends string,
+ Options extends GetOptionsWithCleanGroupsParameters,
+>(options: Options): Options
+export {}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-options-with-clean-groups.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-options-with-clean-groups.js
new file mode 100644
index 0000000000000000000000000000000000000000..6f0261a76e24ec7f1b5b0aef513acbb823a4aec8
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-options-with-clean-groups.js
@@ -0,0 +1,78 @@
+/**
+ * Cleans and normalizes the groups configuration in options.
+ *
+ * Performs the following optimizations on the groups array:
+ *
+ * - Removes empty arrays (they serve no purpose in grouping)
+ * - Converts single-element arrays to plain strings (simplifies structure)
+ * - Preserves multi-element arrays as-is (maintains subgroups).
+ *
+ * This normalization ensures consistent group handling and eliminates
+ * unnecessary complexity in the configuration.
+ *
+ * @example
+ *
+ * ```ts
+ * getOptionsWithCleanGroups({
+ * groups: [
+ * 'imports',
+ * ['types'], // Single element - will become 'types'
+ * ['hooks', 'utils'], // Multiple elements - preserved as array
+ * [], // Empty - will be removed
+ * 'components',
+ * ],
+ * })
+ * // Returns: {
+ * // groups: [
+ * // 'imports',
+ * // 'types',
+ * // ['hooks', 'utils'],
+ * // 'components'
+ * // ]
+ * // }
+ * ```
+ *
+ * @template CustomTypeOption - Custom type option string for GroupsOptions.
+ * @template Options - Type of options extending
+ * GetOptionsWithCleanGroupsParameters.
+ * @param options - Options object containing groups to clean.
+ * @returns Options with cleaned and normalized groups array.
+ */
+function getOptionsWithCleanGroups(options) {
+ return {
+ ...options,
+ groups: options.groups
+ .filter(group => !Array.isArray(group) || group.length > 0)
+ .map(group =>
+ Array.isArray(group) ? getCleanedNestedGroups(group) : group,
+ ),
+ }
+}
+/**
+ * Simplifies a nested group array by converting single-element arrays to
+ * strings.
+ *
+ * Helper function that normalizes array groups:
+ *
+ * - Single-element arrays are unwrapped to plain strings
+ * - Multi-element arrays are preserved as-is
+ * - Empty single-element arrays remain as arrays.
+ *
+ * @example
+ *
+ * ```ts
+ * getCleanedNestedGroups(['types']) // Returns: 'types'
+ * getCleanedNestedGroups(['a', 'b']) // Returns: ['a', 'b']
+ * getCleanedNestedGroups(['']) // Returns: ['']
+ * ```
+ *
+ * @param nestedGroup - Array of group names to potentially simplify.
+ * @returns Simplified string if single non-empty element, otherwise the
+ * original array.
+ */
+function getCleanedNestedGroups(nestedGroup) {
+ return nestedGroup.length === 1 && nestedGroup[0] ?
+ nestedGroup[0]
+ : nestedGroup
+}
+export { getOptionsWithCleanGroups }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-settings.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-settings.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..d156dc4c960a8b03dd05564ba1c185ab7960da29
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-settings.d.ts
@@ -0,0 +1,58 @@
+import { TSESLint } from '@typescript-eslint/utils'
+import { CommonPartitionOptions } from '../types/common-partition-options.js'
+import { CommonGroupsOptions } from '../types/common-groups-options.js'
+import { CommonOptions } from '../types/common-options.js'
+/**
+ * Global settings for the Perfectionist plugin.
+ *
+ * These settings can be configured in ESLint configuration under the
+ * 'perfectionist' key and apply to all Perfectionist rules unless overridden by
+ * rule-specific options.
+ */
+export type Settings = Partial<
+ Pick<
+ CommonGroupsOptions,
+ 'newlinesBetween' | 'newlinesInside'
+ > &
+ CommonPartitionOptions &
+ CommonOptions
+>
+/**
+ * Extracts and validates Perfectionist settings from ESLint configuration.
+ *
+ * Retrieves global Perfectionist settings that apply to all rules. Validates
+ * that only allowed settings are provided and throws an error if invalid
+ * options are detected. This ensures configuration errors are caught early with
+ * clear error messages.
+ *
+ * The settings are accessed from the 'perfectionist' key in ESLint's shared
+ * configuration settings.
+ *
+ * @example
+ *
+ * ```ts
+ * // Valid usage:
+ * const settings = getSettings(context.settings)
+ * // Returns: { type: 'natural', order: 'asc', ignoreCase: true }
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * // Invalid setting throws error:
+ * getSettings({
+ * perfectionist: {
+ * type: 'natural',
+ * invalidOption: true, // This will throw
+ * },
+ * })
+ * // Throws: Error: Invalid Perfectionist setting(s): invalidOption
+ * ```
+ *
+ * @param settings - ESLint shared configuration settings object.
+ * @returns Validated Perfectionist settings or empty object if none configured.
+ * @throws {Error} If invalid settings are provided.
+ */
+export declare function getSettings(
+ settings: TSESLint.SharedConfigurationSettings,
+): Settings
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-settings.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-settings.js
new file mode 100644
index 0000000000000000000000000000000000000000..9c82e84912a64bba92105e6a90a185ef35761620
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/get-settings.js
@@ -0,0 +1,72 @@
+/**
+ * Extracts and validates Perfectionist settings from ESLint configuration.
+ *
+ * Retrieves global Perfectionist settings that apply to all rules. Validates
+ * that only allowed settings are provided and throws an error if invalid
+ * options are detected. This ensures configuration errors are caught early with
+ * clear error messages.
+ *
+ * The settings are accessed from the 'perfectionist' key in ESLint's shared
+ * configuration settings.
+ *
+ * @example
+ *
+ * ```ts
+ * // Valid usage:
+ * const settings = getSettings(context.settings)
+ * // Returns: { type: 'natural', order: 'asc', ignoreCase: true }
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * // Invalid setting throws error:
+ * getSettings({
+ * perfectionist: {
+ * type: 'natural',
+ * invalidOption: true, // This will throw
+ * },
+ * })
+ * // Throws: Error: Invalid Perfectionist setting(s): invalidOption
+ * ```
+ *
+ * @param settings - ESLint shared configuration settings object.
+ * @returns Validated Perfectionist settings or empty object if none configured.
+ * @throws {Error} If invalid settings are provided.
+ */
+function getSettings(settings) {
+ if (!settings['perfectionist']) {
+ return {}
+ }
+ /**
+ * Identifies settings keys that are not in the allowed list.
+ *
+ * @param object - Settings object to validate.
+ * @returns Array of invalid setting names.
+ */
+ function getInvalidOptions(object) {
+ let allowedOptions = /* @__PURE__ */ new Set([
+ 'partitionByComment',
+ 'partitionByNewLine',
+ 'specialCharacters',
+ 'newlinesBetween',
+ 'newlinesInside',
+ 'fallbackSort',
+ 'ignoreCase',
+ 'alphabet',
+ 'locales',
+ 'order',
+ 'type',
+ ])
+ return Object.keys(object).filter(key => !allowedOptions.has(key))
+ }
+ let perfectionistSettings = settings['perfectionist']
+ let invalidOptions = getInvalidOptions(perfectionistSettings)
+ if (invalidOptions.length > 0) {
+ throw new Error(
+ `Invalid Perfectionist setting(s): ${invalidOptions.join(', ')}`,
+ )
+ }
+ return settings['perfectionist']
+}
+export { getSettings }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/is-group-with-overrides-option.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/is-group-with-overrides-option.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..1a19dae6f206a727c4dee155c9d5f6b460b81500
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/is-group-with-overrides-option.d.ts
@@ -0,0 +1,40 @@
+import {
+ GroupWithOverridesOption,
+ GroupsOptions,
+} from '../types/common-groups-options.js'
+/**
+ * Type guard to check if a group option is a group with overrides
+ * configuration.
+ *
+ * Determines whether a group element is a special configuration object that
+ * contains group settings rather than being a regular group name or newlines
+ * option.
+ *
+ * @example
+ *
+ * ```ts
+ * const groups = [
+ * 'imports',
+ * { group: 'foo', commentAbove: '// Components' },
+ * 'components',
+ * { newlinesBetween: 1 },
+ * 'utils',
+ * ]
+ *
+ * isGroupWithOverridesOption(groups[0]) // false (string)
+ * isGroupWithOverridesOption(groups[1]) // true
+ * isGroupWithOverridesOption(groups[3]) // false (newlines option)
+ * ```
+ *
+ * @param groupOption - A single element from the groups configuration array.
+ * @returns True if the element is a group with overrides configuration object.
+ */
+export declare function isGroupWithOverridesOption<
+ CustomTypeOption extends string,
+ AdditionalSortOptions,
+>(
+ groupOption: GroupsOptions[number],
+): groupOption is GroupWithOverridesOption<
+ CustomTypeOption,
+ AdditionalSortOptions
+>
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/is-group-with-overrides-option.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/is-group-with-overrides-option.js
new file mode 100644
index 0000000000000000000000000000000000000000..688d6cf17ab66ff6e04a7c05fb8a352d972c195c
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/is-group-with-overrides-option.js
@@ -0,0 +1,31 @@
+/**
+ * Type guard to check if a group option is a group with overrides
+ * configuration.
+ *
+ * Determines whether a group element is a special configuration object that
+ * contains group settings rather than being a regular group name or newlines
+ * option.
+ *
+ * @example
+ *
+ * ```ts
+ * const groups = [
+ * 'imports',
+ * { group: 'foo', commentAbove: '// Components' },
+ * 'components',
+ * { newlinesBetween: 1 },
+ * 'utils',
+ * ]
+ *
+ * isGroupWithOverridesOption(groups[0]) // false (string)
+ * isGroupWithOverridesOption(groups[1]) // true
+ * isGroupWithOverridesOption(groups[3]) // false (newlines option)
+ * ```
+ *
+ * @param groupOption - A single element from the groups configuration array.
+ * @returns True if the element is a group with overrides configuration object.
+ */
+function isGroupWithOverridesOption(groupOption) {
+ return typeof groupOption === 'object' && 'group' in groupOption
+}
+export { isGroupWithOverridesOption }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/is-newlines-between-option.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/is-newlines-between-option.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..c76fe703cb4ab8b6152de10d5e799aaad253b0aa
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/is-newlines-between-option.d.ts
@@ -0,0 +1,40 @@
+import {
+ GroupNewlinesBetweenOption,
+ GroupsOptions,
+} from '../types/common-groups-options.js'
+/**
+ * Type guard to check if a group option is a newlines-between configuration.
+ *
+ * Determines whether a group element contains a `newlinesBetween` property,
+ * which indicates it's a special configuration object that controls spacing
+ * between groups rather than being a regular group name or comment option.
+ *
+ * Newlines-between options are placed between group names in the configuration
+ * to specify how many newlines should separate those groups in the sorted
+ * output.
+ *
+ * @example
+ *
+ * ```ts
+ * const groups = [
+ * 'imports',
+ * { newlinesBetween: 1 }, // Add 1 newline between imports and types
+ * 'types',
+ * { newlinesBetween: 2 }, // Add 2 newlines between types and components
+ * 'components',
+ * { commentAbove: '// Utils' }, // Not a newlines option
+ * 'utils',
+ * ]
+ *
+ * isNewlinesBetweenOption(groups[0]) // false (string)
+ * isNewlinesBetweenOption(groups[1]) // true (has newlinesBetween)
+ * isNewlinesBetweenOption(groups[3]) // true (has newlinesBetween)
+ * isNewlinesBetweenOption(groups[5]) // false (comment option)
+ * ```
+ *
+ * @param groupOption - A single element from the groups configuration array.
+ * @returns True if the element is a newlines-between configuration object.
+ */
+export declare function isNewlinesBetweenOption(
+ groupOption: GroupsOptions[number],
+): groupOption is GroupNewlinesBetweenOption
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/is-newlines-between-option.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/is-newlines-between-option.js
new file mode 100644
index 0000000000000000000000000000000000000000..36b8fabc7edc670c0e709436ebcdca8630e0dfd5
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/is-newlines-between-option.js
@@ -0,0 +1,37 @@
+/**
+ * Type guard to check if a group option is a newlines-between configuration.
+ *
+ * Determines whether a group element contains a `newlinesBetween` property,
+ * which indicates it's a special configuration object that controls spacing
+ * between groups rather than being a regular group name or comment option.
+ *
+ * Newlines-between options are placed between group names in the configuration
+ * to specify how many newlines should separate those groups in the sorted
+ * output.
+ *
+ * @example
+ *
+ * ```ts
+ * const groups = [
+ * 'imports',
+ * { newlinesBetween: 1 }, // Add 1 newline between imports and types
+ * 'types',
+ * { newlinesBetween: 2 }, // Add 2 newlines between types and components
+ * 'components',
+ * { commentAbove: '// Utils' }, // Not a newlines option
+ * 'utils',
+ * ]
+ *
+ * isNewlinesBetweenOption(groups[0]) // false (string)
+ * isNewlinesBetweenOption(groups[1]) // true (has newlinesBetween)
+ * isNewlinesBetweenOption(groups[3]) // true (has newlinesBetween)
+ * isNewlinesBetweenOption(groups[5]) // false (comment option)
+ * ```
+ *
+ * @param groupOption - A single element from the groups configuration array.
+ * @returns True if the element is a newlines-between configuration object.
+ */
+function isNewlinesBetweenOption(groupOption) {
+ return typeof groupOption === 'object' && 'newlinesBetween' in groupOption
+}
+export { isNewlinesBetweenOption }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/is-node-dependent-on-other-node.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/is-node-dependent-on-other-node.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..5e1179965988edbce30cf89a39326b2be5fb8410
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/is-node-dependent-on-other-node.d.ts
@@ -0,0 +1,51 @@
+import { SortingNodeWithDependencies } from './sort-nodes-by-dependencies.js'
+/**
+ * Checks if one node has a dependency on another node.
+ *
+ * Determines whether sortingNode1 depends on sortingNode2 by checking if any of
+ * sortingNode1's dependency names match any of sortingNode2's dependencies.
+ * This is used in dependency-aware sorting to ensure that dependent nodes are
+ * placed after their dependencies.
+ *
+ * Returns false for self-dependency (when both nodes are the same) to prevent
+ * circular dependency issues.
+ *
+ * @example
+ *
+ * ```ts
+ * const nodeA = {
+ * name: 'userService',
+ * dependencies: ['userService'],
+ * dependencyNames: ['logger', 'database'],
+ * }
+ *
+ * const nodeB = {
+ * name: 'logger',
+ * dependencies: ['logger'],
+ * dependencyNames: [],
+ * }
+ *
+ * isNodeDependentOnOtherNode(nodeA, nodeB)
+ * // Returns: true (userService depends on logger)
+ *
+ * isNodeDependentOnOtherNode(nodeB, nodeA)
+ * // Returns: false (logger doesn't depend on userService)
+ *
+ * isNodeDependentOnOtherNode(nodeA, nodeA)
+ * // Returns: false (self-dependency check)
+ * ```
+ *
+ * @param sortingNode1 - The node to check for dependencies.
+ * @param sortingNode2 - The potential dependency node.
+ * @returns True if sortingNode1 depends on sortingNode2, false otherwise.
+ */
+export declare function isNodeDependentOnOtherNode(
+ sortingNode1: Pick<
+ SortingNodeWithDependencies,
+ 'dependencyNames' | 'dependencies'
+ >,
+ sortingNode2: Pick<
+ SortingNodeWithDependencies,
+ 'dependencyNames' | 'dependencies'
+ >,
+): boolean
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/is-node-dependent-on-other-node.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/is-node-dependent-on-other-node.js
new file mode 100644
index 0000000000000000000000000000000000000000..159eef41b5f1445b45d17297a9790d1a45d58763
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/is-node-dependent-on-other-node.js
@@ -0,0 +1,49 @@
+/**
+ * Checks if one node has a dependency on another node.
+ *
+ * Determines whether sortingNode1 depends on sortingNode2 by checking if any of
+ * sortingNode1's dependency names match any of sortingNode2's dependencies.
+ * This is used in dependency-aware sorting to ensure that dependent nodes are
+ * placed after their dependencies.
+ *
+ * Returns false for self-dependency (when both nodes are the same) to prevent
+ * circular dependency issues.
+ *
+ * @example
+ *
+ * ```ts
+ * const nodeA = {
+ * name: 'userService',
+ * dependencies: ['userService'],
+ * dependencyNames: ['logger', 'database'],
+ * }
+ *
+ * const nodeB = {
+ * name: 'logger',
+ * dependencies: ['logger'],
+ * dependencyNames: [],
+ * }
+ *
+ * isNodeDependentOnOtherNode(nodeA, nodeB)
+ * // Returns: true (userService depends on logger)
+ *
+ * isNodeDependentOnOtherNode(nodeB, nodeA)
+ * // Returns: false (logger doesn't depend on userService)
+ *
+ * isNodeDependentOnOtherNode(nodeA, nodeA)
+ * // Returns: false (self-dependency check)
+ * ```
+ *
+ * @param sortingNode1 - The node to check for dependencies.
+ * @param sortingNode2 - The potential dependency node.
+ * @returns True if sortingNode1 depends on sortingNode2, false otherwise.
+ */
+function isNodeDependentOnOtherNode(sortingNode1, sortingNode2) {
+ if (sortingNode1 === sortingNode2) {
+ return false
+ }
+ return sortingNode1.dependencyNames.some(dependency =>
+ sortingNode2.dependencies.includes(dependency),
+ )
+}
+export { isNodeDependentOnOtherNode }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/is-node-eslint-disabled.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/is-node-eslint-disabled.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..28e42974de3836ff5aa879a3b62e01430ab676e5
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/is-node-eslint-disabled.d.ts
@@ -0,0 +1,32 @@
+import { TSESTree } from '@typescript-eslint/types'
+/**
+ * Checks if ESLint rules are disabled for a specific AST node.
+ *
+ * Determines whether a node is located on a line where ESLint rules have been
+ * disabled via comments (eslint-disable, eslint-disable-line,
+ * eslint-disable-next-line). This is used to exclude disabled nodes from
+ * sorting operations to respect user's explicit disable directives.
+ *
+ * @example
+ *
+ * ```ts
+ * const eslintDisabledLines = [5, 10, 11, 12] // Lines where ESLint is disabled
+ *
+ * const nodeOnLine5 = { loc: { start: { line: 5 } } }
+ * const nodeOnLine6 = { loc: { start: { line: 6 } } }
+ *
+ * isNodeEslintDisabled(nodeOnLine5, eslintDisabledLines)
+ * // Returns: true (line 5 is in disabled lines)
+ *
+ * isNodeEslintDisabled(nodeOnLine6, eslintDisabledLines)
+ * // Returns: false (line 6 is not in disabled lines)
+ * ```
+ *
+ * @param node - AST node to check for ESLint disable status.
+ * @param eslintDisabledLines - Array of line numbers where ESLint is disabled.
+ * @returns True if the node is on a disabled line, false otherwise.
+ */
+export declare function isNodeEslintDisabled(
+ node: TSESTree.Node,
+ eslintDisabledLines: number[],
+): boolean
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/is-node-eslint-disabled.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/is-node-eslint-disabled.js
new file mode 100644
index 0000000000000000000000000000000000000000..2afc32ed8fd1c74a5bc0dbf981e9c393f6794563
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/is-node-eslint-disabled.js
@@ -0,0 +1,31 @@
+/**
+ * Checks if ESLint rules are disabled for a specific AST node.
+ *
+ * Determines whether a node is located on a line where ESLint rules have been
+ * disabled via comments (eslint-disable, eslint-disable-line,
+ * eslint-disable-next-line). This is used to exclude disabled nodes from
+ * sorting operations to respect user's explicit disable directives.
+ *
+ * @example
+ *
+ * ```ts
+ * const eslintDisabledLines = [5, 10, 11, 12] // Lines where ESLint is disabled
+ *
+ * const nodeOnLine5 = { loc: { start: { line: 5 } } }
+ * const nodeOnLine6 = { loc: { start: { line: 6 } } }
+ *
+ * isNodeEslintDisabled(nodeOnLine5, eslintDisabledLines)
+ * // Returns: true (line 5 is in disabled lines)
+ *
+ * isNodeEslintDisabled(nodeOnLine6, eslintDisabledLines)
+ * // Returns: false (line 6 is not in disabled lines)
+ * ```
+ *
+ * @param node - AST node to check for ESLint disable status.
+ * @param eslintDisabledLines - Array of line numbers where ESLint is disabled.
+ * @returns True if the node is on a disabled line, false otherwise.
+ */
+function isNodeEslintDisabled(node, eslintDisabledLines) {
+ return eslintDisabledLines.includes(node.loc.start.line)
+}
+export { isNodeEslintDisabled }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/is-node-immediately-called.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/is-node-immediately-called.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..37482fd93584643260d5833cd86188958e60fffd
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/is-node-immediately-called.d.ts
@@ -0,0 +1,14 @@
+import { TSESTree } from '@typescript-eslint/types'
+/**
+ * Checks whether a node is the callee of a call or `new` expression.
+ *
+ * Used to treat immediately invoked function expressions as eagerly executed:
+ * references inside their bodies are read as soon as the surrounding expression
+ * is evaluated, unlike references inside deferred function bodies.
+ *
+ * @param node - The AST node to check.
+ * @returns Whether the node is immediately called.
+ */
+export declare function isNodeImmediatelyCalled(
+ node: TSESTree.Expression,
+): boolean
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/is-node-immediately-called.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/is-node-immediately-called.js
new file mode 100644
index 0000000000000000000000000000000000000000..dc4ded4e3eb15867f42d35cbdfa344a676c7f762
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/is-node-immediately-called.js
@@ -0,0 +1,20 @@
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+/**
+ * Checks whether a node is the callee of a call or `new` expression.
+ *
+ * Used to treat immediately invoked function expressions as eagerly executed:
+ * references inside their bodies are read as soon as the surrounding expression
+ * is evaluated, unlike references inside deferred function bodies.
+ *
+ * @param node - The AST node to check.
+ * @returns Whether the node is immediately called.
+ */
+function isNodeImmediatelyCalled(node) {
+ let { parent } = node
+ return (
+ (parent.type === AST_NODE_TYPES.CallExpression ||
+ parent.type === AST_NODE_TYPES.NewExpression) &&
+ parent.callee === node
+ )
+}
+export { isNodeImmediatelyCalled }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/is-node-on-single-line.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/is-node-on-single-line.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..5b3a9b3f1e03199100929a51d79880fb3c2144d3
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/is-node-on-single-line.d.ts
@@ -0,0 +1,8 @@
+import { TSESTree } from '@typescript-eslint/types'
+/**
+ * Returns if a node is on a single line.
+ *
+ * @param node - The node to check.
+ * @returns True if the node is on a single line, false otherwise.
+ */
+export declare function isNodeOnSingleLine(node: TSESTree.Node): boolean
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/is-node-on-single-line.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/is-node-on-single-line.js
new file mode 100644
index 0000000000000000000000000000000000000000..172fa2fd741a42b2fd87b480a7d2686748724156
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/is-node-on-single-line.js
@@ -0,0 +1,10 @@
+/**
+ * Returns if a node is on a single line.
+ *
+ * @param node - The node to check.
+ * @returns True if the node is on a single line, false otherwise.
+ */
+function isNodeOnSingleLine(node) {
+ return node.loc.start.line === node.loc.end.line
+}
+export { isNodeOnSingleLine }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/is-partition-comment.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/is-partition-comment.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..fbdb3a9fda0a963ddcbf8d3341f0fe2bde69866b
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/is-partition-comment.d.ts
@@ -0,0 +1,77 @@
+import { TSESTree } from '@typescript-eslint/types'
+import { PartitionByCommentOption } from '../types/common-partition-options.js'
+/**
+ * Parameters for checking if a comment is a partition comment.
+ */
+interface IsPartitionCommentParameters {
+ /**
+ * Configuration for partition comments. Can be boolean, string/regex
+ * pattern, array of patterns, or object with block/line specific settings.
+ */
+ partitionByComment: PartitionByCommentOption
+ /**
+ * The comment node to check.
+ */
+ comment: TSESTree.Comment
+}
+/**
+ * Determines if a comment should be treated as a partition separator.
+ *
+ * Partition comments divide code into independent sections that are sorted
+ * separately. This prevents elements from being moved across these boundaries
+ * during sorting operations.
+ *
+ * The function handles various configuration formats:
+ *
+ * - `true`: All comments are partition comments
+ * - `false`: No comments are partition comments
+ * - String/Regex: Comments matching the pattern are partitions
+ * - Array: Comments matching any pattern in the array are partitions
+ * - Object: Different patterns for block and line comments.
+ *
+ * ESLint disable comments are never treated as partition comments to avoid
+ * interfering with ESLint's functionality.
+ *
+ * @example
+ *
+ * ```ts
+ * // Configuration: partitionByComment: true
+ * isPartitionComment({ partitionByComment: true, comment })
+ * // Returns: true for any non-ESLint-disable comment
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * // Configuration: partitionByComment: 'Section:'
+ * const comment = { value: ' Section: Utils ', type: 'Line' }
+ * isPartitionComment({ partitionByComment: 'Section:', comment })
+ * // Returns: true (comment contains 'Section:')
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * // Configuration: partitionByComment: { block: true, line: '^-' }
+ * const blockComment = { value: ' Helper functions ', type: 'Block' }
+ * const lineComment = { value: '--- Utils ---', type: 'Line' }
+ * isPartitionComment({
+ * partitionByComment: { block: true, line: '^-' },
+ * comment: blockComment,
+ * })
+ * // Returns: true (all block comments are partitions)
+ * isPartitionComment({
+ * partitionByComment: { block: true, line: '^-' },
+ * comment: lineComment,
+ * })
+ * // Returns: true (line comment starts with '-')
+ * ```
+ *
+ * @param params - Parameters for partition check.
+ * @returns True if the comment is a partition separator, false otherwise.
+ */
+export declare function isPartitionComment({
+ partitionByComment,
+ comment,
+}: IsPartitionCommentParameters): boolean
+export {}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/is-partition-comment.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/is-partition-comment.js
new file mode 100644
index 0000000000000000000000000000000000000000..1102238bbbb829c36a329f2a8ff909c03f6f203e
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/is-partition-comment.js
@@ -0,0 +1,109 @@
+import { getEslintDisabledRules } from './get-eslint-disabled-rules.js'
+import { matches } from './matches.js'
+/**
+ * Determines if a comment should be treated as a partition separator.
+ *
+ * Partition comments divide code into independent sections that are sorted
+ * separately. This prevents elements from being moved across these boundaries
+ * during sorting operations.
+ *
+ * The function handles various configuration formats:
+ *
+ * - `true`: All comments are partition comments
+ * - `false`: No comments are partition comments
+ * - String/Regex: Comments matching the pattern are partitions
+ * - Array: Comments matching any pattern in the array are partitions
+ * - Object: Different patterns for block and line comments.
+ *
+ * ESLint disable comments are never treated as partition comments to avoid
+ * interfering with ESLint's functionality.
+ *
+ * @example
+ *
+ * ```ts
+ * // Configuration: partitionByComment: true
+ * isPartitionComment({ partitionByComment: true, comment })
+ * // Returns: true for any non-ESLint-disable comment
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * // Configuration: partitionByComment: 'Section:'
+ * const comment = { value: ' Section: Utils ', type: 'Line' }
+ * isPartitionComment({ partitionByComment: 'Section:', comment })
+ * // Returns: true (comment contains 'Section:')
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * // Configuration: partitionByComment: { block: true, line: '^-' }
+ * const blockComment = { value: ' Helper functions ', type: 'Block' }
+ * const lineComment = { value: '--- Utils ---', type: 'Line' }
+ * isPartitionComment({
+ * partitionByComment: { block: true, line: '^-' },
+ * comment: blockComment,
+ * })
+ * // Returns: true (all block comments are partitions)
+ * isPartitionComment({
+ * partitionByComment: { block: true, line: '^-' },
+ * comment: lineComment,
+ * })
+ * // Returns: true (line comment starts with '-')
+ * ```
+ *
+ * @param params - Parameters for partition check.
+ * @returns True if the comment is a partition separator, false otherwise.
+ */
+function isPartitionComment({ partitionByComment, comment }) {
+ if (!partitionByComment || getEslintDisabledRules(comment.value)) {
+ return false
+ }
+ let trimmedComment = comment.value.trim()
+ if (
+ typeof partitionByComment === 'boolean' ||
+ typeof partitionByComment === 'string' ||
+ Array.isArray(partitionByComment)
+ ) {
+ return isTrimmedCommentPartitionComment({
+ partitionByComment,
+ trimmedComment,
+ })
+ }
+ let relevantPartitionByComment
+ if (comment.type === 'Block' && 'block' in partitionByComment) {
+ relevantPartitionByComment = partitionByComment.block
+ }
+ if (comment.type === 'Line' && 'line' in partitionByComment) {
+ relevantPartitionByComment = partitionByComment.line
+ }
+ return (
+ relevantPartitionByComment !== void 0 &&
+ isTrimmedCommentPartitionComment({
+ partitionByComment: relevantPartitionByComment,
+ trimmedComment,
+ })
+ )
+}
+/**
+ * Checks if a trimmed comment matches the partition criteria.
+ *
+ * Helper function that performs the actual matching logic against a trimmed
+ * comment string. Handles both boolean flags and pattern matching.
+ *
+ * @param params - Parameters for matching.
+ * @param params.partitionByComment - Boolean flag or pattern to match against.
+ * @param params.trimmedComment - Comment text with whitespace trimmed.
+ * @returns True if the comment matches the partition criteria.
+ */
+function isTrimmedCommentPartitionComment({
+ partitionByComment,
+ trimmedComment,
+}) {
+ if (typeof partitionByComment === 'boolean') {
+ return partitionByComment
+ }
+ return matches(trimmedComment, partitionByComment)
+}
+export { isPartitionComment }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/is-sortable.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/is-sortable.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..034bd124230fb1eca213fb5c4bac8ac19e7986fe
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/is-sortable.d.ts
@@ -0,0 +1,7 @@
+/**
+ * Checks if a node is sortable (i.e., an array with more than one element).
+ *
+ * @param node - The node to check.
+ * @returns True if the node is sortable, false otherwise.
+ */
+export declare function isSortable(node: unknown): node is unknown[]
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/is-sortable.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/is-sortable.js
new file mode 100644
index 0000000000000000000000000000000000000000..7f66c26a48af362a8148cb13f0b4330af2147d7b
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/is-sortable.js
@@ -0,0 +1,10 @@
+/**
+ * Checks if a node is sortable (i.e., an array with more than one element).
+ *
+ * @param node - The node to check.
+ * @returns True if the node is sortable, false otherwise.
+ */
+function isSortable(node) {
+ return Array.isArray(node) && node.length > 1
+}
+export { isSortable }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/json-schemas/common-groups-json-schemas.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/json-schemas/common-groups-json-schemas.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..b8a8cca21ee837b05777a1c913cc560e445bbf9a
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/json-schemas/common-groups-json-schemas.d.ts
@@ -0,0 +1,113 @@
+import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'
+/**
+ * JSON schema for the newlines between option. Validates configuration for
+ * adding newlines between different groups.
+ */
+export declare let newlinesBetweenJsonSchema: JSONSchema4
+/**
+ * JSON schema for the newlines inside option.
+ */
+export declare let newlinesInsideJsonSchema: JSONSchema4
+export declare function buildGroupsJsonSchema({
+ allowedAdditionalTypeValues,
+ additionalSortProperties,
+}: {
+ additionalSortProperties: Record | undefined
+ allowedAdditionalTypeValues: undefined | string[]
+}): JSONSchema4
+/**
+ * Builds JSON schema for custom groups array configuration.
+ *
+ * Creates a schema that validates an array of custom group definitions.
+ * Supports both single custom groups and "anyOf" groups containing multiple
+ * subgroups. Each group must have a groupName and can include various matching
+ * criteria.
+ *
+ * @example
+ *
+ * ```ts
+ * // Valid configuration:
+ * ;[
+ * {
+ * groupName: 'react',
+ * anyOf: [{ elementNamePattern: 'use*' }, { selector: 'hook' }],
+ * },
+ * {
+ * groupName: 'utils',
+ * elementNamePattern: '*Utils',
+ * },
+ * ]
+ * ```
+ *
+ * @param options - Configuration options.
+ * @param options.additionalSortProperties - Extra properties for sorting.
+ * @param options.additionalCustomGroupMatchProperties - Extra properties for
+ * matching custom groups.
+ * @returns JSON schema for custom groups array validation.
+ */
+export declare function buildCustomGroupsArrayJsonSchema({
+ additionalCustomGroupMatchProperties,
+ allowedAdditionalTypeValues,
+ additionalSortProperties,
+}: {
+ additionalCustomGroupMatchProperties: Record | undefined
+ additionalSortProperties: Record | undefined
+ allowedAdditionalTypeValues: undefined | string[]
+}): JSONSchema4
+export declare function buildCommonGroupsJsonSchemas({
+ additionalCustomGroupMatchProperties,
+ allowedAdditionalTypeValues,
+ additionalSortProperties,
+}?: {
+ additionalCustomGroupMatchProperties?: Record
+ additionalSortProperties?: Record
+ allowedAdditionalTypeValues?: string[]
+}): Record
+/**
+ * Builds JSON schema for custom group modifiers configuration.
+ *
+ * Creates a schema that validates an array of modifiers that must be present on
+ * an element for it to match a custom group.
+ *
+ * @example
+ *
+ * ```ts
+ * // For TypeScript class members:
+ * buildCustomGroupModifiersJsonSchema([
+ * 'static',
+ * 'private',
+ * 'readonly',
+ * 'async',
+ * ])
+ * ```
+ *
+ * @param modifiers - Array of valid modifier names.
+ * @returns JSON schema for modifiers array validation.
+ */
+export declare function buildCustomGroupModifiersJsonSchema(
+ modifiers: readonly string[],
+): JSONSchema4
+/**
+ * Builds JSON schema for custom group selector configuration.
+ *
+ * Creates a schema that validates a selector string used to match specific
+ * types of elements in a custom group.
+ *
+ * @example
+ *
+ * ```ts
+ * // For class members:
+ * buildCustomGroupSelectorJsonSchema([
+ * 'property',
+ * 'method',
+ * 'constructor',
+ * 'accessor',
+ * ])
+ * ```
+ *
+ * @param selectors - Array of valid selector names.
+ * @returns JSON schema for selector validation.
+ */
+export declare function buildCustomGroupSelectorJsonSchema(
+ selectors: readonly string[],
+): JSONSchema4
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/json-schemas/common-groups-json-schemas.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/json-schemas/common-groups-json-schemas.js
new file mode 100644
index 0000000000000000000000000000000000000000..0caff220aa9bbb4b542f6fc51020520ee97e9ff1
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/json-schemas/common-groups-json-schemas.js
@@ -0,0 +1,302 @@
+import {
+ buildFallbackSortJsonSchema,
+ buildRegexJsonSchema,
+ buildTypeJsonSchema,
+ orderJsonSchema,
+} from './common-json-schemas.js'
+/**
+ * JSON schema for the newlines between option. Validates configuration for
+ * adding newlines between different groups.
+ */
+var newlinesBetweenJsonSchema = {
+ oneOf: [
+ {
+ description: 'Specifies how to handle newlines between groups.',
+ enum: ['ignore'],
+ type: 'string',
+ },
+ {
+ type: 'number',
+ minimum: 0,
+ },
+ ],
+}
+/**
+ * JSON schema for the newlines inside option.
+ */
+var newlinesInsideJsonSchema = {
+ oneOf: [
+ {
+ description: 'Specifies how to handle newlines between groups elements',
+ enum: ['ignore'],
+ type: 'string',
+ },
+ {
+ type: 'number',
+ minimum: 0,
+ },
+ ],
+}
+function buildGroupsJsonSchema({
+ allowedAdditionalTypeValues,
+ additionalSortProperties,
+}) {
+ return {
+ items: {
+ oneOf: [
+ { type: 'string' },
+ {
+ items: { type: 'string' },
+ type: 'array',
+ minItems: 1,
+ },
+ {
+ properties: { newlinesBetween: newlinesBetweenJsonSchema },
+ required: ['newlinesBetween'],
+ additionalProperties: false,
+ type: 'object',
+ },
+ {
+ properties: {
+ group: {
+ oneOf: [
+ { type: 'string' },
+ {
+ items: { type: 'string' },
+ type: 'array',
+ minItems: 1,
+ },
+ ],
+ },
+ fallbackSort: buildFallbackSortJsonSchema({
+ additionalProperties: additionalSortProperties,
+ allowedAdditionalTypeValues,
+ }),
+ commentAbove: {
+ description: 'Specifies a comment to enforce above the group.',
+ type: 'string',
+ },
+ type: buildTypeJsonSchema({
+ allowedAdditionalValues: allowedAdditionalTypeValues,
+ }),
+ newlinesInside: newlinesInsideJsonSchema,
+ order: orderJsonSchema,
+ ...additionalSortProperties,
+ },
+ additionalProperties: false,
+ required: ['group'],
+ minProperties: 2,
+ type: 'object',
+ },
+ ],
+ },
+ description: 'Specifies a list of groups for sorting.',
+ type: 'array',
+ }
+}
+/**
+ * Builds JSON schema for custom groups array configuration.
+ *
+ * Creates a schema that validates an array of custom group definitions.
+ * Supports both single custom groups and "anyOf" groups containing multiple
+ * subgroups. Each group must have a groupName and can include various matching
+ * criteria.
+ *
+ * @example
+ *
+ * ```ts
+ * // Valid configuration:
+ * ;[
+ * {
+ * groupName: 'react',
+ * anyOf: [{ elementNamePattern: 'use*' }, { selector: 'hook' }],
+ * },
+ * {
+ * groupName: 'utils',
+ * elementNamePattern: '*Utils',
+ * },
+ * ]
+ * ```
+ *
+ * @param options - Configuration options.
+ * @param options.additionalSortProperties - Extra properties for sorting.
+ * @param options.additionalCustomGroupMatchProperties - Extra properties for
+ * matching custom groups.
+ * @returns JSON schema for custom groups array validation.
+ */
+function buildCustomGroupsArrayJsonSchema({
+ additionalCustomGroupMatchProperties,
+ allowedAdditionalTypeValues,
+ additionalSortProperties,
+}) {
+ let commonCustomGroupJsonSchemas = buildCommonCustomGroupJsonSchemas({
+ allowedAdditionalTypeValues,
+ additionalSortProperties,
+ })
+ let populatedCustomGroupMatchOptionsJsonSchema =
+ buildPopulatedCustomGroupMatchPropertiesJsonSchema(
+ additionalCustomGroupMatchProperties,
+ )
+ return {
+ items: {
+ oneOf: [
+ {
+ properties: {
+ ...commonCustomGroupJsonSchemas,
+ anyOf: {
+ items: {
+ properties: populatedCustomGroupMatchOptionsJsonSchema,
+ description: 'Custom group.',
+ additionalProperties: false,
+ type: 'object',
+ },
+ type: 'array',
+ minItems: 1,
+ },
+ },
+ description: 'Custom group block.',
+ required: ['groupName', 'anyOf'],
+ additionalProperties: false,
+ type: 'object',
+ },
+ {
+ properties: {
+ ...commonCustomGroupJsonSchemas,
+ ...populatedCustomGroupMatchOptionsJsonSchema,
+ },
+ description: 'Custom group.',
+ additionalProperties: false,
+ required: ['groupName'],
+ minProperties: 2,
+ type: 'object',
+ },
+ ],
+ },
+ description: 'Defines custom groups to match specific members.',
+ type: 'array',
+ }
+}
+function buildCommonGroupsJsonSchemas({
+ additionalCustomGroupMatchProperties,
+ allowedAdditionalTypeValues,
+ additionalSortProperties,
+} = {}) {
+ return {
+ customGroups: buildCustomGroupsArrayJsonSchema({
+ additionalCustomGroupMatchProperties,
+ allowedAdditionalTypeValues,
+ additionalSortProperties,
+ }),
+ newlinesInside: {
+ oneOf: [
+ newlinesInsideJsonSchema,
+ {
+ enum: ['newlinesBetween'],
+ type: 'string',
+ },
+ ],
+ },
+ groups: buildGroupsJsonSchema({
+ allowedAdditionalTypeValues,
+ additionalSortProperties,
+ }),
+ newlinesBetween: newlinesBetweenJsonSchema,
+ }
+}
+/**
+ * Builds JSON schema for custom group modifiers configuration.
+ *
+ * Creates a schema that validates an array of modifiers that must be present on
+ * an element for it to match a custom group.
+ *
+ * @example
+ *
+ * ```ts
+ * // For TypeScript class members:
+ * buildCustomGroupModifiersJsonSchema([
+ * 'static',
+ * 'private',
+ * 'readonly',
+ * 'async',
+ * ])
+ * ```
+ *
+ * @param modifiers - Array of valid modifier names.
+ * @returns JSON schema for modifiers array validation.
+ */
+function buildCustomGroupModifiersJsonSchema(modifiers) {
+ return {
+ items: {
+ enum: [...modifiers],
+ type: 'string',
+ },
+ description: 'Modifier filters.',
+ type: 'array',
+ }
+}
+/**
+ * Builds JSON schema for custom group selector configuration.
+ *
+ * Creates a schema that validates a selector string used to match specific
+ * types of elements in a custom group.
+ *
+ * @example
+ *
+ * ```ts
+ * // For class members:
+ * buildCustomGroupSelectorJsonSchema([
+ * 'property',
+ * 'method',
+ * 'constructor',
+ * 'accessor',
+ * ])
+ * ```
+ *
+ * @param selectors - Array of valid selector names.
+ * @returns JSON schema for selector validation.
+ */
+function buildCustomGroupSelectorJsonSchema(selectors) {
+ return {
+ description: 'Selector filter.',
+ enum: [...selectors],
+ type: 'string',
+ }
+}
+function buildCommonCustomGroupJsonSchemas({
+ allowedAdditionalTypeValues,
+ additionalSortProperties,
+}) {
+ return {
+ fallbackSort: buildFallbackSortJsonSchema({
+ additionalProperties: additionalSortProperties,
+ allowedAdditionalTypeValues,
+ }),
+ type: buildTypeJsonSchema({
+ allowedAdditionalValues: allowedAdditionalTypeValues,
+ }),
+ groupName: {
+ description: 'Custom group name.',
+ type: 'string',
+ },
+ newlinesInside: newlinesInsideJsonSchema,
+ order: orderJsonSchema,
+ ...additionalSortProperties,
+ }
+}
+function buildPopulatedCustomGroupMatchPropertiesJsonSchema(
+ customGroupMatchOptionsJsonSchema,
+) {
+ return {
+ elementNamePattern: buildRegexJsonSchema(),
+ ...customGroupMatchOptionsJsonSchema,
+ }
+}
+export {
+ buildCommonGroupsJsonSchemas,
+ buildCustomGroupModifiersJsonSchema,
+ buildCustomGroupSelectorJsonSchema,
+ buildCustomGroupsArrayJsonSchema,
+ buildGroupsJsonSchema,
+ newlinesBetweenJsonSchema,
+ newlinesInsideJsonSchema,
+}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/json-schemas/common-json-schemas.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/json-schemas/common-json-schemas.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..b1da35091f04673896fa779925f081d51dcfebf5
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/json-schemas/common-json-schemas.d.ts
@@ -0,0 +1,72 @@
+import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'
+/**
+ * JSON schema for the sort order option. Validates ascending or descending sort
+ * direction.
+ */
+export declare let orderJsonSchema: JSONSchema4
+export declare let matchesAstSelectorJsonSchema: JSONSchema4
+/**
+ * Builds a collection of common JSON schemas used across sorting rules.
+ *
+ * Creates schemas for standard sorting options that are shared by multiple
+ * rules. This ensures consistent validation across the plugin.
+ *
+ * @param options - Configuration options.
+ * @param options.additionalSortProperties - Extra sort-related option schemas
+ * to add at the root level and inside fallbackSort.
+ * @returns Object containing common JSON schemas for rule validation.
+ */
+export declare function buildCommonJsonSchemas({
+ allowedAdditionalTypeValues,
+ additionalSortProperties,
+}?: {
+ additionalSortProperties?: Record
+ allowedAdditionalTypeValues?: string[]
+}): Record
+/**
+ * Builds JSON schema for fallback sort configuration.
+ *
+ * Creates a schema for the fallback sorting option that is applied when the
+ * primary sort results in equality. Allows customization through additional
+ * properties.
+ *
+ * @param options - Configuration options.
+ * @param options.additionalProperties - Extra properties to include in the
+ * schema.
+ * @returns JSON schema for fallback sort validation.
+ */
+export declare function buildFallbackSortJsonSchema({
+ allowedAdditionalTypeValues,
+ additionalProperties,
+}: {
+ additionalProperties: Record | undefined
+ allowedAdditionalTypeValues: undefined | string[]
+}): JSONSchema4
+/**
+ * Builds JSON schema for conditional configuration blocks.
+ *
+ * Creates a schema for configuration that is applied only when certain
+ * conditions are met. Used for context-specific sorting rules where different
+ * configurations apply based on element patterns.
+ *
+ * @param options - Configuration options for the conditional block.
+ * @param options.additionalProperties - Extra properties to include in the
+ * schema.
+ * @returns JSON schema for conditional configuration validation.
+ */
+export declare function buildUseConfigIfJsonSchema({
+ additionalProperties,
+}?: {
+ additionalProperties?: Record
+}): JSONSchema4
+export declare function buildTypeJsonSchema({
+ allowedAdditionalValues,
+}: {
+ allowedAdditionalValues: undefined | string[]
+}): JSONSchema4
+export declare function buildRegexJsonSchema({
+ additionalProperties,
+}?: {
+ additionalProperties?: Record
+}): JSONSchema4
+export declare let useExperimentalDependencyDetectionJsonSchema: JSONSchema4
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/json-schemas/common-json-schemas.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/json-schemas/common-json-schemas.js
new file mode 100644
index 0000000000000000000000000000000000000000..9d55f3b1eeee533d5a24b4553edbda7630530fae
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/json-schemas/common-json-schemas.js
@@ -0,0 +1,207 @@
+/**
+ * JSON schema for the sort order option. Validates ascending or descending sort
+ * direction.
+ */
+var orderJsonSchema = {
+ description:
+ 'Specifies whether to sort items in ascending or descending order.',
+ enum: ['asc', 'desc'],
+ type: 'string',
+}
+/**
+ * JSON schema for the custom alphabet option. Used with 'custom' sort type to
+ * define character ordering.
+ */
+var alphabetJsonSchema = {
+ description:
+ "Used only when the `type` option is set to `'custom'`. Specifies the custom alphabet for sorting.",
+ type: 'string',
+}
+/**
+ * JSON schema for the locales option. Validates locale settings for
+ * locale-aware string comparison.
+ */
+var localesJsonSchema = {
+ oneOf: [
+ { type: 'string' },
+ {
+ items: { type: 'string' },
+ type: 'array',
+ },
+ ],
+ description: 'Specifies the sorting locales.',
+}
+/**
+ * JSON schema for the ignoreCase option. Controls case sensitivity in string
+ * comparisons.
+ */
+var ignoreCaseJsonSchema = {
+ description: 'Controls whether sorting should be case-sensitive or not.',
+ type: 'boolean',
+}
+/**
+ * JSON schema for the special characters handling option. Defines how special
+ * characters are treated during sorting.
+ */
+var specialCharactersJsonSchema = {
+ description:
+ 'Specifies whether to trim, remove, or keep special characters before sorting.',
+ enum: ['remove', 'trim', 'keep'],
+ type: 'string',
+}
+var matchesAstSelectorJsonSchema = {
+ description:
+ 'Specifies an AST selector to match elements for conditional configuration.',
+ type: 'string',
+}
+/**
+ * Builds a collection of common JSON schemas used across sorting rules.
+ *
+ * Creates schemas for standard sorting options that are shared by multiple
+ * rules. This ensures consistent validation across the plugin.
+ *
+ * @param options - Configuration options.
+ * @param options.additionalSortProperties - Extra sort-related option schemas
+ * to add at the root level and inside fallbackSort.
+ * @returns Object containing common JSON schemas for rule validation.
+ */
+function buildCommonJsonSchemas({
+ allowedAdditionalTypeValues,
+ additionalSortProperties,
+} = {}) {
+ return {
+ fallbackSort: buildFallbackSortJsonSchema({
+ additionalProperties: additionalSortProperties,
+ allowedAdditionalTypeValues,
+ }),
+ type: buildTypeJsonSchema({
+ allowedAdditionalValues: allowedAdditionalTypeValues,
+ }),
+ specialCharacters: specialCharactersJsonSchema,
+ ignoreCase: ignoreCaseJsonSchema,
+ alphabet: alphabetJsonSchema,
+ locales: localesJsonSchema,
+ order: orderJsonSchema,
+ ...additionalSortProperties,
+ }
+}
+/**
+ * Builds JSON schema for fallback sort configuration.
+ *
+ * Creates a schema for the fallback sorting option that is applied when the
+ * primary sort results in equality. Allows customization through additional
+ * properties.
+ *
+ * @param options - Configuration options.
+ * @param options.additionalProperties - Extra properties to include in the
+ * schema.
+ * @returns JSON schema for fallback sort validation.
+ */
+function buildFallbackSortJsonSchema({
+ allowedAdditionalTypeValues,
+ additionalProperties,
+}) {
+ return {
+ properties: {
+ type: buildTypeJsonSchema({
+ allowedAdditionalValues: allowedAdditionalTypeValues,
+ }),
+ order: orderJsonSchema,
+ ...additionalProperties,
+ },
+ description: 'Fallback sort order.',
+ additionalProperties: false,
+ required: ['type'],
+ type: 'object',
+ }
+}
+/**
+ * Builds JSON schema for conditional configuration blocks.
+ *
+ * Creates a schema for configuration that is applied only when certain
+ * conditions are met. Used for context-specific sorting rules where different
+ * configurations apply based on element patterns.
+ *
+ * @param options - Configuration options for the conditional block.
+ * @param options.additionalProperties - Extra properties to include in the
+ * schema.
+ * @returns JSON schema for conditional configuration validation.
+ */
+function buildUseConfigIfJsonSchema({ additionalProperties } = {}) {
+ return {
+ description:
+ 'Specifies filters to match a particular options configuration for a given element to sort.',
+ properties: {
+ allNamesMatchPattern: buildRegexJsonSchema(),
+ ...additionalProperties,
+ },
+ additionalProperties: false,
+ type: 'object',
+ }
+}
+function buildTypeJsonSchema({ allowedAdditionalValues }) {
+ return {
+ enum: [
+ 'alphabetical',
+ 'natural',
+ 'line-length',
+ 'custom',
+ 'unsorted',
+ 'subgroup-order',
+ ...(allowedAdditionalValues ?? []),
+ ],
+ description: 'Specifies the sorting method.',
+ type: 'string',
+ }
+}
+function buildRegexJsonSchema({ additionalProperties } = {}) {
+ return {
+ oneOf: [
+ {
+ items: buildSingleRegexJsonSchema({ additionalProperties }),
+ type: 'array',
+ },
+ buildSingleRegexJsonSchema({ additionalProperties }),
+ ],
+ description: 'Regular expression.',
+ }
+}
+function buildSingleRegexJsonSchema({ additionalProperties }) {
+ return {
+ oneOf: [
+ {
+ properties: {
+ ...additionalProperties,
+ pattern: {
+ description: 'Regular expression pattern.',
+ type: 'string',
+ },
+ flags: {
+ description: 'Regular expression flags.',
+ type: 'string',
+ },
+ },
+ additionalProperties: false,
+ required: ['pattern'],
+ type: 'object',
+ },
+ { type: 'string' },
+ ],
+ description: 'Regular expression.',
+ }
+}
+var useExperimentalDependencyDetectionJsonSchema = {
+ description:
+ 'Enables experimental dependency detection for sorting rules that support it.',
+ type: 'boolean',
+}
+export {
+ buildCommonJsonSchemas,
+ buildFallbackSortJsonSchema,
+ buildRegexJsonSchema,
+ buildTypeJsonSchema,
+ buildUseConfigIfJsonSchema,
+ matchesAstSelectorJsonSchema,
+ orderJsonSchema,
+ useExperimentalDependencyDetectionJsonSchema,
+}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/json-schemas/common-partition-json-schemas.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/json-schemas/common-partition-json-schemas.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..7ace839b7841400f775d7a6ef0798e9a22358c93
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/json-schemas/common-partition-json-schemas.d.ts
@@ -0,0 +1,11 @@
+import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'
+/**
+ * JSON schema for the partition by comment option. Validates configuration for
+ * splitting elements into partitions based on comments.
+ */
+export declare let partitionByCommentJsonSchema: JSONSchema4
+/**
+ * JSON schema for the partition by new line option. Controls whether to create
+ * separate partitions when newlines are encountered.
+ */
+export declare let partitionByNewlineJsonSchema: JSONSchema4
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/json-schemas/common-partition-json-schemas.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/json-schemas/common-partition-json-schemas.js
new file mode 100644
index 0000000000000000000000000000000000000000..5e9f8482b22dd9c6e2c9d6c3171e5c8714a1d7e9
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/json-schemas/common-partition-json-schemas.js
@@ -0,0 +1,41 @@
+import { buildRegexJsonSchema } from './common-json-schemas.js'
+var allowedPartitionByCommentJsonSchemas = [
+ { type: 'boolean' },
+ buildRegexJsonSchema(),
+]
+/**
+ * JSON schema for the partition by comment option. Validates configuration for
+ * splitting elements into partitions based on comments.
+ */
+var partitionByCommentJsonSchema = {
+ oneOf: [
+ ...allowedPartitionByCommentJsonSchemas,
+ {
+ properties: {
+ block: {
+ description: 'Enables specific block comments to separate the nodes.',
+ oneOf: allowedPartitionByCommentJsonSchemas,
+ },
+ line: {
+ description: 'Enables specific line comments to separate the nodes.',
+ oneOf: allowedPartitionByCommentJsonSchemas,
+ },
+ },
+ additionalProperties: false,
+ minProperties: 1,
+ type: 'object',
+ },
+ ],
+ description:
+ 'Enables the use of comments to separate the nodes into logical groups.',
+}
+/**
+ * JSON schema for the partition by new line option. Controls whether to create
+ * separate partitions when newlines are encountered.
+ */
+var partitionByNewlineJsonSchema = {
+ description:
+ 'Enables the use of newlines to separate the nodes into logical groups.',
+ type: 'boolean',
+}
+export { partitionByCommentJsonSchema, partitionByNewlineJsonSchema }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/json-schemas/scoped-regex-json-schema.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/json-schemas/scoped-regex-json-schema.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..3b7744b0cb38b7356bc0d05f638aacbd967f92ae
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/json-schemas/scoped-regex-json-schema.d.ts
@@ -0,0 +1,2 @@
+import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'
+export declare let scopedRegexJsonSchema: JSONSchema4
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/json-schemas/scoped-regex-json-schema.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/json-schemas/scoped-regex-json-schema.js
new file mode 100644
index 0000000000000000000000000000000000000000..cd52354129b9b961987188889dbe34196ba61813
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/json-schemas/scoped-regex-json-schema.js
@@ -0,0 +1,11 @@
+import { buildRegexJsonSchema } from './common-json-schemas.js'
+import { regexScopes } from '../../types/scoped-regex-option.js'
+var scopedRegexJsonSchema = buildRegexJsonSchema({
+ additionalProperties: {
+ scope: {
+ enum: [...regexScopes],
+ type: 'string',
+ },
+ },
+})
+export { scopedRegexJsonSchema }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/make-comment-above-fixes.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/make-comment-above-fixes.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..b083acfb1b124abfc1111c12c0eb5553aa84a235
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/make-comment-above-fixes.d.ts
@@ -0,0 +1,61 @@
+import { TSESLint } from '@typescript-eslint/utils'
+import { CommonGroupsOptions } from '../types/common-groups-options.js'
+import { SortingNode } from '../types/sorting-node.js'
+/**
+ * Parameters for generating comment-above fixes.
+ */
+interface MakeCommentAboveFixesParameters {
+ /**
+ * Configuration options containing groups and custom groups.
+ */
+ options: Pick<
+ CommonGroupsOptions,
+ 'customGroups' | 'groups'
+ >
+ /**
+ * ESLint source code object for accessing comments and tokens.
+ */
+ sourceCode: TSESLint.SourceCode
+ /**
+ * Sorted array of nodes to process for comment fixes.
+ */
+ sortedNodes: SortingNode[]
+ /**
+ * ESLint fixer object for creating fix operations.
+ */
+ fixer: TSESLint.RuleFixer
+}
+/**
+ * Generates fixes for adding or removing comment separators above groups.
+ *
+ * Processes sorted nodes to ensure that comment separators defined in the
+ * groups configuration are properly placed. This includes:
+ *
+ * - Adding missing comment separators above groups
+ * - Removing auto-generated comments that are no longer needed
+ * - Ensuring comments are in the correct position after sorting.
+ *
+ * The function handles the first node specially (checking if it needs a
+ * comment) and then processes pairs of adjacent nodes to determine comment
+ * placement.
+ *
+ * @example
+ *
+ * ```ts
+ * // Configuration with commentAbove
+ * const groups = ['imports', { commentAbove: 'Components' }, 'components']
+ *
+ * // Will add '// Components' comment above the components group
+ * // Will remove any misplaced auto-generated comments
+ * ```
+ *
+ * @param params - Parameters for generating fixes.
+ * @returns Array of ESLint fix operations to apply.
+ */
+export declare function makeCommentAboveFixes({
+ sortedNodes,
+ sourceCode,
+ options,
+ fixer,
+}: MakeCommentAboveFixesParameters): TSESLint.RuleFix[]
+export {}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/make-comment-above-fixes.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/make-comment-above-fixes.js
new file mode 100644
index 0000000000000000000000000000000000000000..b05c71f257a3939db7f1b3748d109e96c4fae840
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/make-comment-above-fixes.js
@@ -0,0 +1,153 @@
+import { isGroupWithOverridesOption } from './is-group-with-overrides-option.js'
+import { getGroupIndex } from './get-group-index.js'
+import { getCommentsBefore } from './get-comments-before.js'
+import { getCommentAboveThatShouldExist } from './get-comment-above-that-should-exist.js'
+/**
+ * Generates fixes for adding or removing comment separators above groups.
+ *
+ * Processes sorted nodes to ensure that comment separators defined in the
+ * groups configuration are properly placed. This includes:
+ *
+ * - Adding missing comment separators above groups
+ * - Removing auto-generated comments that are no longer needed
+ * - Ensuring comments are in the correct position after sorting.
+ *
+ * The function handles the first node specially (checking if it needs a
+ * comment) and then processes pairs of adjacent nodes to determine comment
+ * placement.
+ *
+ * @example
+ *
+ * ```ts
+ * // Configuration with commentAbove
+ * const groups = ['imports', { commentAbove: 'Components' }, 'components']
+ *
+ * // Will add '// Components' comment above the components group
+ * // Will remove any misplaced auto-generated comments
+ * ```
+ *
+ * @param params - Parameters for generating fixes.
+ * @returns Array of ESLint fix operations to apply.
+ */
+function makeCommentAboveFixes({ sortedNodes, sourceCode, options, fixer }) {
+ let allAutoAddedComments = new Set(
+ options.groups
+ .filter(group => isGroupWithOverridesOption(group))
+ .map(({ commentAbove }) => commentAbove)
+ .filter(comment => comment !== void 0),
+ )
+ let fixes = []
+ let firstNodeFixes = makeCommentAboveFix({
+ nextSortedSortingNode: sortedNodes[0],
+ sortedSortingNode: null,
+ allAutoAddedComments,
+ sourceCode,
+ options,
+ fixer,
+ })
+ fixes.push(...firstNodeFixes)
+ for (let i = 0; i < sortedNodes.length - 1; i++) {
+ let sortedSortingNode = sortedNodes.at(i)
+ let nodeFixes = makeCommentAboveFix({
+ nextSortedSortingNode: sortedNodes.at(i + 1),
+ allAutoAddedComments,
+ sortedSortingNode,
+ sourceCode,
+ options,
+ fixer,
+ })
+ fixes.push(...nodeFixes)
+ }
+ return fixes
+}
+/**
+ * Creates fixes for comment placement between two adjacent nodes.
+ *
+ * Determines whether a comment separator should exist between two nodes based
+ * on their group indices and configuration. Handles:
+ *
+ * - Adding a new comment if required but missing
+ * - Removing outdated auto-generated comments
+ * - Preserving manually added comments.
+ *
+ * The function checks if the next node should have a comment above it based on
+ * the groups configuration, then ensures the comment state matches the expected
+ * state.
+ *
+ * @param params - Parameters for creating fixes.
+ * @param params.sortedSortingNode - Previous node in sorted order (null for
+ * first node).
+ * @param params.nextSortedSortingNode - Current node to potentially add comment
+ * above.
+ * @param params.allAutoAddedComments - Set of all auto-generated comment texts.
+ * @param params.sourceCode - ESLint source code object.
+ * @param params.options - Groups and configuration options.
+ * @param params.fixer - ESLint fixer for creating fixes.
+ * @returns Array of fixes to add/remove comments.
+ */
+function makeCommentAboveFix({
+ nextSortedSortingNode,
+ allAutoAddedComments,
+ sortedSortingNode,
+ sourceCode,
+ options,
+ fixer,
+}) {
+ let leftGroupIndex =
+ sortedSortingNode ? getGroupIndex(options.groups, sortedSortingNode) : -1
+ let rightGroupIndex = getGroupIndex(options.groups, nextSortedSortingNode)
+ let commentAboveThatShouldExist = getCommentAboveThatShouldExist({
+ options: {
+ ...options,
+ groups: options.groups,
+ },
+ sortingNode: nextSortedSortingNode,
+ rightGroupIndex,
+ leftGroupIndex,
+ sourceCode,
+ })
+ let commentsBefore = getCommentsBefore({
+ node: nextSortedSortingNode.node,
+ sourceCode,
+ })
+ let autoAddedCommentsAboveToRemove = commentsBefore
+ .filter(
+ comment =>
+ !commentAboveThatShouldExist?.comment ||
+ comment.value.slice(1) !== commentAboveThatShouldExist.comment,
+ )
+ .filter(
+ comment =>
+ comment.type === 'Line' &&
+ allAutoAddedComments.has(comment.value.slice(1)),
+ )
+ let fixes = []
+ for (let autoAddedCommentAboveToRemove of autoAddedCommentsAboveToRemove) {
+ let nextToken = sourceCode.getTokenAfter(autoAddedCommentAboveToRemove)
+ fixes.push(
+ fixer.removeRange([
+ autoAddedCommentAboveToRemove.range[0],
+ nextToken.range[0],
+ ]),
+ )
+ }
+ if (commentAboveThatShouldExist && !commentAboveThatShouldExist.exists) {
+ let nodeToPutCommentBefore
+ if (
+ !sourceCode.getTokenBefore(nextSortedSortingNode.node) ||
+ !commentsBefore[0]
+ ) {
+ nodeToPutCommentBefore = nextSortedSortingNode.node
+ } else {
+ ;[nodeToPutCommentBefore] = commentsBefore
+ }
+ fixes.push(
+ fixer.insertTextBeforeRange(
+ nodeToPutCommentBefore.range,
+ `// ${commentAboveThatShouldExist.comment}\n`,
+ ),
+ )
+ }
+ return fixes
+}
+export { makeCommentAboveFixes }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/make-comment-after-fixes.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/make-comment-after-fixes.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..86603a0cf723ee35474f5667afb2d72bbfeefe02
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/make-comment-after-fixes.d.ts
@@ -0,0 +1,59 @@
+import { TSESLint } from '@typescript-eslint/utils'
+import { SortingNode } from '../types/sorting-node.js'
+/**
+ * Parameters for generating comment-after fixes.
+ */
+interface MakeCommentAfterFixesParameters {
+ /**
+ * ESLint source code object for accessing comments and tokens.
+ */
+ sourceCode: TSESLint.SourceCode
+ /**
+ * Array of nodes in their sorted order.
+ */
+ sortedNodes: SortingNode[]
+ /**
+ * ESLint fixer object for creating fix operations.
+ */
+ fixer: TSESLint.RuleFixer
+ /**
+ * Array of nodes in their original order.
+ */
+ nodes: SortingNode[]
+}
+/**
+ * Generates fixes for handling inline trailing comments during sorting.
+ *
+ * Ensures that inline comments (comments on the same line after code) are
+ * properly moved when their associated nodes are reordered during sorting. This
+ * maintains the relationship between code and its inline comments.
+ *
+ * The function compares the original node positions with the sorted positions
+ * and creates fixes only for nodes that have actually moved. For each moved
+ * node, it delegates to `makeSingleNodeCommentAfterFixes` to handle the
+ * specific comment adjustments.
+ *
+ * @example
+ *
+ * ```ts
+ * // Original code:
+ * const b = 2 // second value
+ * const a = 1 // first value
+ *
+ * // After sorting (with comment fixes):
+ * const a = 1 // first value
+ * const b = 2 // second value
+ *
+ * // Comments stay with their associated nodes
+ * ```
+ *
+ * @param params - Parameters for generating fixes.
+ * @returns Array of ESLint fix operations to apply.
+ */
+export declare function makeCommentAfterFixes({
+ sortedNodes,
+ sourceCode,
+ fixer,
+ nodes,
+}: MakeCommentAfterFixesParameters): TSESLint.RuleFix[]
+export {}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/make-comment-after-fixes.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/make-comment-after-fixes.js
new file mode 100644
index 0000000000000000000000000000000000000000..b462edf51015102487919fdadd4351ba4345ac8d
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/make-comment-after-fixes.js
@@ -0,0 +1,52 @@
+import { makeSingleNodeCommentAfterFixes } from './make-single-node-comment-after-fixes.js'
+/**
+ * Generates fixes for handling inline trailing comments during sorting.
+ *
+ * Ensures that inline comments (comments on the same line after code) are
+ * properly moved when their associated nodes are reordered during sorting. This
+ * maintains the relationship between code and its inline comments.
+ *
+ * The function compares the original node positions with the sorted positions
+ * and creates fixes only for nodes that have actually moved. For each moved
+ * node, it delegates to `makeSingleNodeCommentAfterFixes` to handle the
+ * specific comment adjustments.
+ *
+ * @example
+ *
+ * ```ts
+ * // Original code:
+ * const b = 2 // second value
+ * const a = 1 // first value
+ *
+ * // After sorting (with comment fixes):
+ * const a = 1 // first value
+ * const b = 2 // second value
+ *
+ * // Comments stay with their associated nodes
+ * ```
+ *
+ * @param params - Parameters for generating fixes.
+ * @returns Array of ESLint fix operations to apply.
+ */
+function makeCommentAfterFixes({ sortedNodes, sourceCode, fixer, nodes }) {
+ let fixes = []
+ for (let max = nodes.length, i = 0; i < max; i++) {
+ let sortingNode = nodes.at(i)
+ let sortedSortingNode = sortedNodes.at(i)
+ let { node } = sortingNode
+ let { node: sortedNode } = sortedSortingNode
+ if (node === sortedNode) {
+ continue
+ }
+ fixes.push(
+ ...makeSingleNodeCommentAfterFixes({
+ sortedNode,
+ sourceCode,
+ fixer,
+ node,
+ }),
+ )
+ }
+ return fixes
+}
+export { makeCommentAfterFixes }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/make-fixes.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/make-fixes.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..4dafbbb46a69d9612d6c79d0217e25ebad1f51be
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/make-fixes.d.ts
@@ -0,0 +1,106 @@
+import { TSESLint } from '@typescript-eslint/utils'
+import { CommonPartitionOptions } from '../types/common-partition-options.js'
+import { NewlinesBetweenValueGetter } from './get-newlines-between-errors.js'
+import { CommonGroupsOptions } from '../types/common-groups-options.js'
+import { SortingNode } from '../types/sorting-node.js'
+/**
+ * Parameters for generating all types of fixes during sorting.
+ *
+ * @template T - Type of sorting node extending the base SortingNode.
+ */
+interface MakeFixesParameters {
+ /**
+ * Optional configuration for various sorting behaviors.
+ */
+ options?: Pick &
+ CommonGroupsOptions
+ /**
+ * Optional function to customize newlines between specific nodes.
+ */
+ newlinesBetweenValueGetter?: NewlinesBetweenValueGetter
+ /**
+ * Whether to ignore the highest block comment for the first node. Useful
+ * for preserving file-level documentation comments.
+ */
+ ignoreFirstNodeHighestBlockComment?: boolean
+ /**
+ * ESLint source code object for accessing comments and tokens.
+ */
+ sourceCode: TSESLint.SourceCode
+ /**
+ * Whether any comment-above configuration is missing its comment.
+ */
+ hasCommentAboveMissing: boolean
+ /**
+ * ESLint fixer object for creating fix operations.
+ */
+ fixer: TSESLint.RuleFixer
+ /**
+ * Array of nodes in their sorted order.
+ */
+ sortedNodes: T[]
+ /**
+ * Array of nodes in their original order.
+ */
+ nodes: T[]
+}
+/**
+ * Orchestrates the generation of all necessary fixes for sorting operations.
+ *
+ * Coordinates different types of fixes in a specific priority order to ensure
+ * proper code transformation:
+ *
+ * 1. Order fixes - Reorders the nodes themselves
+ * 2. Comment-after fixes - Handles inline trailing comments (if needed)
+ * 3. Newlines fixes - Adjusts spacing between groups (if configured)
+ * 4. Comment-above fixes - Adds/removes separator comments (if only these are
+ * needed).
+ *
+ * The function returns early when higher-priority fixes are found, as applying
+ * multiple fix types simultaneously could cause conflicts. This ensures that
+ * each auto-fix operation focuses on one type of change at a time.
+ *
+ * Notes:
+ *
+ * - Order fixes replace node ranges; comment-after/newlines operate on inter-node
+ * ranges. They are designed not to overlap, but if ESLint discards
+ * overlapping replacements, a subsequent lint pass will apply the remaining
+ * fixes.
+ * - Comment-above fixes are not combined with other fix types to avoid noisy
+ * changes; they are applied only when nothing else is pending.
+ *
+ * @example
+ *
+ * ```ts
+ * // Configuration with groups and newlines
+ * const fixes = makeFixes({
+ * nodes: originalNodes,
+ * sortedNodes: sortedNodes,
+ * options: {
+ * groups: ['imports', 'types', 'functions'],
+ * newlinesBetween: 1,
+ * },
+ * sourceCode,
+ * fixer,
+ * hasCommentAboveMissing: false,
+ * })
+ * // Returns order fixes if nodes need reordering
+ * // Otherwise returns newlines fixes if spacing needs adjustment
+ * // Otherwise returns empty array
+ * ```
+ *
+ * @template T - Type of sorting node.
+ * @param params - Parameters for generating fixes.
+ * @returns Array of ESLint fix operations to apply, prioritized by type.
+ */
+export declare function makeFixes({
+ ignoreFirstNodeHighestBlockComment,
+ newlinesBetweenValueGetter,
+ hasCommentAboveMissing,
+ sortedNodes,
+ sourceCode,
+ options,
+ fixer,
+ nodes,
+}: MakeFixesParameters): TSESLint.RuleFix[]
+export {}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/make-fixes.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/make-fixes.js
new file mode 100644
index 0000000000000000000000000000000000000000..ee65335463a68b384a7487e3600b9dd5d2dfcd9a
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/make-fixes.js
@@ -0,0 +1,114 @@
+import { makeNewlinesBetweenFixes } from './make-newlines-between-fixes.js'
+import { makeCommentAfterFixes } from './make-comment-after-fixes.js'
+import { makeCommentAboveFixes } from './make-comment-above-fixes.js'
+import { makeOrderFixes } from './make-order-fixes.js'
+/**
+ * Orchestrates the generation of all necessary fixes for sorting operations.
+ *
+ * Coordinates different types of fixes in a specific priority order to ensure
+ * proper code transformation:
+ *
+ * 1. Order fixes - Reorders the nodes themselves
+ * 2. Comment-after fixes - Handles inline trailing comments (if needed)
+ * 3. Newlines fixes - Adjusts spacing between groups (if configured)
+ * 4. Comment-above fixes - Adds/removes separator comments (if only these are
+ * needed).
+ *
+ * The function returns early when higher-priority fixes are found, as applying
+ * multiple fix types simultaneously could cause conflicts. This ensures that
+ * each auto-fix operation focuses on one type of change at a time.
+ *
+ * Notes:
+ *
+ * - Order fixes replace node ranges; comment-after/newlines operate on inter-node
+ * ranges. They are designed not to overlap, but if ESLint discards
+ * overlapping replacements, a subsequent lint pass will apply the remaining
+ * fixes.
+ * - Comment-above fixes are not combined with other fix types to avoid noisy
+ * changes; they are applied only when nothing else is pending.
+ *
+ * @example
+ *
+ * ```ts
+ * // Configuration with groups and newlines
+ * const fixes = makeFixes({
+ * nodes: originalNodes,
+ * sortedNodes: sortedNodes,
+ * options: {
+ * groups: ['imports', 'types', 'functions'],
+ * newlinesBetween: 1,
+ * },
+ * sourceCode,
+ * fixer,
+ * hasCommentAboveMissing: false,
+ * })
+ * // Returns order fixes if nodes need reordering
+ * // Otherwise returns newlines fixes if spacing needs adjustment
+ * // Otherwise returns empty array
+ * ```
+ *
+ * @template T - Type of sorting node.
+ * @param params - Parameters for generating fixes.
+ * @returns Array of ESLint fix operations to apply, prioritized by type.
+ */
+function makeFixes({
+ ignoreFirstNodeHighestBlockComment,
+ newlinesBetweenValueGetter,
+ hasCommentAboveMissing,
+ sortedNodes,
+ sourceCode,
+ options,
+ fixer,
+ nodes,
+}) {
+ let orderFixes = makeOrderFixes({
+ ignoreFirstNodeHighestBlockComment,
+ sortedNodes,
+ sourceCode,
+ options,
+ nodes,
+ fixer,
+ })
+ let commentAfterFixes = makeCommentAfterFixes({
+ sortedNodes,
+ sourceCode,
+ nodes,
+ fixer,
+ })
+ if (commentAfterFixes.length > 0) {
+ return [...orderFixes, ...commentAfterFixes]
+ }
+ if (options?.groups) {
+ let newlinesFixes = makeNewlinesBetweenFixes({
+ options: {
+ ...options,
+ newlinesBetween: options.newlinesBetween,
+ groups: options.groups,
+ },
+ newlinesBetweenValueGetter,
+ sortedNodes,
+ sourceCode,
+ fixer,
+ nodes,
+ })
+ if (newlinesFixes.length > 0) {
+ return [...orderFixes, ...newlinesFixes]
+ }
+ }
+ if (orderFixes.length > 0) {
+ return orderFixes
+ }
+ if (!hasCommentAboveMissing || !options?.groups) {
+ return []
+ }
+ return makeCommentAboveFixes({
+ options: {
+ ...options,
+ groups: options.groups,
+ },
+ sortedNodes,
+ sourceCode,
+ fixer,
+ })
+}
+export { makeFixes }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/make-newlines-between-fixes.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/make-newlines-between-fixes.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..4eb4460ab440b8aaf8bd0601bf9a3fa802ddebe8
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/make-newlines-between-fixes.d.ts
@@ -0,0 +1,92 @@
+import { TSESLint } from '@typescript-eslint/utils'
+import { NewlinesBetweenValueGetter } from './get-newlines-between-errors.js'
+import { CommonGroupsOptions } from '../types/common-groups-options.js'
+import { SortingNode } from '../types/sorting-node.js'
+/**
+ * Parameters for generating newlines-between fixes.
+ *
+ * @template T - Type of sorting node extending the base SortingNode.
+ */
+interface MakeNewlinesBetweenFixesParameters {
+ /**
+ * Optional function to customize newlines between specific nodes. Allows
+ * overriding the default newlines behavior for specific cases.
+ */
+ newlinesBetweenValueGetter?: NewlinesBetweenValueGetter
+ /**
+ * Configuration options for groups and newlines.
+ */
+ options: CommonGroupsOptions
+ /**
+ * ESLint source code object for accessing text and locations.
+ */
+ sourceCode: TSESLint.SourceCode
+ /**
+ * ESLint fixer object for creating fix operations.
+ */
+ fixer: TSESLint.RuleFixer
+ /**
+ * Array of nodes in their sorted order.
+ */
+ sortedNodes: T[]
+ /**
+ * Array of nodes in their original order.
+ */
+ nodes: T[]
+}
+/**
+ * Generates fixes for adjusting newlines between groups of sorted elements.
+ *
+ * Processes pairs of adjacent nodes to ensure the correct number of newlines
+ * between them based on their group membership and configuration. The
+ * function:
+ *
+ * - Skips nodes in different partitions (they're sorted independently)
+ * - Skips cases where group order would be violated
+ * - Respects 'ignore' settings that preserve existing spacing
+ * - Calculates required newlines based on group configuration
+ * - Applies custom newlines getter if provided.
+ *
+ * @example
+ *
+ * ```ts
+ * // Configuration with newlines between groups
+ * const options = {
+ * groups: ['imports', 'types', 'functions'],
+ * newlinesBetween: 1, // 1 newline between groups
+ * }
+ *
+ * // Original: imports and types with no separation
+ * // After fix: adds 1 blank line between import and type groups
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * // Custom newlines getter
+ * const newlinesBetweenValueGetter = ({
+ * left,
+ * right,
+ * computedNewlinesBetween,
+ * }) => {
+ * // Add extra newline before main function
+ * if (right.name === 'main') {
+ * return computedNewlinesBetween + 1
+ * }
+ * return computedNewlinesBetween
+ * }
+ * ```
+ *
+ * @template T - Type of sorting node.
+ * @param params - Parameters for generating newlines fixes.
+ * @returns Array of ESLint fix operations to adjust spacing.
+ */
+export declare function makeNewlinesBetweenFixes({
+ newlinesBetweenValueGetter,
+ sortedNodes,
+ sourceCode,
+ options,
+ fixer,
+ nodes,
+}: MakeNewlinesBetweenFixesParameters): TSESLint.RuleFix[]
+export {}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/make-newlines-between-fixes.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/make-newlines-between-fixes.js
new file mode 100644
index 0000000000000000000000000000000000000000..79e6274af4d5eca38442f924f3664c8c9cc58925
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/make-newlines-between-fixes.js
@@ -0,0 +1,185 @@
+import { getNewlinesBetweenOption } from './get-newlines-between-option.js'
+import { getLinesBetween } from './get-lines-between.js'
+import { getGroupIndex } from './get-group-index.js'
+import { getNodeRange } from './get-node-range.js'
+/**
+ * Generates fixes for adjusting newlines between groups of sorted elements.
+ *
+ * Processes pairs of adjacent nodes to ensure the correct number of newlines
+ * between them based on their group membership and configuration. The
+ * function:
+ *
+ * - Skips nodes in different partitions (they're sorted independently)
+ * - Skips cases where group order would be violated
+ * - Respects 'ignore' settings that preserve existing spacing
+ * - Calculates required newlines based on group configuration
+ * - Applies custom newlines getter if provided.
+ *
+ * @example
+ *
+ * ```ts
+ * // Configuration with newlines between groups
+ * const options = {
+ * groups: ['imports', 'types', 'functions'],
+ * newlinesBetween: 1, // 1 newline between groups
+ * }
+ *
+ * // Original: imports and types with no separation
+ * // After fix: adds 1 blank line between import and type groups
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * // Custom newlines getter
+ * const newlinesBetweenValueGetter = ({
+ * left,
+ * right,
+ * computedNewlinesBetween,
+ * }) => {
+ * // Add extra newline before main function
+ * if (right.name === 'main') {
+ * return computedNewlinesBetween + 1
+ * }
+ * return computedNewlinesBetween
+ * }
+ * ```
+ *
+ * @template T - Type of sorting node.
+ * @param params - Parameters for generating newlines fixes.
+ * @returns Array of ESLint fix operations to adjust spacing.
+ */
+function makeNewlinesBetweenFixes({
+ newlinesBetweenValueGetter,
+ sortedNodes,
+ sourceCode,
+ options,
+ fixer,
+ nodes,
+}) {
+ let fixes = []
+ for (let i = 0; i < sortedNodes.length - 1; i++) {
+ let sortingNode = nodes.at(i)
+ let nextSortingNode = nodes.at(i + 1)
+ let sortedSortingNode = sortedNodes.at(i)
+ let nextSortedSortingNode = sortedNodes.at(i + 1)
+ if (sortedSortingNode.partitionId !== nextSortedSortingNode.partitionId) {
+ continue
+ }
+ let nodeGroupIndex = getGroupIndex(options.groups, sortedSortingNode)
+ let nextNodeGroupIndex = getGroupIndex(
+ options.groups,
+ nextSortedSortingNode,
+ )
+ if (nodeGroupIndex > nextNodeGroupIndex) {
+ continue
+ }
+ let newlinesBetween = getNewlinesBetweenOption({
+ nextNodeGroupIndex,
+ nodeGroupIndex,
+ options,
+ })
+ newlinesBetween =
+ newlinesBetweenValueGetter?.({
+ computedNewlinesBetween: newlinesBetween,
+ right: nextSortedSortingNode,
+ left: sortedSortingNode,
+ }) ?? newlinesBetween
+ if (newlinesBetween === 'ignore') {
+ continue
+ }
+ let currentNodeRange = getNodeRange({
+ node: sortingNode.node,
+ sourceCode,
+ })
+ let nextNodeRangeStart = getNodeRange({
+ node: nextSortingNode.node,
+ sourceCode,
+ }).at(0)
+ if (
+ getLinesBetween(sourceCode, sortingNode, nextSortingNode) ===
+ newlinesBetween
+ ) {
+ continue
+ }
+ let rangeToReplace = [currentNodeRange.at(1), nextNodeRangeStart]
+ let textBetweenNodes = sourceCode.text.slice(
+ currentNodeRange.at(1),
+ nextNodeRangeStart,
+ )
+ let rangeReplacement = computeRangeReplacement({
+ isOnSameLine:
+ sortingNode.node.loc.end.line === nextSortingNode.node.loc.start.line,
+ textBetweenNodes,
+ newlinesBetween,
+ })
+ fixes.push(fixer.replaceTextRange(rangeToReplace, rangeReplacement))
+ }
+ return fixes
+}
+/**
+ * Computes the replacement text for adjusting newlines between nodes.
+ *
+ * Handles the logic of adding or removing newlines while preserving necessary
+ * content like comments and semicolons. Special handling for:
+ *
+ * - Removing excessive newlines when fewer are needed
+ * - Adding newlines when more are needed
+ * - Preserving inline placement when nodes are on the same line.
+ *
+ * @param params - Parameters for computing replacement.
+ * @param params.textBetweenNodes - Original text between the two nodes.
+ * @param params.newlinesBetween - Number of newlines required (0 or more).
+ * @param params.isOnSameLine - Whether nodes are currently on the same line.
+ * @returns Replacement text with correct newlines, or undefined if no change
+ * needed.
+ */
+function computeRangeReplacement({
+ textBetweenNodes,
+ newlinesBetween,
+ isOnSameLine,
+}) {
+ let textBetweenNodesWithoutInvalidNewlines =
+ getStringWithoutInvalidNewlines(textBetweenNodes)
+ if (newlinesBetween === 0) {
+ return textBetweenNodesWithoutInvalidNewlines
+ }
+ let rangeReplacement = textBetweenNodesWithoutInvalidNewlines
+ for (let index = 0; index < newlinesBetween; index++) {
+ rangeReplacement = addNewlineBeforeFirstNewline(rangeReplacement)
+ }
+ if (!isOnSameLine) {
+ return rangeReplacement
+ }
+ return addNewlineBeforeFirstNewline(rangeReplacement)
+}
+/**
+ * Adds a newline before the first existing newline or at the end of string.
+ *
+ * Used to incrementally add newlines while preserving existing content. If no
+ * newline exists, appends one at the end. Otherwise, inserts before the first
+ * newline to maintain proper spacing.
+ *
+ * @param value - String to add a newline to.
+ * @returns String with an additional newline.
+ */
+function addNewlineBeforeFirstNewline(value) {
+ let firstNewlineIndex = value.indexOf('\n')
+ if (firstNewlineIndex === -1) {
+ return `${value}\n`
+ }
+ return `${value.slice(0, firstNewlineIndex)}\n${value.slice(firstNewlineIndex)}`
+}
+/**
+ * Removes excessive newlines from a string.
+ *
+ * Normalizes spacing by collapsing multiple consecutive newlines into single
+ * newlines and removing empty lines that contain only whitespace.
+ *
+ * @param value - String potentially containing excessive newlines.
+ * @returns String with normalized newlines.
+ */
+function getStringWithoutInvalidNewlines(value) {
+ return value.replaceAll(/\n\s*\n/gu, '\n').replaceAll(/\n+/gu, '\n')
+}
+export { makeNewlinesBetweenFixes }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/make-order-fixes.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/make-order-fixes.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..ee3a0337404f22b2fb2f40f2933b499905ea0705
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/make-order-fixes.d.ts
@@ -0,0 +1,85 @@
+import { TSESLint } from '@typescript-eslint/utils'
+import { CommonPartitionOptions } from '../types/common-partition-options.js'
+import { SortingNode } from '../types/sorting-node.js'
+/**
+ * Parameters for generating order fixes.
+ */
+interface MakeOrderFixesParameters {
+ /**
+ * Optional configuration options.
+ */
+ options?: Pick
+ /**
+ * Whether to ignore the highest block comment for the first node. Useful
+ * for preserving file-level documentation comments.
+ */
+ ignoreFirstNodeHighestBlockComment?: boolean
+ /**
+ * ESLint source code object for accessing text and ranges.
+ */
+ sourceCode: TSESLint.SourceCode
+ /**
+ * Array of nodes in their sorted order.
+ */
+ sortedNodes: SortingNode[]
+ /**
+ * ESLint fixer object for creating fix operations.
+ */
+ fixer: TSESLint.RuleFixer
+ /**
+ * Array of nodes in their original order.
+ */
+ nodes: SortingNode[]
+}
+/**
+ * Generates fixes for reordering nodes to their sorted positions.
+ *
+ * Creates text replacement fixes that swap node positions to achieve the
+ * desired sort order. The function handles several important edge cases:
+ *
+ * - Preserves leading comments and documentation
+ * - Maintains file-level block comments for the first node
+ * - Adds safety semicolons when needed to prevent ASI issues
+ * - Respects partition boundaries defined by comments.
+ *
+ * The function iterates through each node position and replaces the original
+ * node text with the text from the node that should be in that position
+ * according to the sorted order.
+ *
+ * @example
+ *
+ * ```ts
+ * // Original order:
+ * const b = 2
+ * const a = 1
+ *
+ * // After applying order fixes:
+ * const a = 1
+ * const b = 2
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * // Safety semicolon example
+ * // Original:
+ * const b = 2
+ * const a = 1 // 'a' will move to first position
+ *
+ * // After fix (semicolon added to prevent ASI issues):
+ * const a = 1
+ * const b = 2
+ * ```
+ *
+ * @param params - Parameters for generating order fixes.
+ * @returns Array of ESLint fix operations to reorder nodes.
+ */
+export declare function makeOrderFixes({
+ ignoreFirstNodeHighestBlockComment,
+ sortedNodes,
+ sourceCode,
+ options,
+ fixer,
+ nodes,
+}: MakeOrderFixesParameters): TSESLint.RuleFix[]
+export {}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/make-order-fixes.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/make-order-fixes.js
new file mode 100644
index 0000000000000000000000000000000000000000..f47a64e58280b52a83c8e4c5e3471eb7bb32ff88
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/make-order-fixes.js
@@ -0,0 +1,111 @@
+import { getNodeRange } from './get-node-range.js'
+/**
+ * Generates fixes for reordering nodes to their sorted positions.
+ *
+ * Creates text replacement fixes that swap node positions to achieve the
+ * desired sort order. The function handles several important edge cases:
+ *
+ * - Preserves leading comments and documentation
+ * - Maintains file-level block comments for the first node
+ * - Adds safety semicolons when needed to prevent ASI issues
+ * - Respects partition boundaries defined by comments.
+ *
+ * The function iterates through each node position and replaces the original
+ * node text with the text from the node that should be in that position
+ * according to the sorted order.
+ *
+ * @example
+ *
+ * ```ts
+ * // Original order:
+ * const b = 2
+ * const a = 1
+ *
+ * // After applying order fixes:
+ * const a = 1
+ * const b = 2
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * // Safety semicolon example
+ * // Original:
+ * const b = 2
+ * const a = 1 // 'a' will move to first position
+ *
+ * // After fix (semicolon added to prevent ASI issues):
+ * const a = 1
+ * const b = 2
+ * ```
+ *
+ * @param params - Parameters for generating order fixes.
+ * @returns Array of ESLint fix operations to reorder nodes.
+ */
+function makeOrderFixes({
+ ignoreFirstNodeHighestBlockComment,
+ sortedNodes,
+ sourceCode,
+ options,
+ fixer,
+ nodes,
+}) {
+ let fixes = []
+ for (let max = nodes.length, i = 0; i < max; i++) {
+ let sortingNode = nodes.at(i)
+ let sortedSortingNode = sortedNodes.at(i)
+ let { implicitDecorators, node } = sortingNode
+ let { addSafetySemicolonWhenInline, node: sortedNode } = sortedSortingNode
+ let isNodeFirstNode = node === nodes.at(0).node
+ let isSortedNodeFirstNode = sortedNode === nodes.at(0).node
+ if (node === sortedNode) {
+ continue
+ }
+ let sortedNodeCode = sourceCode.text.slice(
+ ...getNodeRange({
+ ignoreHighestBlockComment:
+ ignoreFirstNodeHighestBlockComment && isSortedNodeFirstNode,
+ implicitDecorators: sortedSortingNode.implicitDecorators,
+ node: sortedNode,
+ sourceCode,
+ options,
+ }),
+ )
+ let sortedNodeText = sourceCode.getText(sortedNode)
+ let nextToken = sourceCode
+ .getTokensAfter(node, {
+ includeComments: false,
+ count: 1,
+ })
+ .at(0)
+ let sortedNextNodeEndsWithSafeCharacter =
+ sortedNodeText.endsWith(';') || sortedNodeText.endsWith(',')
+ let isNextTokenOnSameLineAsNode =
+ nextToken?.loc.start.line === node.loc.end.line
+ let isNextTokenSafeCharacter =
+ nextToken?.value === ';' || nextToken?.value === ','
+ if (
+ addSafetySemicolonWhenInline &&
+ isNextTokenOnSameLineAsNode &&
+ !sortedNextNodeEndsWithSafeCharacter &&
+ !isNextTokenSafeCharacter
+ ) {
+ sortedNodeCode += ';'
+ }
+ fixes.push(
+ fixer.replaceTextRange(
+ getNodeRange({
+ ignoreHighestBlockComment:
+ ignoreFirstNodeHighestBlockComment && isNodeFirstNode,
+ implicitDecorators,
+ sourceCode,
+ options,
+ node,
+ }),
+ sortedNodeCode,
+ ),
+ )
+ }
+ return fixes
+}
+export { makeOrderFixes }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/make-single-node-comment-after-fixes.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/make-single-node-comment-after-fixes.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..3d84e044c2c579721cdc9446018db16af98aaf8e
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/make-single-node-comment-after-fixes.d.ts
@@ -0,0 +1,59 @@
+import { TSESLint } from '@typescript-eslint/utils'
+import { TSESTree } from '@typescript-eslint/types'
+/**
+ * Parameters for generating comment-after fixes for a single node.
+ */
+interface MakeSingleNodeCommentAfterFixesParameters {
+ /**
+ * The node in its sorted position.
+ */
+ sortedNode: TSESTree.Token | TSESTree.Node
+ /**
+ * The node in its original position.
+ */
+ node: TSESTree.Token | TSESTree.Node
+ /**
+ * ESLint source code object for accessing comments and tokens.
+ */
+ sourceCode: TSESLint.SourceCode
+ /**
+ * ESLint fixer object for creating fix operations.
+ */
+ fixer: TSESLint.RuleFixer
+}
+/**
+ * Generates fixes to move inline trailing comments with their associated nodes.
+ *
+ * When a node is moved during sorting, this function ensures that any inline
+ * comment on the same line (trailing comment) is moved along with it. This
+ * preserves the relationship between code and its inline documentation.
+ *
+ * The function:
+ *
+ * - Detects inline comments after the sorted node
+ * - Skips processing if nodes would end up on the same line
+ * - Removes the comment from its original position
+ * - Inserts it after the node's new position.
+ *
+ * @example
+ *
+ * ```ts
+ * // Original:
+ * const b = 2 // second value
+ * const a = 1 // first value
+ *
+ * // After sorting (with comment fixes):
+ * const a = 1 // first value
+ * const b = 2 // second value
+ * ```
+ *
+ * @param params - Parameters for generating comment fixes.
+ * @returns Array of ESLint fix operations, empty if no inline comment exists.
+ */
+export declare function makeSingleNodeCommentAfterFixes({
+ sortedNode,
+ sourceCode,
+ fixer,
+ node,
+}: MakeSingleNodeCommentAfterFixesParameters): TSESLint.RuleFix[]
+export {}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/make-single-node-comment-after-fixes.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/make-single-node-comment-after-fixes.js
new file mode 100644
index 0000000000000000000000000000000000000000..31f48445b185d96e27f5adacd0d7b50e8f613f65
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/make-single-node-comment-after-fixes.js
@@ -0,0 +1,131 @@
+/**
+ * Generates fixes to move inline trailing comments with their associated nodes.
+ *
+ * When a node is moved during sorting, this function ensures that any inline
+ * comment on the same line (trailing comment) is moved along with it. This
+ * preserves the relationship between code and its inline documentation.
+ *
+ * The function:
+ *
+ * - Detects inline comments after the sorted node
+ * - Skips processing if nodes would end up on the same line
+ * - Removes the comment from its original position
+ * - Inserts it after the node's new position.
+ *
+ * @example
+ *
+ * ```ts
+ * // Original:
+ * const b = 2 // second value
+ * const a = 1 // first value
+ *
+ * // After sorting (with comment fixes):
+ * const a = 1 // first value
+ * const b = 2 // second value
+ * ```
+ *
+ * @param params - Parameters for generating comment fixes.
+ * @returns Array of ESLint fix operations, empty if no inline comment exists.
+ */
+function makeSingleNodeCommentAfterFixes({
+ sortedNode,
+ sourceCode,
+ fixer,
+ node,
+}) {
+ let commentAfter = getCommentAfter(sortedNode, sourceCode)
+ let areNodesOnSameLine = node.loc.start.line === sortedNode.loc.end.line
+ if (!commentAfter || areNodesOnSameLine) {
+ return []
+ }
+ let fixes = []
+ let range = [
+ sourceCode.getTokenBefore(commentAfter).range.at(1),
+ commentAfter.range.at(1),
+ ]
+ fixes.push(fixer.replaceTextRange(range, ''))
+ let nodeToInsertAfter = computeNodeToInsertAfter({
+ sourceCode,
+ node,
+ })
+ let commentText = computeCommentTextToInsertAfter({
+ nodeToInsertAfter,
+ commentAfter,
+ sourceCode,
+ range,
+ })
+ fixes.push(fixer.insertTextAfter(nodeToInsertAfter, commentText))
+ return fixes
+}
+function computeNodeToInsertAfter({ sourceCode, node }) {
+ let tokenAfterNode = sourceCode.getTokenAfter(node)
+ if (tokenAfterNode?.type !== 'Punctuator') {
+ return node
+ }
+ if (!isRelevantPunctuator(tokenAfterNode)) {
+ return node
+ }
+ if (tokenAfterNode.loc.end.line !== node.loc.end.line) {
+ return node
+ }
+ return tokenAfterNode
+ function isRelevantPunctuator(punctuatorToken) {
+ switch (punctuatorToken.value) {
+ case ',':
+ case ':':
+ return true
+ default:
+ return false
+ }
+ }
+}
+function computeCommentTextToInsertAfter({
+ nodeToInsertAfter,
+ commentAfter,
+ sourceCode,
+ range,
+}) {
+ let commentText = sourceCode.text.slice(...range)
+ if (commentAfter.type !== 'Line') {
+ return commentText
+ }
+ if (
+ sourceCode.getTokenAfter(nodeToInsertAfter)?.loc.start.line !==
+ nodeToInsertAfter.loc.end.line
+ ) {
+ return commentText
+ }
+ commentText += '\n'
+ return commentText
+}
+/**
+ * Retrieves an inline comment that appears after a node on the same line.
+ *
+ * Searches for a comment token that:
+ *
+ * - Appears after the given node
+ * - Is on the same line as the node's end
+ * - Skips over punctuation like commas, semicolons, and colons.
+ *
+ * This helps identify inline trailing comments that should move with the node
+ * during sorting operations.
+ *
+ * @param node - The node to check for trailing comments.
+ * @param source - ESLint source code object.
+ * @returns The inline comment if found, null otherwise.
+ */
+function getCommentAfter(node, source) {
+ let token = source.getTokenAfter(node, {
+ filter: ({ value, type }) =>
+ type !== 'Punctuator' || ![',', ';', ':'].includes(value),
+ includeComments: true,
+ })
+ if (
+ (token?.type === 'Block' || token?.type === 'Line') &&
+ node.loc.end.line === token.loc.end.line
+ ) {
+ return token
+ }
+ return null
+}
+export { makeSingleNodeCommentAfterFixes }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/matches.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/matches.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..e5b8221871b99350c0b745561487cd05158f259a
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/matches.d.ts
@@ -0,0 +1,50 @@
+import { RegexOption } from '../types/common-options.js'
+/**
+ * Tests if a string matches a regular expression pattern.
+ *
+ * Supports multiple formats for regex options:
+ *
+ * - String: Treated as a regex pattern (e.g., "^foo$")
+ * - Array: Matches if any pattern in the array matches (OR logic)
+ * - Object: Pattern with optional flags (e.g., { pattern: "^foo$", flags: "i" }).
+ *
+ * The function recursively processes arrays of patterns and includes error
+ * handling for invalid regex configurations (e.g., passing RegExp objects
+ * instead of strings).
+ *
+ * @example
+ *
+ * ```ts
+ * // String pattern
+ * matches('foo', '^foo$') // Returns: true
+ * matches('foobar', '^foo$') // Returns: false
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * // Array of patterns (OR logic)
+ * matches('foo', ['bar', '^foo$']) // Returns: true (matches second pattern)
+ * matches('baz', ['bar', '^foo$']) // Returns: false (matches neither)
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * // Pattern with flags
+ * matches('FOO', {
+ * pattern: '^foo$',
+ * flags: 'i',
+ * }) // Returns: true (case-insensitive)
+ * matches('FOO', '^foo$') // Returns: false (case-sensitive)
+ * ```
+ *
+ * @param value - The string to test against the pattern(s).
+ * @param regexOption - The regex pattern(s) to match against.
+ * @returns True if the value matches the pattern(s), false otherwise.
+ * @throws {Error} If a RegExp object is passed instead of a string pattern.
+ */
+export declare function matches(
+ value: string,
+ regexOption: RegexOption,
+): boolean
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/matches.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/matches.js
new file mode 100644
index 0000000000000000000000000000000000000000..c04da9b8a6cd5a2bfc134f4d00778a875a8edb7d
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/matches.js
@@ -0,0 +1,60 @@
+/**
+ * Tests if a string matches a regular expression pattern.
+ *
+ * Supports multiple formats for regex options:
+ *
+ * - String: Treated as a regex pattern (e.g., "^foo$")
+ * - Array: Matches if any pattern in the array matches (OR logic)
+ * - Object: Pattern with optional flags (e.g., { pattern: "^foo$", flags: "i" }).
+ *
+ * The function recursively processes arrays of patterns and includes error
+ * handling for invalid regex configurations (e.g., passing RegExp objects
+ * instead of strings).
+ *
+ * @example
+ *
+ * ```ts
+ * // String pattern
+ * matches('foo', '^foo$') // Returns: true
+ * matches('foobar', '^foo$') // Returns: false
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * // Array of patterns (OR logic)
+ * matches('foo', ['bar', '^foo$']) // Returns: true (matches second pattern)
+ * matches('baz', ['bar', '^foo$']) // Returns: false (matches neither)
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * // Pattern with flags
+ * matches('FOO', {
+ * pattern: '^foo$',
+ * flags: 'i',
+ * }) // Returns: true (case-insensitive)
+ * matches('FOO', '^foo$') // Returns: false (case-sensitive)
+ * ```
+ *
+ * @param value - The string to test against the pattern(s).
+ * @param regexOption - The regex pattern(s) to match against.
+ * @returns True if the value matches the pattern(s), false otherwise.
+ * @throws {Error} If a RegExp object is passed instead of a string pattern.
+ */
+function matches(value, regexOption) {
+ if (Array.isArray(regexOption)) {
+ return regexOption.some(opt => matches(value, opt))
+ }
+ if (typeof regexOption === 'string') {
+ return new RegExp(regexOption).test(value)
+ }
+ if ('source' in regexOption) {
+ throw new Error(
+ 'Invalid configuration: please enter your RegExp expressions as strings.\nFor example, write ".*foo" instead of /.*foo/',
+ )
+ }
+ return new RegExp(regexOption.pattern, regexOption.flags).test(value)
+}
+export { matches }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/overload-signature/build-overload-signature-newlines-between-value-getter.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/overload-signature/build-overload-signature-newlines-between-value-getter.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..be21fe1ecc13673bcfca4311ddc2a3505af696a7
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/overload-signature/build-overload-signature-newlines-between-value-getter.d.ts
@@ -0,0 +1,16 @@
+import { TSESTree } from '@typescript-eslint/types'
+import { SortingNodeWithOverloadSignatureImplementation } from './overload-signature-group.js'
+import { NewlinesBetweenValueGetter } from '../get-newlines-between-errors.js'
+import { NewlinesBetweenOption } from '../../types/common-groups-options.js'
+/**
+ * Newlines between value getter for overload signatures.
+ *
+ * @param newlinesBetweenOverloadSignatures - Newlines between overload
+ * signatures option value.
+ * @returns NewlinesBetween option value.
+ */
+export declare function buildOverloadSignatureNewlinesBetweenValueGetter<
+ T extends TSESTree.Node,
+>(
+ newlinesBetweenOverloadSignatures: NewlinesBetweenOption,
+): NewlinesBetweenValueGetter>
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/overload-signature/build-overload-signature-newlines-between-value-getter.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/overload-signature/build-overload-signature-newlines-between-value-getter.js
new file mode 100644
index 0000000000000000000000000000000000000000..d319fa1d3f1d77836e167c5c58ffb497c7b923e4
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/overload-signature/build-overload-signature-newlines-between-value-getter.js
@@ -0,0 +1,22 @@
+/**
+ * Newlines between value getter for overload signatures.
+ *
+ * @param newlinesBetweenOverloadSignatures - Newlines between overload
+ * signatures option value.
+ * @returns NewlinesBetween option value.
+ */
+function buildOverloadSignatureNewlinesBetweenValueGetter(
+ newlinesBetweenOverloadSignatures,
+) {
+ return ({ computedNewlinesBetween, right, left }) => {
+ if (
+ left.overloadSignatureImplementation &&
+ left.overloadSignatureImplementation ===
+ right.overloadSignatureImplementation
+ ) {
+ return newlinesBetweenOverloadSignatures
+ }
+ return computedNewlinesBetween
+ }
+}
+export { buildOverloadSignatureNewlinesBetweenValueGetter }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/overload-signature/overload-signature-group.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/overload-signature/overload-signature-group.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..ff7a749c4679a351165507fded7f11d3bf3e2c2a
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/overload-signature/overload-signature-group.d.ts
@@ -0,0 +1,23 @@
+import { TSESTree } from '@typescript-eslint/utils'
+import { SortingNode } from '../../types/sorting-node.js'
+export type SortingNodeWithOverloadSignatureImplementation<
+ T extends TSESTree.Node,
+> = OverloadSignatureImplementation & SortingNode
+export interface OverloadSignatureImplementation {
+ overloadSignatureImplementation: null | T
+}
+/**
+ * Represents a group of overload signatures along with their implementation.
+ */
+export declare class OverloadSignatureGroup {
+ readonly implementation: T
+ private readonly _overloadSignatures
+ constructor({
+ overloadSignatures,
+ implementation,
+ }: {
+ overloadSignatures: T[]
+ implementation: T
+ })
+ doesNodeBelongToGroup(node: TSESTree.Node): boolean
+}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/overload-signature/overload-signature-group.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/overload-signature/overload-signature-group.js
new file mode 100644
index 0000000000000000000000000000000000000000..35426fa2f7b24046e74bf9a94c812c14b089613f
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/overload-signature/overload-signature-group.js
@@ -0,0 +1,15 @@
+/**
+ * Represents a group of overload signatures along with their implementation.
+ */
+var OverloadSignatureGroup = class {
+ implementation
+ _overloadSignatures
+ constructor({ overloadSignatures, implementation }) {
+ this._overloadSignatures = new Set(overloadSignatures)
+ this.implementation = implementation
+ }
+ doesNodeBelongToGroup(node) {
+ return this._overloadSignatures.has(node) || this.implementation === node
+ }
+}
+export { OverloadSignatureGroup }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/overload-signature/populate-sorting-node-groups-with-overload-signature.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/overload-signature/populate-sorting-node-groups-with-overload-signature.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..a36ea31fad72f2c2895d1f2fbd9169aedadfa344
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/overload-signature/populate-sorting-node-groups-with-overload-signature.d.ts
@@ -0,0 +1,25 @@
+import { TSESTree } from '@typescript-eslint/types'
+import {
+ OverloadSignatureImplementation,
+ OverloadSignatureGroup,
+} from './overload-signature-group.js'
+import { SortingNode } from '../../types/sorting-node.js'
+/**
+ * Populate sorting node groups with their corresponding overload signature
+ * implementations fields if they exist.
+ *
+ * @param params - The parameters.
+ * @param params.overloadSignatureGroups - List of overload signature groups.
+ * @param params.sortingNodeGroups - List of sorting node groups.
+ * @returns The populated sorting node groups.
+ */
+export declare function populateSortingNodeGroupsWithOverloadSignature<
+ OverloadSignatureNode extends TSESTree.Node,
+ T extends SortingNode,
+>({
+ overloadSignatureGroups,
+ sortingNodeGroups,
+}: {
+ overloadSignatureGroups: OverloadSignatureGroup[]
+ sortingNodeGroups: T[][]
+}): (OverloadSignatureImplementation & T)[][]
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/overload-signature/populate-sorting-node-groups-with-overload-signature.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/overload-signature/populate-sorting-node-groups-with-overload-signature.js
new file mode 100644
index 0000000000000000000000000000000000000000..366ac0677423b320283c28d9749df693c95a2e5b
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/overload-signature/populate-sorting-node-groups-with-overload-signature.js
@@ -0,0 +1,85 @@
+import { buildSortingNodeByNodeMap } from '../build-sorting-node-by-node-map.js'
+/**
+ * Populate sorting node groups with their corresponding overload signature
+ * implementations fields if they exist.
+ *
+ * @param params - The parameters.
+ * @param params.overloadSignatureGroups - List of overload signature groups.
+ * @param params.sortingNodeGroups - List of sorting node groups.
+ * @returns The populated sorting node groups.
+ */
+function populateSortingNodeGroupsWithOverloadSignature({
+ overloadSignatureGroups,
+ sortingNodeGroups,
+}) {
+ return sortingNodeGroups.map(sortingNodes =>
+ populateSortingNodeGroupWithOverloadSignature({
+ overloadSignatureGroups,
+ sortingNodes,
+ }),
+ )
+}
+function buildUpdatedSortingNode({
+ overloadSignatureGroups,
+ sortingNodeByNode,
+ sortingNode,
+}) {
+ let overloadSignatureImplementation = computeOverloadSignatureImplementation({
+ overloadSignatureGroups,
+ node: sortingNode.node,
+ })
+ if (!overloadSignatureImplementation) {
+ return {
+ ...sortingNode,
+ overloadSignatureImplementation: null,
+ }
+ }
+ let implementationSortingNode = sortingNodeByNode.get(
+ overloadSignatureImplementation,
+ )
+ /* v8 ignore if -- @preserve Unsure how we can reach that case */
+ if (!implementationSortingNode) {
+ return {
+ ...sortingNode,
+ overloadSignatureImplementation: null,
+ }
+ }
+ let {
+ addSafetySemicolonWhenInline,
+ isEslintDisabled,
+ node,
+ ...relevantImplementationSortingNodeFields
+ } = implementationSortingNode
+ return {
+ ...sortingNode,
+ ...relevantImplementationSortingNodeFields,
+ overloadSignatureImplementation,
+ }
+}
+function populateSortingNodeGroupWithOverloadSignature({
+ overloadSignatureGroups,
+ sortingNodes,
+}) {
+ let sortingNodeByNode = buildSortingNodeByNodeMap(sortingNodes)
+ return sortingNodes.map(sortingNode =>
+ buildUpdatedSortingNode({
+ overloadSignatureGroups,
+ sortingNodeByNode,
+ sortingNode,
+ }),
+ )
+}
+function computeOverloadSignatureImplementation({
+ overloadSignatureGroups,
+ node,
+}) {
+ let matchingOverloadSignature = overloadSignatureGroups.find(
+ overloadSignatureGroup =>
+ overloadSignatureGroup.doesNodeBelongToGroup(node),
+ )
+ if (!matchingOverloadSignature) {
+ return null
+ }
+ return matchingOverloadSignature.implementation
+}
+export { populateSortingNodeGroupsWithOverloadSignature }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/pairwise.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/pairwise.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..d07929ff234ec6fe0dc8ecd2d59d1ad6c3688d72
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/pairwise.d.ts
@@ -0,0 +1,35 @@
+/**
+ * Iterates through an array calling a callback for each adjacent pair.
+ *
+ * Processes elements in pairs where:
+ *
+ * - First call: left is null, right is the first element
+ * - Subsequent calls: left and right are adjacent elements.
+ *
+ * This pattern is particularly useful for comparing adjacent elements in
+ * sorting validation, where each element needs to be compared with its
+ * predecessor to ensure correct ordering.
+ *
+ * @example
+ *
+ * ```ts
+ * // Common use case: checking sort order
+ * const numbers = [1, 3, 2, 4]
+ * const errors: string[] = []
+ *
+ * pairwise(numbers, (left, right) => {
+ * if (left !== null && left > right) {
+ * errors.push(`${left} should come after ${right}`)
+ * }
+ * })
+ * // errors = ['3 should come after 2']
+ * ```
+ *
+ * @template T - Type of array elements.
+ * @param nodes - Array to iterate through.
+ * @param callback - Function called for each pair (including null for first).
+ */
+export declare function pairwise(
+ nodes: T[],
+ callback: (left: null | T, right: T) => void,
+): void
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/pairwise.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/pairwise.js
new file mode 100644
index 0000000000000000000000000000000000000000..ad02b380d8a7725ef11ab64d84b4e7552cf32e0f
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/pairwise.js
@@ -0,0 +1,41 @@
+/**
+ * Iterates through an array calling a callback for each adjacent pair.
+ *
+ * Processes elements in pairs where:
+ *
+ * - First call: left is null, right is the first element
+ * - Subsequent calls: left and right are adjacent elements.
+ *
+ * This pattern is particularly useful for comparing adjacent elements in
+ * sorting validation, where each element needs to be compared with its
+ * predecessor to ensure correct ordering.
+ *
+ * @example
+ *
+ * ```ts
+ * // Common use case: checking sort order
+ * const numbers = [1, 3, 2, 4]
+ * const errors: string[] = []
+ *
+ * pairwise(numbers, (left, right) => {
+ * if (left !== null && left > right) {
+ * errors.push(`${left} should come after ${right}`)
+ * }
+ * })
+ * // errors = ['3 should come after 2']
+ * ```
+ *
+ * @template T - Type of array elements.
+ * @param nodes - Array to iterate through.
+ * @param callback - Function called for each pair (including null for first).
+ */
+function pairwise(nodes, callback) {
+ if (nodes.length === 0) {
+ return
+ }
+ callback(null, nodes.at(0))
+ for (let i = 1; i < nodes.length; i++) {
+ callback(nodes.at(i - 1), nodes.at(i))
+ }
+}
+export { pairwise }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/populate-sorting-node-groups-with-dependencies.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/populate-sorting-node-groups-with-dependencies.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..d48f221dfd8c582d214a718f65634e4bde77dab0
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/populate-sorting-node-groups-with-dependencies.d.ts
@@ -0,0 +1,25 @@
+import { TSESTree } from '@typescript-eslint/types'
+import { SortingNodeWithDependencies } from './sort-nodes-by-dependencies.js'
+type WithDependencies = {
+ dependencies: string[]
+} & T
+/**
+ * Populate sorting node groups based on the dependencies matrix.
+ *
+ * @param params - The parameters object.
+ * @param params.dependenciesBySortingNode - A map of sorting nodes to their
+ * dependencies.
+ * @param params.sortingNodeGroups - An array of sorting node groups.
+ * @returns An array of sorting node groups with their dependencies.
+ */
+export declare function populateSortingNodeGroupsWithDependencies<
+ Node extends TSESTree.Node,
+ T extends Pick, 'dependencyNames' | 'node'>,
+>({
+ dependenciesBySortingNode,
+ sortingNodeGroups,
+}: {
+ dependenciesBySortingNode: Map
+ sortingNodeGroups: T[][]
+}): WithDependencies[][]
+export {}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/populate-sorting-node-groups-with-dependencies.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/populate-sorting-node-groups-with-dependencies.js
new file mode 100644
index 0000000000000000000000000000000000000000..7f703d5fdc9da3134334bee588900f71246e687d
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/populate-sorting-node-groups-with-dependencies.js
@@ -0,0 +1,46 @@
+/**
+ * Populate sorting node groups based on the dependencies matrix.
+ *
+ * @param params - The parameters object.
+ * @param params.dependenciesBySortingNode - A map of sorting nodes to their
+ * dependencies.
+ * @param params.sortingNodeGroups - An array of sorting node groups.
+ * @returns An array of sorting node groups with their dependencies.
+ */
+function populateSortingNodeGroupsWithDependencies({
+ dependenciesBySortingNode,
+ sortingNodeGroups,
+}) {
+ return sortingNodeGroups.map(sortingNodes =>
+ computeSortingNodeGroupWithDependencies({
+ dependenciesBySortingNode,
+ sortingNodes,
+ }),
+ )
+}
+function computeSortingNodeGroupWithDependencies({
+ dependenciesBySortingNode,
+ sortingNodes,
+}) {
+ return sortingNodes.map(computeSortingNodeWithDependencies)
+ function computeSortingNodeWithDependencies(sortingNode) {
+ return {
+ ...sortingNode,
+ dependencies: computeSortingNodeDependencies({
+ dependenciesBySortingNode,
+ sortingNode,
+ }),
+ }
+ }
+}
+function computeSortingNodeDependencies({
+ dependenciesBySortingNode,
+ sortingNode,
+}) {
+ let dependencies = dependenciesBySortingNode.get(sortingNode)
+ if (!dependencies) {
+ return []
+ }
+ return dependencies.flatMap(({ dependencyNames }) => dependencyNames)
+}
+export { populateSortingNodeGroupsWithDependencies }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/range-contains-range.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/range-contains-range.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..1b63fd0a3b80ce4cf7a8a49db41e32db321ae724
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/range-contains-range.d.ts
@@ -0,0 +1,12 @@
+import { TSESTree } from '@typescript-eslint/types'
+/**
+ * Check if a range contains another range.
+ *
+ * @param includingRange - The range that may include the other range.
+ * @param subRange - The range to check if it is included.
+ * @returns True if the includingRange contains the subRange, false otherwise.
+ */
+export declare function rangeContainsRange(
+ includingRange: TSESTree.Range,
+ subRange: TSESTree.Range,
+): boolean
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/range-contains-range.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/range-contains-range.js
new file mode 100644
index 0000000000000000000000000000000000000000..11f7cdc0c7b9df5900a9b888c65be9827359c2f9
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/range-contains-range.js
@@ -0,0 +1,11 @@
+/**
+ * Check if a range contains another range.
+ *
+ * @param includingRange - The range that may include the other range.
+ * @param subRange - The range to check if it is included.
+ * @returns True if the includingRange contains the subRange, false otherwise.
+ */
+function rangeContainsRange(includingRange, subRange) {
+ return includingRange[0] <= subRange[0] && includingRange[1] >= subRange[1]
+}
+export { rangeContainsRange }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/range-to-diff.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/range-to-diff.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..dcbacef7b31e8a63c47e560040c53b6c7db347e0
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/range-to-diff.d.ts
@@ -0,0 +1,43 @@
+import { TSESTree } from '@typescript-eslint/types'
+import { TSESLint } from '@typescript-eslint/utils'
+/**
+ * Calculates the size of a node excluding trailing punctuation.
+ *
+ * Computes the character length of a node's text representation, automatically
+ * subtracting trailing commas or semicolons from the size. This provides a more
+ * accurate measure of the actual content size, which is useful for sorting by
+ * line length.
+ *
+ * The function is widely used across all sorting rules when the sort type is
+ * set to 'line-length', ensuring consistent size calculation that ignores
+ * syntactic punctuation.
+ *
+ * @example
+ *
+ * ```ts
+ * // Node text: "const foo = 'bar';"
+ * rangeToDiff(node, sourceCode) // Returns: 17 (18 - 1 for semicolon)
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * // Node text: "{ name: 'John', age: 30 },"
+ * rangeToDiff(node, sourceCode) // Returns: 26 (27 - 1 for comma)
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * // Node text: "const value = 42"
+ * rangeToDiff(node, sourceCode) // Returns: 16 (no trailing punctuation)
+ * ```
+ *
+ * @param node - AST node to measure.
+ * @param sourceCode - ESLint source code object for text extraction.
+ * @returns Character count of the node excluding trailing comma or semicolon.
+ */
+export declare function rangeToDiff(
+ node: TSESTree.Node,
+ sourceCode: TSESLint.SourceCode,
+): number
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/range-to-diff.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/range-to-diff.js
new file mode 100644
index 0000000000000000000000000000000000000000..af40d15e768a5b663fc3374ac0924b75ba8b9946
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/range-to-diff.js
@@ -0,0 +1,45 @@
+/**
+ * Calculates the size of a node excluding trailing punctuation.
+ *
+ * Computes the character length of a node's text representation, automatically
+ * subtracting trailing commas or semicolons from the size. This provides a more
+ * accurate measure of the actual content size, which is useful for sorting by
+ * line length.
+ *
+ * The function is widely used across all sorting rules when the sort type is
+ * set to 'line-length', ensuring consistent size calculation that ignores
+ * syntactic punctuation.
+ *
+ * @example
+ *
+ * ```ts
+ * // Node text: "const foo = 'bar';"
+ * rangeToDiff(node, sourceCode) // Returns: 17 (18 - 1 for semicolon)
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * // Node text: "{ name: 'John', age: 30 },"
+ * rangeToDiff(node, sourceCode) // Returns: 26 (27 - 1 for comma)
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * // Node text: "const value = 42"
+ * rangeToDiff(node, sourceCode) // Returns: 16 (no trailing punctuation)
+ * ```
+ *
+ * @param node - AST node to measure.
+ * @param sourceCode - ESLint source code object for text extraction.
+ * @returns Character count of the node excluding trailing comma or semicolon.
+ */
+function rangeToDiff(node, sourceCode) {
+ let nodeText = sourceCode.getText(node)
+ let endsWithCommaOrSemicolon =
+ nodeText.endsWith(';') || nodeText.endsWith(',')
+ let [from, to] = node.range
+ return to - from - (endsWithCommaOrSemicolon ? 1 : 0)
+}
+export { rangeToDiff }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/report-all-errors.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/report-all-errors.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..ec04bf589f448515ad9e99b0dc164e9af59ea62e
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/report-all-errors.d.ts
@@ -0,0 +1,205 @@
+import { TSESLint } from '@typescript-eslint/utils'
+import { NewlinesBetweenValueGetter } from './get-newlines-between-errors.js'
+import { CommonPartitionOptions } from '../types/common-partition-options.js'
+import { CommonGroupsOptions } from '../types/common-groups-options.js'
+import { SortingNode } from '../types/sorting-node.js'
+/**
+ * Parameters for comprehensive error reporting across all sorting rules.
+ *
+ * @template MessageIds - Union of available message IDs for the rule.
+ * @template T - Type of sorting node extending the base SortingNode.
+ */
+interface ReportAllErrorsParameters<
+ MessageIds extends string,
+ T extends SortingNode,
+> {
+ /**
+ * Available message IDs for different types of violations.
+ *
+ * Each rule can customize these messages to provide context-specific error
+ * descriptions. Not all message types are required - only provide those
+ * relevant to the specific rule.
+ *
+ * @example
+ *
+ * ```ts
+ * // Class members rule with all message types
+ * availableMessageIds: {
+ * unexpectedOrder: 'unexpectedClassesOrder',
+ * unexpectedGroupOrder: 'unexpectedClassesGroupOrder',
+ * unexpectedDependencyOrder: 'unexpectedClassesDependencyOrder',
+ * missedSpacingBetweenMembers: 'missedSpacingBetweenClassMembers',
+ * extraSpacingBetweenMembers: 'extraSpacingBetweenClassMembers',
+ * missedCommentAbove: 'missedCommentAboveClassMember'
+ * }
+ * ```
+ */
+ availableMessageIds: {
+ /**
+ * Message when required spacing between members is missing.
+ */
+ missedSpacingBetweenMembers?: MessageIds
+ /**
+ * Message when there's extra spacing where it shouldn't be.
+ */
+ extraSpacingBetweenMembers?: MessageIds
+ /**
+ * Message when a dependency order is violated.
+ */
+ unexpectedDependencyOrder?: MessageIds
+ /**
+ * Message when elements are in wrong groups.
+ */
+ unexpectedGroupOrder: MessageIds
+ /**
+ * Message when a required comment above a group is missing.
+ */
+ missedCommentAbove?: MessageIds
+ /**
+ * Message for general ordering violations within a group.
+ */
+ unexpectedOrder: MessageIds
+ }
+ /**
+ * Configuration options for sorting and grouping.
+ *
+ * Extends MakeFixesParameters options with groups configuration. Includes
+ * all sorting preferences, partition settings, newlines configuration, and
+ * custom group definitions.
+ *
+ * @example
+ *
+ * ```ts
+ * options: {
+ * type: 'alphabetical',
+ * order: 'asc',
+ * groups: ['static-property', 'property', 'constructor', 'method'],
+ * newlinesBetween: 1,
+ * partitionByComment: true
+ * }
+ * ```
+ */
+ options: Pick &
+ CommonGroupsOptions
+ /**
+ * Function to get sorted nodes with or without ESLint-disabled nodes.
+ *
+ * This function is called twice by reportAllErrors:
+ *
+ * 1. With `false` to get all nodes for position mapping
+ * 2. With `true` to get nodes excluding disabled ones for error checking.
+ *
+ * This dual-call pattern ensures that ESLint-disabled nodes maintain their
+ * positions while not being considered for ordering violations.
+ *
+ * @param ignoreEslintDisabledNodes - Whether to exclude ESLint-disabled
+ * nodes.
+ * @returns Array of sorted nodes.
+ */
+ sortNodesExcludingEslintDisabled(ignoreEslintDisabledNodes: boolean): T[]
+ /**
+ * Optional function to determine newlines between specific node pairs.
+ *
+ * Allows rules to customize spacing logic for special cases, such as
+ * overload signatures in TypeScript or getter/setter pairs.
+ *
+ * @example
+ *
+ * ```ts
+ * // Classes: Keep overload signatures together
+ * newlinesBetweenValueGetter: ({
+ * left,
+ * right,
+ * computedNewlinesBetween,
+ * }) => {
+ * if (
+ * left.overloadSignaturesGroupId ===
+ * right.overloadSignaturesGroupId
+ * ) {
+ * return 0 // No newlines between overloads
+ * }
+ * return computedNewlinesBetween
+ * }
+ * ```
+ */
+ newlinesBetweenValueGetter?: NewlinesBetweenValueGetter
+ /**
+ * ESLint rule context for reporting errors.
+ *
+ * Used to access rule configuration, report violations, and provide fixes.
+ * The context includes the rule ID, options, settings, and methods for
+ * interacting with ESLint.
+ */
+ context: TSESLint.RuleContext
+ /**
+ * Whether to ignore the highest block comment above the first node.
+ *
+ * When true, preserves file-level documentation comments at the top of
+ * sorted blocks. This is useful for maintaining copyright headers, file
+ * descriptions, or other important documentation.
+ */
+ ignoreFirstNodeHighestBlockComment?: boolean
+ /**
+ * Array of all nodes to check for ordering violations.
+ *
+ * These are the nodes in their current order in the source code. The
+ * function will compare this order against the sorted order to identify and
+ * report all violations.
+ */
+ nodes: T[]
+}
+/**
+ * Detects and reports all sorting violations in a comprehensive manner.
+ *
+ * Performs a complete analysis of sorting errors including:
+ *
+ * - Order violations (elements in wrong positions)
+ * - Group order violations (elements in wrong groups)
+ * - Dependency violations (dependent elements before their dependencies)
+ * - Spacing issues (missing or extra newlines between groups)
+ * - Missing comment separators above groups.
+ *
+ * The function uses pairwise comparison to check each adjacent pair of nodes
+ * and accumulates all applicable error messages for each violation.
+ *
+ * @example
+ *
+ * ```ts
+ * // Import statements with violations
+ * import { useState } from 'react' // Should be after React import
+ * import React from 'react' // Group order violation
+ * import type { User } from './types.js' // Missing newline between groups
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * // Object properties with dependency violation
+ * const config = {
+ * apiUrl: process.env.API_URL,
+ * baseUrl: this.apiUrl + '/v1', // Depends on apiUrl
+ * timeout: 5000,
+ * headers: {
+ * Authorization: this.token, // Should be after token definition
+ * },
+ * token: getAuthToken(),
+ * }
+ * ```
+ *
+ * @template MessageIds - Union of available message IDs.
+ * @template T - Type of sorting node.
+ * @param params - Parameters for error detection and reporting.
+ */
+export declare function reportAllErrors<
+ MessageIds extends string,
+ T extends SortingNode = SortingNode,
+>({
+ ignoreFirstNodeHighestBlockComment,
+ sortNodesExcludingEslintDisabled,
+ newlinesBetweenValueGetter,
+ availableMessageIds,
+ context,
+ options,
+ nodes,
+}: ReportAllErrorsParameters): void
+export {}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/report-all-errors.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/report-all-errors.js
new file mode 100644
index 0000000000000000000000000000000000000000..cce3409822431da3f941bf13f639d02ff80c8265
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/report-all-errors.js
@@ -0,0 +1,212 @@
+import { getGroupIndex } from './get-group-index.js'
+import { getCommentAboveThatShouldExist } from './get-comment-above-that-should-exist.js'
+import { reportErrors } from './report-errors.js'
+import { computeNodesInCircularDependencies } from './compute-nodes-in-circular-dependencies.js'
+import { isNodeDependentOnOtherNode } from './is-node-dependent-on-other-node.js'
+import { getNewlinesBetweenErrors } from './get-newlines-between-errors.js'
+import { createNodeIndexMap } from './create-node-index-map.js'
+import { pairwise } from './pairwise.js'
+/**
+ * Detects and reports all sorting violations in a comprehensive manner.
+ *
+ * Performs a complete analysis of sorting errors including:
+ *
+ * - Order violations (elements in wrong positions)
+ * - Group order violations (elements in wrong groups)
+ * - Dependency violations (dependent elements before their dependencies)
+ * - Spacing issues (missing or extra newlines between groups)
+ * - Missing comment separators above groups.
+ *
+ * The function uses pairwise comparison to check each adjacent pair of nodes
+ * and accumulates all applicable error messages for each violation.
+ *
+ * @example
+ *
+ * ```ts
+ * // Import statements with violations
+ * import { useState } from 'react' // Should be after React import
+ * import React from 'react' // Group order violation
+ * import type { User } from './types' // Missing newline between groups
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * // Object properties with dependency violation
+ * const config = {
+ * apiUrl: process.env.API_URL,
+ * baseUrl: this.apiUrl + '/v1', // Depends on apiUrl
+ * timeout: 5000,
+ * headers: {
+ * Authorization: this.token, // Should be after token definition
+ * },
+ * token: getAuthToken(),
+ * }
+ * ```
+ *
+ * @template MessageIds - Union of available message IDs.
+ * @template T - Type of sorting node.
+ * @param params - Parameters for error detection and reporting.
+ */
+function reportAllErrors({
+ ignoreFirstNodeHighestBlockComment,
+ sortNodesExcludingEslintDisabled,
+ newlinesBetweenValueGetter,
+ availableMessageIds,
+ context,
+ options,
+ nodes,
+}) {
+ let { sourceCode } = context
+ let sortedNodes = sortNodesExcludingEslintDisabled(false)
+ let sortedNodesExcludingEslintDisabled =
+ sortNodesExcludingEslintDisabled(true)
+ let nodeIndexMap = createNodeIndexMap(sortedNodes)
+ let nodesInCircularDependencies =
+ availableMessageIds.unexpectedDependencyOrder ?
+ computeNodesInCircularDependencies(nodes)
+ : /* @__PURE__ */ new Set()
+ pairwise(nodes, (left, right) => {
+ let leftInfo =
+ left ?
+ {
+ groupIndex: getGroupIndex(options.groups, left),
+ index: nodeIndexMap.get(left),
+ }
+ : null
+ let rightGroupIndex = getGroupIndex(options.groups, right)
+ let rightIndex = nodeIndexMap.get(right)
+ let indexOfRightExcludingEslintDisabled =
+ sortedNodesExcludingEslintDisabled.indexOf(right)
+ let messageIds = []
+ let firstUnorderedNodeDependentOnRight
+ if (availableMessageIds.unexpectedDependencyOrder) {
+ firstUnorderedNodeDependentOnRight = getFirstUnorderedNodeDependentOn({
+ nodes,
+ node: right,
+ nodesInCircularDependencies,
+ })
+ }
+ if (
+ leftInfo &&
+ (firstUnorderedNodeDependentOnRight ||
+ leftInfo.index > rightIndex ||
+ (left?.isEslintDisabled &&
+ leftInfo.index >= indexOfRightExcludingEslintDisabled))
+ ) {
+ if (firstUnorderedNodeDependentOnRight) {
+ messageIds.push(availableMessageIds.unexpectedDependencyOrder)
+ } else {
+ messageIds.push(
+ (
+ leftInfo.groupIndex === rightGroupIndex ||
+ !availableMessageIds.unexpectedGroupOrder
+ ) ?
+ availableMessageIds.unexpectedOrder
+ : availableMessageIds.unexpectedGroupOrder,
+ )
+ }
+ }
+ if (
+ left &&
+ availableMessageIds.missedSpacingBetweenMembers &&
+ availableMessageIds.extraSpacingBetweenMembers
+ ) {
+ messageIds.push(
+ ...getNewlinesBetweenErrors({
+ options: {
+ ...options,
+ newlinesBetween: options.newlinesBetween,
+ },
+ missedSpacingError: availableMessageIds.missedSpacingBetweenMembers,
+ extraSpacingError: availableMessageIds.extraSpacingBetweenMembers,
+ leftGroupIndex: leftInfo.groupIndex,
+ newlinesBetweenValueGetter,
+ rightGroupIndex,
+ sourceCode,
+ right,
+ left,
+ }),
+ )
+ }
+ let commentAboveMissing
+ if (availableMessageIds.missedCommentAbove) {
+ let commentAboveThatShouldExist = getCommentAboveThatShouldExist({
+ leftGroupIndex: leftInfo?.groupIndex ?? null,
+ sortingNode: right,
+ rightGroupIndex,
+ sourceCode,
+ options,
+ })
+ if (commentAboveThatShouldExist && !commentAboveThatShouldExist.exists) {
+ commentAboveMissing = commentAboveThatShouldExist.comment
+ messageIds.push(availableMessageIds.missedCommentAbove)
+ }
+ }
+ reportErrors({
+ sortedNodes: sortedNodesExcludingEslintDisabled,
+ ignoreFirstNodeHighestBlockComment,
+ firstUnorderedNodeDependentOnRight,
+ newlinesBetweenValueGetter,
+ commentAboveMissing,
+ messageIds,
+ sourceCode,
+ options,
+ context,
+ nodes,
+ right,
+ left,
+ })
+ })
+}
+/**
+ * Finds the first node that depends on the given node but appears before it.
+ *
+ * Detects dependency violations where a dependent element appears before its
+ * dependency in the current order. This is crucial for maintaining logical
+ * ordering in code where some elements reference others.
+ *
+ * Nodes in circular dependencies are excluded from this check as they cannot be
+ * properly ordered.
+ *
+ * @example
+ *
+ * ```ts
+ * // TypeScript interface extending another
+ * interface AdminUser extends User {
+ * // This depends on User
+ * permissions: string[]
+ * }
+ * interface User {
+ * // But User appears after AdminUser
+ * id: string
+ * name: string
+ * }
+ * // Returns: AdminUser node (appears before its dependency).
+ * ```
+ *
+ * @template T - Type of sorting node with dependencies.
+ * @param params - Parameters for finding dependent nodes.
+ * @param params.nodesInCircularDependencies - Set of nodes in circular
+ * dependencies.
+ * @param params.nodes - All nodes in current order.
+ * @param params.node - The node to check for dependents.
+ * @returns First dependent node appearing before its dependency, or undefined.
+ */
+function getFirstUnorderedNodeDependentOn({
+ nodesInCircularDependencies,
+ nodes,
+ node,
+}) {
+ return nodes
+ .filter(
+ currentlyOrderedNode =>
+ !nodesInCircularDependencies.has(currentlyOrderedNode) &&
+ isNodeDependentOnOtherNode(node, currentlyOrderedNode),
+ )
+ .find(firstNodeDependentOnNode => {
+ let currentIndexOfNode = nodes.indexOf(node)
+ return nodes.indexOf(firstNodeDependentOnNode) < currentIndexOfNode
+ })
+}
+export { reportAllErrors }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/report-errors.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/report-errors.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..2f51af00b81703910bba9700df95e67b77029e2e
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/report-errors.d.ts
@@ -0,0 +1,112 @@
+import { TSESLint } from '@typescript-eslint/utils'
+import { NewlinesBetweenValueGetter } from './get-newlines-between-errors.js'
+import { CommonPartitionOptions } from '../types/common-partition-options.js'
+import { CommonGroupsOptions } from '../types/common-groups-options.js'
+import { SortingNode } from '../types/sorting-node.js'
+export declare const RIGHT = 'right'
+export declare const LEFT = 'left'
+export declare const ORDER_ERROR: 'Expected "{{right}}" to come before "{{left}}".'
+export declare const DEPENDENCY_ORDER_ERROR: 'Expected dependency "{{right}}" to come before "{{nodeDependentOnRight}}".'
+export declare const GROUP_ORDER_ERROR: 'Expected "{{right}}" ({{rightGroup}}) to come before "{{left}}" ({{leftGroup}}).'
+export declare const EXTRA_SPACING_ERROR: 'Extra spacing between "{{left}}" and "{{right}}".'
+export declare const MISSED_SPACING_ERROR: 'Missed spacing between "{{left}}" and "{{right}}".'
+export declare const MISSED_COMMENT_ABOVE_ERROR: 'Missed comment "{{missedCommentAbove}}" above "{{right}}".'
+/**
+ * Parameters for reporting ESLint errors with auto-fix support.
+ *
+ * @template MessageIds - Union of available message IDs for the rule.
+ * @template T - Type of sorting node extending the base SortingNode.
+ */
+interface ReportErrorsParameters<
+ MessageIds extends string,
+ T extends SortingNode,
+> {
+ options?: Pick &
+ CommonGroupsOptions
+ newlinesBetweenValueGetter?: NewlinesBetweenValueGetter
+ context: TSESLint.RuleContext
+ ignoreFirstNodeHighestBlockComment?: boolean
+ firstUnorderedNodeDependentOnRight?: T
+ sourceCode: TSESLint.SourceCode
+ commentAboveMissing?: string
+ messageIds: MessageIds[]
+ sortedNodes: T[]
+ left: null | T
+ nodes: T[]
+ right: T
+}
+/**
+ * Reports ESLint errors with contextual data and auto-fix support.
+ *
+ * Generates ESLint error reports for each provided message ID, including:
+ *
+ * - Contextual data for error messages (element names, groups, dependencies)
+ * - Auto-fix function that applies all necessary corrections
+ * - Node location for error highlighting.
+ *
+ * The function supports dynamic message templates with placeholders that are
+ * replaced with actual values:
+ *
+ * - {{left}} / {{right}} - Element names in the comparison
+ * - {{leftGroup}} / {{rightGroup}} - Group names
+ * - {{nodeDependentOnRight}} - Name of dependent element
+ * - {{missedCommentAbove}} - Missing comment text.
+ *
+ * @example
+ *
+ * ```ts
+ * // Reporting import order violation
+ * reportErrors({
+ * messageIds: ['unexpectedOrder'],
+ * left: { name: 'useState', group: 'react' },
+ * right: { name: 'React', group: 'react' },
+ * // Error: "Expected 'React' to come before 'useState'"
+ * })
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * // Reporting dependency violation in TypeScript interfaces
+ * reportErrors({
+ * messageIds: ['unexpectedDependencyOrder'],
+ * right: { name: 'User', ... },
+ * firstUnorderedNodeDependentOnRight: { name: 'AdminUser extends User', ... },
+ * // Error: "Expected 'User' to come before 'AdminUser extends User' due to dependency"
+ * });
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * // Reporting missing newlines between import groups
+ * reportErrors({
+ * messageIds: ['missedSpacingBetweenMembers'],
+ * left: { name: 'React', group: 'external' },
+ * right: { name: './utils', group: 'internal' },
+ * // Error: "Expected newline between external and internal imports"
+ * })
+ * ```
+ *
+ * @template MessageIds - Union of message IDs.
+ * @template T - Type of sorting node.
+ * @param params - Parameters for error reporting.
+ */
+export declare function reportErrors<
+ MessageIds extends string,
+ T extends SortingNode,
+>({
+ firstUnorderedNodeDependentOnRight,
+ ignoreFirstNodeHighestBlockComment,
+ newlinesBetweenValueGetter,
+ commentAboveMissing,
+ sortedNodes,
+ messageIds,
+ sourceCode,
+ context,
+ options,
+ nodes,
+ right,
+ left,
+}: ReportErrorsParameters): void
+export {}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/report-errors.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/report-errors.js
new file mode 100644
index 0000000000000000000000000000000000000000..d5046aa7866197ca8ce6d1f6d7188582c4ffa4cf
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/report-errors.js
@@ -0,0 +1,145 @@
+import { makeFixes } from './make-fixes.js'
+var NODE_DEPENDENT_ON_RIGHT = 'nodeDependentOnRight'
+var RIGHT = 'right'
+var RIGHT_GROUP = 'rightGroup'
+var LEFT = 'left'
+var LEFT_GROUP = 'leftGroup'
+var MISSED_COMMENT_ABOVE = 'missedCommentAbove'
+var ORDER_ERROR = `Expected "{{${RIGHT}}}" to come before "{{${LEFT}}}".`
+var DEPENDENCY_ORDER_ERROR = `Expected dependency "{{${RIGHT}}}" to come before "{{${NODE_DEPENDENT_ON_RIGHT}}}".`
+var GROUP_ORDER_ERROR = `Expected "{{${RIGHT}}}" ({{${RIGHT_GROUP}}}) to come before "{{${LEFT}}}" ({{${LEFT_GROUP}}}).`
+var EXTRA_SPACING_ERROR = `Extra spacing between "{{${LEFT}}}" and "{{${RIGHT}}}".`
+var MISSED_SPACING_ERROR = `Missed spacing between "{{${LEFT}}}" and "{{${RIGHT}}}".`
+var MISSED_COMMENT_ABOVE_ERROR = `Missed comment "{{${MISSED_COMMENT_ABOVE}}}" above "{{${RIGHT}}}".`
+/**
+ * Reports ESLint errors with contextual data and auto-fix support.
+ *
+ * Generates ESLint error reports for each provided message ID, including:
+ *
+ * - Contextual data for error messages (element names, groups, dependencies)
+ * - Auto-fix function that applies all necessary corrections
+ * - Node location for error highlighting.
+ *
+ * The function supports dynamic message templates with placeholders that are
+ * replaced with actual values:
+ *
+ * - {{left}} / {{right}} - Element names in the comparison
+ * - {{leftGroup}} / {{rightGroup}} - Group names
+ * - {{nodeDependentOnRight}} - Name of dependent element
+ * - {{missedCommentAbove}} - Missing comment text.
+ *
+ * @example
+ *
+ * ```ts
+ * // Reporting import order violation
+ * reportErrors({
+ * messageIds: ['unexpectedOrder'],
+ * left: { name: 'useState', group: 'react' },
+ * right: { name: 'React', group: 'react' },
+ * // Error: "Expected 'React' to come before 'useState'"
+ * })
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * // Reporting dependency violation in TypeScript interfaces
+ * reportErrors({
+ * messageIds: ['unexpectedDependencyOrder'],
+ * right: { name: 'User', ... },
+ * firstUnorderedNodeDependentOnRight: { name: 'AdminUser extends User', ... },
+ * // Error: "Expected 'User' to come before 'AdminUser extends User' due to dependency"
+ * });
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * // Reporting missing newlines between import groups
+ * reportErrors({
+ * messageIds: ['missedSpacingBetweenMembers'],
+ * left: { name: 'React', group: 'external' },
+ * right: { name: './utils', group: 'internal' },
+ * // Error: "Expected newline between external and internal imports"
+ * })
+ * ```
+ *
+ * @template MessageIds - Union of message IDs.
+ * @template T - Type of sorting node.
+ * @param params - Parameters for error reporting.
+ */
+function reportErrors({
+ firstUnorderedNodeDependentOnRight,
+ ignoreFirstNodeHighestBlockComment,
+ newlinesBetweenValueGetter,
+ commentAboveMissing,
+ sortedNodes,
+ messageIds,
+ sourceCode,
+ context,
+ options,
+ nodes,
+ right,
+ left,
+}) {
+ for (let messageId of messageIds) {
+ context.report({
+ data: {
+ [NODE_DEPENDENT_ON_RIGHT]: firstUnorderedNodeDependentOnRight?.name,
+ [MISSED_COMMENT_ABOVE]: commentAboveMissing,
+ [LEFT]: toSingleLine(left?.name ?? ''),
+ [RIGHT]: toSingleLine(right.name),
+ [RIGHT_GROUP]: right.group,
+ [LEFT_GROUP]: left?.group,
+ },
+ fix: fixer =>
+ makeFixes({
+ hasCommentAboveMissing: !!commentAboveMissing,
+ ignoreFirstNodeHighestBlockComment,
+ newlinesBetweenValueGetter,
+ sortedNodes,
+ sourceCode,
+ options,
+ fixer,
+ nodes,
+ }),
+ node: right.node,
+ messageId,
+ })
+ }
+}
+/**
+ * Converts multi-line strings to single-line for error messages.
+ *
+ * Normalizes element names that may span multiple lines (like template
+ * literals, multi-line imports, or complex expressions) into a single line
+ * format suitable for error messages.
+ *
+ * @example
+ *
+ * ```ts
+ * toSingleLine(`
+ * import {
+ * Component
+ * } from 'react'
+ * `)
+ * // Returns: "import { Component } from 'react'"
+ * ```
+ *
+ * @param string - Multi-line string to normalize.
+ * @returns Single-line string with normalized whitespace.
+ */
+function toSingleLine(string) {
+ return string.replaceAll(/\s{2,}/gu, ' ').trim()
+}
+export {
+ DEPENDENCY_ORDER_ERROR,
+ EXTRA_SPACING_ERROR,
+ GROUP_ORDER_ERROR,
+ LEFT,
+ MISSED_COMMENT_ABOVE_ERROR,
+ MISSED_SPACING_ERROR,
+ ORDER_ERROR,
+ RIGHT,
+ reportErrors,
+}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/scoped-regex/matches-scoped-expressions.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/scoped-regex/matches-scoped-expressions.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..82be99924a04c437b53e6ed453b4d8a2c4a2960c
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/scoped-regex/matches-scoped-expressions.d.ts
@@ -0,0 +1,30 @@
+import { AST_NODE_TYPES } from '@typescript-eslint/utils'
+import { TSESTree } from '@typescript-eslint/types'
+import { ScopedRegexOption } from '../../types/scoped-regex-option.js'
+import { NodeOfType } from '../../types/node-of-type.js'
+export type NodeValuesComputer = (
+ node: NodeOfType,
+) => string[]
+/**
+ * Checks whether any of the parent nodes match the scoped regex patterns.
+ *
+ * @param params - The parameters object.
+ * @param params.nodeValuesComputer - Function to compute the string values of a
+ * node to match against.
+ * @param params.scopedRegexOption - The scoped regex option to match against.
+ * @param params.allowedNodeTypes - The set of allowed node types to consider.
+ * @param params.parentNodes - The parent nodes to check.
+ * @returns True if any parent node matches the scoped regex patterns, false
+ * otherwise.
+ */
+export declare function matchesScopedExpressions({
+ nodeValuesComputer,
+ scopedRegexOption,
+ allowedNodeTypes,
+ parentNodes,
+}: {
+ scopedRegexOption: ScopedRegexOption | undefined
+ nodeValuesComputer: NodeValuesComputer
+ parentNodes: TSESTree.Node[]
+ allowedNodeTypes: Set
+}): boolean
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/scoped-regex/matches-scoped-expressions.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/scoped-regex/matches-scoped-expressions.js
new file mode 100644
index 0000000000000000000000000000000000000000..7c362c7a981bea7eab64c51f13fccebeca62e6ff
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/scoped-regex/matches-scoped-expressions.js
@@ -0,0 +1,87 @@
+import { matches } from '../matches.js'
+import { partitionPatternsByScope } from './partition-patterns-by-scope.js'
+/**
+ * Checks whether any of the parent nodes match the scoped regex patterns.
+ *
+ * @param params - The parameters object.
+ * @param params.nodeValuesComputer - Function to compute the string values of a
+ * node to match against.
+ * @param params.scopedRegexOption - The scoped regex option to match against.
+ * @param params.allowedNodeTypes - The set of allowed node types to consider.
+ * @param params.parentNodes - The parent nodes to check.
+ * @returns True if any parent node matches the scoped regex patterns, false
+ * otherwise.
+ */
+function matchesScopedExpressions({
+ nodeValuesComputer,
+ scopedRegexOption,
+ allowedNodeTypes,
+ parentNodes,
+}) {
+ if (!scopedRegexOption) {
+ return true
+ }
+ let { shallowScopePatterns, deepScopePatterns } =
+ partitionPatternsByScope(scopedRegexOption)
+ return (
+ matchesShallowScopedExpressions({
+ patterns: shallowScopePatterns,
+ nodeValuesComputer,
+ allowedNodeTypes,
+ parentNodes,
+ }) ||
+ matchesDeepScopedExpressions({
+ patterns: deepScopePatterns,
+ nodeValuesComputer,
+ allowedNodeTypes,
+ parentNodes,
+ })
+ )
+}
+function matchesShallowScopedExpressions({
+ nodeValuesComputer,
+ allowedNodeTypes,
+ parentNodes,
+ patterns,
+}) {
+ let [firstParent] = parentNodes
+ // v8 ignore if -- @preserve Unsure how we can reach that case
+ if (!firstParent) {
+ return false
+ }
+ if (!isNodeTypeAmong(firstParent, allowedNodeTypes)) {
+ return false
+ }
+ return matchesParentExpression({
+ parentNode: firstParent,
+ nodeValuesComputer,
+ patterns,
+ })
+}
+function matchesDeepScopedExpressions({
+ nodeValuesComputer,
+ allowedNodeTypes,
+ parentNodes,
+ patterns,
+}) {
+ return parentNodes
+ .filter(parent => isNodeTypeAmong(parent, allowedNodeTypes))
+ .some(parentNode =>
+ matchesParentExpression({
+ nodeValuesComputer,
+ parentNode,
+ patterns,
+ }),
+ )
+}
+function matchesParentExpression({ nodeValuesComputer, parentNode, patterns }) {
+ let nodeValues = nodeValuesComputer(parentNode)
+ return patterns.some(nodeValueMatchesPattern)
+ function nodeValueMatchesPattern(pattern) {
+ return nodeValues.some(nodeValue => matches(nodeValue, pattern))
+ }
+}
+function isNodeTypeAmong(node, types) {
+ return types.has(node.type)
+}
+export { matchesScopedExpressions }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/scoped-regex/partition-patterns-by-scope.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/scoped-regex/partition-patterns-by-scope.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..43dcb25ae6566e8e1f32414790936d2766f5b8a9
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/scoped-regex/partition-patterns-by-scope.d.ts
@@ -0,0 +1,20 @@
+import { ScopedRegexOption, Scope } from '../../types/scoped-regex-option.js'
+export type SingleRegexOption =
+ | {
+ pattern: string
+ flags?: string
+ scope?: Scope
+ }
+ | string
+/**
+ * Partitions patterns by their scope (shallow or deep).
+ *
+ * @param patternOrPatterns - A single pattern or an array of patterns.
+ * @returns An object containing arrays of shallow and deep scope patterns.
+ */
+export declare function partitionPatternsByScope(
+ patternOrPatterns: ScopedRegexOption,
+): {
+ shallowScopePatterns: SingleRegexOption[]
+ deepScopePatterns: SingleRegexOption[]
+}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/scoped-regex/partition-patterns-by-scope.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/scoped-regex/partition-patterns-by-scope.js
new file mode 100644
index 0000000000000000000000000000000000000000..18baf97f570015384ffcb12b58fadab3fce6f3a1
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/scoped-regex/partition-patterns-by-scope.js
@@ -0,0 +1,38 @@
+/**
+ * Partitions patterns by their scope (shallow or deep).
+ *
+ * @param patternOrPatterns - A single pattern or an array of patterns.
+ * @returns An object containing arrays of shallow and deep scope patterns.
+ */
+function partitionPatternsByScope(patternOrPatterns) {
+ if (!Array.isArray(patternOrPatterns)) {
+ let isDeepScopePattern = isDeepScopedPattern(patternOrPatterns)
+ return {
+ shallowScopePatterns: isDeepScopePattern ? [] : [patternOrPatterns],
+ deepScopePatterns: isDeepScopePattern ? [patternOrPatterns] : [],
+ }
+ }
+ let deepScopedPatterns = []
+ let shallowScopedPatterns = []
+ for (let pattern of patternOrPatterns) {
+ if (isDeepScopedPattern(pattern)) {
+ deepScopedPatterns.push(pattern)
+ } else {
+ shallowScopedPatterns.push(pattern)
+ }
+ }
+ return {
+ shallowScopePatterns: shallowScopedPatterns,
+ deepScopePatterns: deepScopedPatterns,
+ }
+}
+function isDeepScopedPattern(pattern) {
+ if (typeof pattern !== 'object') {
+ return false
+ }
+ if (!('scope' in pattern)) {
+ return false
+ }
+ return pattern.scope === 'deep'
+}
+export { partitionPatternsByScope }
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/should-partition.d.ts b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/should-partition.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..261bdda852db9b73555aee51d6a0f84150db2cc0
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/should-partition.d.ts
@@ -0,0 +1,76 @@
+import { TSESLint } from '@typescript-eslint/utils'
+import { CommonPartitionOptions } from '../types/common-partition-options.js'
+import { SortingNode } from '../types/sorting-node.js'
+/**
+ * Parameters for determining if a new partition should start.
+ */
+interface ShouldPartitionParameters {
+ lastSortingNode: Pick | undefined
+ sortingNode: Pick
+ tokenValueToIgnoreBefore?: string
+ options: CommonPartitionOptions
+ sourceCode: TSESLint.SourceCode
+}
+/**
+ * Determines if a new partition (independent sorting section) should start.
+ *
+ * Partitions divide code into independent sections that are sorted separately,
+ * preventing elements from being moved across partition boundaries. This is
+ * critical for preserving logical groupings in code.
+ *
+ * A new partition is created when:
+ *
+ * - A partition comment is found before the current node
+ * - An empty line exists between nodes (when partitionByNewLine is enabled).
+ *
+ * @example
+ *
+ * ```ts
+ * // React component with partition comments
+ * import React from 'react'
+ * import { useState, useEffect } from 'react'
+ * // --- Utils --- <- This comment creates a partition
+ * import { formatDate } from './utils/date.js'
+ * import { apiClient } from './utils/api.js'
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * // Object with newline partitions
+ * const config = {
+ * // API settings
+ * apiUrl: 'https://api.example.com',
+ * timeout: 5000,
+ * // <- Empty line creates partition
+ * // UI settings
+ * theme: 'dark',
+ * language: 'en',
+ * }
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * // Class members with sections
+ * class UserService {
+ * private cache: Map;
+ * private logger: Logger;
+ *
+ * // Public methods section
+ * async getUser(id: string) { ... }
+ * async updateUser(id: string, data: Partial) { ... }
+ * }
+ * ```
+ *
+ * @param params - Parameters for partition detection.
+ * @returns True if a new partition should start at the current node.
+ */
+export declare function shouldPartition({
+ tokenValueToIgnoreBefore,
+ lastSortingNode,
+ sortingNode,
+ sourceCode,
+ options,
+}: ShouldPartitionParameters): boolean
+export {}
diff --git a/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/should-partition.js b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/should-partition.js
new file mode 100644
index 0000000000000000000000000000000000000000..75be6dc9812f6793d1e023921e2203e08dbe0b66
--- /dev/null
+++ b/tools/ui/node_modules/eslint-plugin-perfectionist/dist/utils/should-partition.js
@@ -0,0 +1,118 @@
+import { getLinesBetween } from './get-lines-between.js'
+import { isPartitionComment } from './is-partition-comment.js'
+import { getCommentsBefore } from './get-comments-before.js'
+/**
+ * Determines if a new partition (independent sorting section) should start.
+ *
+ * Partitions divide code into independent sections that are sorted separately,
+ * preventing elements from being moved across partition boundaries. This is
+ * critical for preserving logical groupings in code.
+ *
+ * A new partition is created when:
+ *
+ * - A partition comment is found before the current node
+ * - An empty line exists between nodes (when partitionByNewLine is enabled).
+ *
+ * @example
+ *
+ * ```ts
+ * // React component with partition comments
+ * import React from 'react'
+ * import { useState, useEffect } from 'react'
+ * // --- Utils --- <- This comment creates a partition
+ * import { formatDate } from './utils/date'
+ * import { apiClient } from './utils/api'
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * // Object with newline partitions
+ * const config = {
+ * // API settings
+ * apiUrl: 'https://api.example.com',
+ * timeout: 5000,
+ * // <- Empty line creates partition
+ * // UI settings
+ * theme: 'dark',
+ * language: 'en',
+ * }
+ * ```
+ *
+ * @example
+ *
+ * ```ts
+ * // Class members with sections
+ * class UserService {
+ * private cache: Map