Просмотр исходного кода

chore(deps): update linters (major) (#5078)

* chore(deps): update linters

* Fixed Biome JS Errors

-Update stylelint to last versions
-Disable sorting rules for Import
-Disable biome on web/css/src/media_queries.css due to custom-media not allowed as it requires postcss what we are using
- Exclude  install/deb/filemanager/filegator/dist/css/hst-custom.css for no default font...

* Now fix stylelint

* Enable assist/source/organizeImports and fix the order

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jaap Marcus <9754650+jaapmarcus@users.noreply.github.com>
renovate[bot] 3 месяцев назад
Родитель
Сommit
bcc12c615e

+ 8 - 6
biome.json

@@ -9,15 +9,17 @@
 		"ignoreUnknown": false,
 		"includes": [
 			"**",
-			"!**/dist/**",
+			"!**/dist/",
 			"!**/*.bats",
 			"!**/*.min.css",
 			"!**/*.min.js",
-			"!**/vendor/**",
-			"!**/node_modules/**",
-			"!**/test-results/**",
-			"!**/.vitepress/cache/**",
-			"!**/test/test_helper/**"
+			"!**/vendor/",
+			"!**/node_modules/",
+			"!**/test-results/",
+			"!**/.vitepress/cache/",
+			"!**/test/test_helper/",
+			"!web/css/src/media_queries.css",
+			"!install/deb/filemanager/filegator/dist/css/hst-custom.css"
 		]
 	},
 	"formatter": {

+ 2 - 2
docs/.vitepress/theme/components/CopyToClipboardInput.test.js

@@ -1,5 +1,5 @@
-import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
-import { render, fireEvent, screen, cleanup, waitFor } from '@testing-library/vue';
+import { cleanup, fireEvent, render, screen, waitFor } from '@testing-library/vue';
+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
 import CopyToClipboardInput from './CopyToClipboardInput.vue';
 
 // Mock the clipboard API

+ 2 - 2
docs/.vitepress/theme/components/InstallBuilder.test.js

@@ -1,6 +1,6 @@
-import { describe, it, expect, beforeEach, afterEach } from 'vitest';
-import { render, fireEvent, screen, cleanup, waitFor } from '@testing-library/vue';
+import { cleanup, fireEvent, render, screen, waitFor } from '@testing-library/vue';
 import FloatingVue from 'floating-vue';
+import { afterEach, beforeEach, describe, expect, it } from 'vitest';
 import InstallBuilder from './InstallBuilder.vue';
 
 describe('InstallBuilder', () => {

+ 1 - 1
docs/.vitepress/vitest.config.js

@@ -1,5 +1,5 @@
-import { defineConfig } from 'vitest/config';
 import vue from '@vitejs/plugin-vue';
+import { defineConfig } from 'vitest/config';
 
 export default defineConfig({
 	test: {

Разница между файлами не показана из-за своего большого размера
+ 269 - 308
package-lock.json


+ 2 - 2
package.json

@@ -47,8 +47,8 @@
 		"prettier-plugin-nginx": "^1.0.3",
 		"prettier-plugin-sh": "^0.18.0",
 		"prettier-plugin-sql": "^0.19.2",
-		"stylelint": "^16.26.0",
-		"stylelint-config-standard": "^38.0.0",
+		"stylelint": "^16.26.1",
+		"stylelint-config-standard": "^39.0.1",
 		"vitepress": "^1.6.4",
 		"vitest": "^4.0.14",
 		"vue": "^3.5.18"

+ 3 - 3
web/css/src/themes/default.css

@@ -1297,7 +1297,7 @@
 	@media (--viewport-medium) {
 		display: grid;
 		grid-template-columns: 1fr 2fr;
-		grid-gap: 20px;
+		gap: 20px;
 		align-items: flex-start;
 	}
 
@@ -1334,12 +1334,12 @@
 	@media (--viewport-small) {
 		display: grid;
 		grid-template-columns: 1fr 1fr;
-		grid-gap: 5px 40px;
+		gap: 5px 40px;
 	}
 
 	@media (--viewport-medium) {
 		font-size: 0.8rem;
-		grid-row-gap: 20px;
+		row-gap: 20px;
 		margin-top: 0;
 	}
 }

+ 2 - 2
web/css/src/utilities.css

@@ -11,7 +11,7 @@
 
 .u-hidden-visually {
 	border: 0 !important;
-	clip: rect(1px, 1px, 1px, 1px) !important;
+	clip-path: inset(1px) !important;
 	height: 1px !important;
 	overflow: hidden !important;
 	padding: 0 !important;
@@ -58,7 +58,7 @@
 }
 
 .u-text-break {
-	word-break: break-word !important;
+	overflow-wrap: break-word !important;
 }
 
 .u-text-no-wrap {

+ 4 - 4
web/js/src/index.js

@@ -1,10 +1,9 @@
-import alpineInit from './alpineInit';
-import focusFirstInput from './focusFirstInput';
 import handleAddIpLists from './addIpLists';
+import alpineInit from './alpineInit';
 import handleAutoTrimInputs from './autoTrimInputs';
+import handleClipboardCopy from './clipboardCopy';
 import handleConfirmAction from './confirmAction';
 import handleCopyCreds from './copyCreds';
-import handleClipboardCopy from './clipboardCopy';
 import handleCronGenerator from './cronGenerator';
 import handleDatabaseHints from './databaseHints';
 import handleDiscardAllMail from './discardAllMail';
@@ -12,6 +11,7 @@ import handleDnsRecordHint from './dnsRecordHint';
 import handleDocRootHint from './docRootHint';
 import handleEditWebListeners from './editWebListeners';
 import handleErrorMessage from './errorHandler';
+import focusFirstInput from './focusFirstInput';
 import handleFormSubmit from './formSubmit';
 import handleFtpAccountHints from './ftpAccountHints';
 import handleFtpAccounts from './ftpAccounts';
@@ -20,13 +20,13 @@ import handleListSorting from './listSorting';
 import handleListUnitSelect from './listUnitSelect';
 import handleNameServerInput from './nameServerInput';
 import handlePasswordInput from './passwordInput';
+import initRrdCharts from './rrdCharts';
 import handleShortcuts from './shortcuts';
 import handleStickyToolbar from './stickyToolbar';
 import handleSyncEmailValues from './syncEmailValues';
 import handleTabPanels from './tabPanels';
 import handleToggleAdvanced from './toggleAdvanced';
 import handleUnlimitedInput from './unlimitedInput';
-import initRrdCharts from './rrdCharts';
 import initWebTerminal from './webTerminal';
 
 initListeners();

+ 5 - 3
web/js/src/listSorting.js

@@ -61,15 +61,17 @@ export default function handleListSorting() {
 				const bAttr = b.getAttribute(`data-${state.sort_par}`);
 
 				if (state.sort_as_int) {
-					const aInt = Number.parseInt(aAttr);
-					const bInt = Number.parseInt(bAttr);
+					const aInt = Number.parseInt(aAttr, 10);
+					const bInt = Number.parseInt(bAttr, 10);
 					return aInt >= bInt ? state.sort_direction : state.sort_direction * -1;
 				}
 
 				return aAttr <= bAttr ? state.sort_direction : state.sort_direction * -1;
 			});
 
-			units.forEach((unit) => unitsContainer.appendChild(unit));
+			units.forEach((unit) => {
+				unitsContainer.appendChild(unit);
+			});
 		});
 	});
 }

