mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-17 06:01:33 -06:00
WebUI: enforce sorted imports
Due to `allowSeparatedGroups = true`, the sorting is applied on a group of consecutive imports. That means a new group of imports can be created by adding a blank line.
This commit is contained in:
@@ -3,10 +3,11 @@ import Html from "eslint-plugin-html";
|
|||||||
import Js from "@eslint/js";
|
import Js from "@eslint/js";
|
||||||
import PluginQbtWebUI from "eslint-plugin-qbt-webui";
|
import PluginQbtWebUI from "eslint-plugin-qbt-webui";
|
||||||
import PreferArrowFunctions from "eslint-plugin-prefer-arrow-functions";
|
import PreferArrowFunctions from "eslint-plugin-prefer-arrow-functions";
|
||||||
import * as RegexpPlugin from "eslint-plugin-regexp";
|
|
||||||
import Stylistic from "@stylistic/eslint-plugin";
|
import Stylistic from "@stylistic/eslint-plugin";
|
||||||
import Unicorn from "eslint-plugin-unicorn";
|
import Unicorn from "eslint-plugin-unicorn";
|
||||||
|
|
||||||
|
import * as RegexpPlugin from "eslint-plugin-regexp";
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
Js.configs.recommended,
|
Js.configs.recommended,
|
||||||
RegexpPlugin.configs["flat/recommended"],
|
RegexpPlugin.configs["flat/recommended"],
|
||||||
@@ -45,6 +46,7 @@ export default [
|
|||||||
"prefer-template": "error",
|
"prefer-template": "error",
|
||||||
"radix": "error",
|
"radix": "error",
|
||||||
"require-await": "error",
|
"require-await": "error",
|
||||||
|
"sort-imports": ["error", { allowSeparatedGroups: true }],
|
||||||
"PluginQbtWebUI/prefix-inc-dec-operators": "error",
|
"PluginQbtWebUI/prefix-inc-dec-operators": "error",
|
||||||
"PreferArrowFunctions/prefer-arrow-functions": "error",
|
"PreferArrowFunctions/prefer-arrow-functions": "error",
|
||||||
"Stylistic/no-extra-semi": "error",
|
"Stylistic/no-extra-semi": "error",
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { expect, test } from "vitest";
|
import { expect, test } from "vitest";
|
||||||
|
|
||||||
import "../../private/scripts/misc.js";
|
import "../../private/scripts/misc.js";
|
||||||
|
|
||||||
test("Test toFixedPointString()", () => {
|
test("Test toFixedPointString()", () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user