Browse Source

Tidy linting, fix Biome warnings (#5173)

* Remove unnecessary Stylelint

Biome increasingly covers this, no need for the complexity.

* Tidy up Biome config
Alec Rust 3 months ago
parent
commit
0a89f4c86b

+ 0 - 18
.github/workflows/lint.yml

@@ -63,21 +63,3 @@ jobs:
 
 
       - name: Run Biome lint
       - name: Run Biome lint
         run: biome lint .
         run: biome lint .
-
-  stylelint:
-    name: Stylelint
-    runs-on: ubuntu-latest
-    steps:
-      - name: Checkout code
-        uses: actions/checkout@v5
-
-      - name: Setup Node
-        uses: actions/setup-node@v6
-        with:
-          node-version: "lts/*"
-
-      - name: Install Node packages
-        run: npm ci --ignore-scripts
-
-      - name: Run Stylelint
-        run: npx stylelint web/css/src/**/*.css

+ 2 - 4
.lintstagedrc.cjs

@@ -1,10 +1,8 @@
 module.exports = {
 module.exports = {
 	// Run markdownlint on MD files
 	// Run markdownlint on MD files
 	'*.md': 'markdownlint-cli2 --fix',
 	'*.md': 'markdownlint-cli2 --fix',
-	// Run Stylelint on CSS files
-	'*.css': 'stylelint --fix --allow-empty-input',
-	// Run Biome on TS, TSX, JS, JSX files
-	'*.{ts,js}?(x)': 'biome lint --write --no-errors-on-unmatched',
+	// Run Biome on certain file types
+	'*.{ts,js,css}?(x)': 'biome lint --write --no-errors-on-unmatched',
 	// Run Prettier where supported
 	// Run Prettier where supported
 	'*': 'prettier --write --ignore-unknown',
 	'*': 'prettier --write --ignore-unknown',
 };
 };

+ 0 - 10
.stylelintignore

@@ -1,10 +0,0 @@
-# Minified files
-web/css/src/dependencies
-*.min.css
-
-# Vendor/packages
-**/node_modules/
-**/vendor/
-
-# vitepress
-**/.vitepress/dist/

+ 0 - 11
.stylelintrc.cjs

@@ -1,11 +0,0 @@
-module.exports = {
-	extends: ['stylelint-config-standard'],
-	rules: {
-		'selector-class-pattern': null,
-		'no-descending-specificity': null,
-		'block-no-empty': null,
-		'declaration-block-no-shorthand-property-overrides': null,
-		// Seems to be broken a bit, but would be nice to have
-		// 'declaration-property-value-no-unknown': true,
-	},
-};

+ 0 - 1
.vscode/extensions.json

@@ -4,7 +4,6 @@
 		"esbenp.prettier-vscode",
 		"esbenp.prettier-vscode",
 		"DavidAnson.vscode-markdownlint",
 		"DavidAnson.vscode-markdownlint",
 		"biomejs.biome",
 		"biomejs.biome",
-		"stylelint.vscode-stylelint",
 		"timonwong.shellcheck",
 		"timonwong.shellcheck",
 		"mrmlnc.vscode-apache",
 		"mrmlnc.vscode-apache",
 		"william-voyek.vscode-nginx",
 		"william-voyek.vscode-nginx",

+ 1 - 1
.vscode/settings.json

@@ -7,7 +7,7 @@
 	"explorer.fileNesting.patterns": {
 	"explorer.fileNesting.patterns": {
 		"*.css": "${capture}.css.map",
 		"*.css": "${capture}.css.map",
 		"*.js": "${capture}.js.map",
 		"*.js": "${capture}.js.map",
-		"package.json": ".editorconfig, .biome*, .lintstaged*, .markdownlint-cli2*, .prettier*, .stylelint*, jsconfig.json, package-lock.json, renovate.json",
+		"package.json": ".editorconfig, .biome*, .lintstaged*, .markdownlint-cli2*, .prettier*, jsconfig.json, package-lock.json, renovate.json",
 		"readme*": "changelog*, contributing*, license*, security*"
 		"readme*": "changelog*, contributing*, license*, security*"
 	}
 	}
 }
 }

+ 13 - 10
biome.json