+ 3 - 1
web/js/src/listUnitSelect.js

@@ -28,7 +28,9 @@ export default function handleListUnitSelect() {
 		checkboxes.forEach((checkbox) => {
 			checkbox.checked = isChecked;
 		});
-		units.forEach((unit) => updateUnitSelection(unit, isChecked));
+		units.forEach((unit) => {
+			updateUnitSelection(unit, isChecked);
+		});
 	});
 }
 

+ 3 - 1
web/js/src/navigation.js

@@ -61,7 +61,9 @@ function moveFocusLeftRight(direction) {
 		index = menuItems.indexOf(currentActive);
 	}
 
-	menuItems.forEach((item) => item.classList.remove('focus'));
+	menuItems.forEach((item) => {
+		item.classList.remove('focus');
+	});
 
 	if (direction === 'left') {
 		if (index > 0) {

+ 6 - 4
web/js/src/shortcuts.js

@@ -129,9 +129,9 @@ export default function handleShortcuts() {
 			{ key: 'A', ctrlKey: true, shiftKey: true },
 			(_evt) => {
 				const checked = document.querySelector('.js-unit-checkbox:eq(0)').checked;
-				document
-					.querySelectorAll('.js-unit')
-					.forEach((el) => el.classList.toggle('selected'), !checked);
+				document.querySelectorAll('.js-unit').forEach((el) => {
+					el.classList.toggle('selected', !checked);
+				});
 				document.querySelectorAll('.js-unit-checkbox').forEach((el) => {
 					el.checked = !checked;
 				});
@@ -313,7 +313,9 @@ export default function handleShortcuts() {
 			if (openDialog) {
 				openDialog.close();
 			}
-			document.querySelectorAll('input, checkbox, textarea, select').forEach((el) => el.blur());
+			document.querySelectorAll('input, checkbox, textarea, select').forEach((el) => {
+				el.blur();
+			});
 		})
 		.register(
 			{ code: 'ArrowLeft' },

+ 1 - 1
web/src/composer.json

@@ -10,6 +10,6 @@
         "symfony/process": "^7.3.0"
     },
     "require-dev": {
-        "squizlabs/php_codesniffer": "^3.13.5"
+        "squizlabs/php_codesniffer": "^4.0.1"
     }
 }

+ 10 - 10
web/src/composer.lock

@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "b2f49ccb56b1d15080dfa04c2b33888c",
+    "content-hash": "24b6bce0978a05035b84bc38445482b4",
     "packages": [
         {
             "name": "psr/container",
@@ -777,26 +777,26 @@
     "packages-dev": [
         {
             "name": "squizlabs/php_codesniffer",
-            "version": "3.13.5",
+            "version": "4.0.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git",
-                "reference": "0ca86845ce43291e8f5692c7356fccf3bcf02bf4"
+                "reference": "0525c73950de35ded110cffafb9892946d7771b5"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/0ca86845ce43291e8f5692c7356fccf3bcf02bf4",
-                "reference": "0ca86845ce43291e8f5692c7356fccf3bcf02bf4",
+                "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/0525c73950de35ded110cffafb9892946d7771b5",
+                "reference": "0525c73950de35ded110cffafb9892946d7771b5",
                 "shasum": ""
             },
             "require": {
                 "ext-simplexml": "*",
                 "ext-tokenizer": "*",
                 "ext-xmlwriter": "*",
-                "php": ">=5.4.0"
+                "php": ">=7.2.0"
             },
             "require-dev": {
-                "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4"
+                "phpunit/phpunit": "^8.4.0 || ^9.3.4 || ^10.5.32 || 11.3.3 - 11.5.28 || ^11.5.31"
             },
             "bin": [
                 "bin/phpcbf",
@@ -821,7 +821,7 @@
                     "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer/graphs/contributors"
                 }
             ],
-            "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
+            "description": "PHP_CodeSniffer tokenizes PHP files and detects violations of a defined set of coding standards.",
             "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer",
             "keywords": [
                 "phpcs",
@@ -852,7 +852,7 @@
                     "type": "thanks_dev"
                 }
             ],
-            "time": "2025-11-04T16:30:35+00:00"
+            "time": "2025-11-10T16:43:36+00:00"
         }
     ],
     "aliases": [],
@@ -864,5 +864,5 @@
         "composer": "*"
     },
     "platform-dev": {},
-    "plugin-api-version": "2.6.0"
+    "plugin-api-version": "2.9.0"
 }

Некоторые файлы не были показаны из-за большого количества измененных файлов