diff --git a/eslint.config.js b/eslint.config.js index b614137ec..6febe884d 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -26,6 +26,7 @@ export default tseslint.config([ ecmaVersion: 2020, globals: globals.browser, parserOptions: { + projectService: true, tsconfigRootDir: import.meta.dirname } }, @@ -67,16 +68,23 @@ export default tseslint.config([ ignoreRestSiblings: true } ], + "@typescript-eslint/no-misused-spread": ["error", {}], "sonarjs/cognitive-complexity": "off", + "sonarjs/deprecation": "off", + "sonarjs/different-types-comparison": "off", + "sonarjs/function-return-type": "off", "sonarjs/no-commented-code": "off", - "sonarjs/no-small-switch": "off", - "sonarjs/todo-tag": "off", + "sonarjs/no-dead-store": "off", + "sonarjs/no-duplicated-branches": "off", + "sonarjs/no-nested-conditional": "off", "sonarjs/no-nested-functions": "off", + "sonarjs/no-small-switch": "off", "sonarjs/no-unused-vars": "off", - "sonarjs/no-nested-conditional": "off", - "sonarjs/no-dead-store": "off", + "sonarjs/prefer-read-only-props": "off", + "sonarjs/prefer-regexp-exec": "off", "sonarjs/slow-regex": "off", - "sonarjs/no-duplicated-branches": "off" + "sonarjs/todo-tag": "off", + "sonarjs/use-type-alias": "off" } } ]); diff --git a/lib/components/group/sortByElementOffset.ts b/lib/components/group/sortByElementOffset.ts index cb9feffde..fe6f3e7aa 100644 --- a/lib/components/group/sortByElementOffset.ts +++ b/lib/components/group/sortByElementOffset.ts @@ -4,7 +4,7 @@ export function sortByElementOffset< Type extends { element: HTMLElement }, ReturnType extends Type[] >(orientation: Orientation, panelsOrSeparators: Type[]): ReturnType { - return panelsOrSeparators.sort( + return Array.from(panelsOrSeparators).sort( orientation === "horizontal" ? horizontalSort : verticalSort ) as ReturnType; } diff --git a/tsconfig.json b/tsconfig.json index 3ba460209..15c781ae6 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -32,7 +32,10 @@ ] }, "include": [ + "vite.config.ts", + "vitest.config.ts", "vitest.d.ts", + "vitest.setup.ts", "lib", "integrations", "scripts",