@@ -9,17 +9,16 @@
 		"ignoreUnknown": false,
 		"ignoreUnknown": false,
 		"includes": [
 		"includes": [
 			"**",
 			"**",
-			"!**/dist/",
+			"!**/dist",
+			"!**/vendor",
+			"!**/node_modules",
+			"!**/test-results",
+			"!**/.vitepress/cache",
+			"!**/test/test_helper",
+			"!**/email/examples/*.html",
 			"!**/*.bats",
 			"!**/*.bats",
 			"!**/*.min.css",
 			"!**/*.min.css",
-			"!**/*.min.js",
-			"!**/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"
+			"!**/*.min.js"
 		]
 		]
 	},
 	},
 	"formatter": {
 	"formatter": {
@@ -42,7 +41,11 @@
 				"noEmptyBlock": "off",
 				"noEmptyBlock": "off",
 				"noShorthandPropertyOverrides": "off",
 				"noShorthandPropertyOverrides": "off",
 				"noDuplicateProperties": "off",
 				"noDuplicateProperties": "off",
-				"noDoubleEquals": "off"
+				"noDoubleEquals": "off",
+				"noUnknownAtRules": "off"
+			},
+			"complexity": {
+				"noImportantStyles": "off"
 			}
 			}
 		}
 		}
 	},
 	},

+ 0 - 4
install/deb/filemanager/filegator/dist/css/hst-custom.css

@@ -151,9 +151,7 @@ html {
 
 
 .file-row.type-dir a.name:not([data-v])::before,
 .file-row.type-dir a.name:not([data-v])::before,
 .file-row.type-file a.name:not([data-v])::before {
 .file-row.type-file a.name:not([data-v])::before {
-	/* stylelint-disable */
 	font-family: "Font Awesome 5 Free" !important;
 	font-family: "Font Awesome 5 Free" !important;
-	/* stylelint-enable */
 }
 }
 
 
 .file-row.type-dir a.name:not([data-v])::before {
 .file-row.type-dir a.name:not([data-v])::before {
@@ -297,9 +295,7 @@ a:not([data-v])::before {
 
 
 .tree-list a:not([data-v])::before {
 .tree-list a:not([data-v])::before {
 	content: "\f07b" !important;
 	content: "\f07b" !important;
-	/* stylelint-disable */
 	font-family: "Font Awesome 5 Free" !important;
 	font-family: "Font Awesome 5 Free" !important;
-	/* stylelint-enable */
 	color: #f9b30f !important;
 	color: #f9b30f !important;
 }
 }
 
 

File diff suppressed because it is too large
+ 0 - 874
package-lock.json


+ 1 - 3
package.json

@@ -13,7 +13,7 @@
 		"docs:serve": "vitepress serve docs",
 		"docs:serve": "vitepress serve docs",
 		"docs:test": "vitest run --config docs/.vitepress/vitest.config.js",
 		"docs:test": "vitest run --config docs/.vitepress/vitest.config.js",
 		"build": "node build.js",
 		"build": "node build.js",
-		"lint": "prettier --cache --check . && biome lint . && stylelint web/css/src/**/*.css && markdownlint-cli2 *.md docs/**/*.md",
+		"lint": "prettier --cache --check . && biome lint . && markdownlint-cli2 *.md docs/**/*.md",
 		"lint-staged": "lint-staged",
 		"lint-staged": "lint-staged",
 		"format": "prettier --cache --write .",
 		"format": "prettier --cache --write .",
 		"preinstall": "npx only-allow npm",
 		"preinstall": "npx only-allow npm",
@@ -48,8 +48,6 @@
 		"prettier-plugin-nginx": "^1.0.3",
 		"prettier-plugin-nginx": "^1.0.3",
 		"prettier-plugin-sh": "^0.18.0",
 		"prettier-plugin-sh": "^0.18.0",
 		"prettier-plugin-sql": "^0.19.2",
 		"prettier-plugin-sql": "^0.19.2",
-		"stylelint": "^16.26.1",
-		"stylelint-config-standard": "^39.0.1",
 		"vitepress": "^1.6.4",
 		"vitepress": "^1.6.4",
 		"vitest": "^4.0.14",
 		"vitest": "^4.0.14",
 		"vue": "^3.5.25"
 		"vue": "^3.5.25"

Some files were not shown because too many files changed in this diff