Browse Source

[web-client] simple theme: stylelint LESS source files

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Markus Heiser 2 months ago
parent
commit
a8ed79b730

+ 1 - 0
client/simple/.gitignore

@@ -1,2 +1,3 @@
 dist
 dist
 node_modules
 node_modules
+.stylelintcache

+ 4 - 1
searx/static/themes/simple/.stylelintrc.json → client/simple/.stylelintrc.json

@@ -1,6 +1,9 @@
 {
 {
-  "extends": "stylelint-config-standard-less",
+  "formatter": "unix",
+  "plugins": [ "stylelint-prettier" ],
+  "extends": [ "stylelint-config-standard-less" ],
   "rules": {
   "rules": {
+    "prettier/prettier": true,
     "declaration-empty-line-before": null,
     "declaration-empty-line-before": null,
     "no-invalid-position-at-import-rule": null,
     "no-invalid-position-at-import-rule": null,
     "property-no-vendor-prefix": null,
     "property-no-vendor-prefix": null,

File diff suppressed because it is too large
+ 264 - 666
client/simple/package-lock.json


+ 6 - 1
client/simple/package.json

@@ -4,7 +4,7 @@
   "type": "module",
   "type": "module",
   "scripts": {
   "scripts": {
     "build": "vite build",
     "build": "vite build",
-    "fix": "eslint --fix"
+    "fix": "eslint --fix && stylelint --fix strict 'src/**/*.{css,scss,sass,less,styl,vue,svelte}'"
   },
   },
   "devDependencies": {
   "devDependencies": {
     "@eslint/js": "^9.19.0",
     "@eslint/js": "^9.19.0",
@@ -18,8 +18,13 @@
     "less-loader": "^12.2.0",
     "less-loader": "^12.2.0",
     "normalize.css": "^8.0.1",
     "normalize.css": "^8.0.1",
     "style-loader": "^4.0.0",
     "style-loader": "^4.0.0",
+    "stylelint": "^16.14.1",
+    "stylelint-config-standard": "^37.0.0",
+    "stylelint-config-standard-less": "^3.0.1",
+    "stylelint-prettier": "^5.0.3",
     "vite": "^6.0.7",
     "vite": "^6.0.7",
     "vite-plugin-static-copy": "^2.2.0",
     "vite-plugin-static-copy": "^2.2.0",
+    "vite-plugin-stylelint": "^6.0.0",
     "webpack": "^5.97.1",
     "webpack": "^5.97.1",
     "webpack-cli": "^6.0.1"
     "webpack-cli": "^6.0.1"
   },
   },

+ 7 - 0
client/simple/vite.config.js

@@ -4,6 +4,7 @@
 
 
 import { resolve } from "node:path";
 import { resolve } from "node:path";
 import { defineConfig } from "vite";
 import { defineConfig } from "vite";
+import stylelint from "vite-plugin-stylelint";
 import { viteStaticCopy } from "vite-plugin-static-copy";
 import { viteStaticCopy } from "vite-plugin-static-copy";
 
 
 
 
@@ -105,6 +106,12 @@ export default defineConfig({
 
 
   plugins: [
   plugins: [
 
 
+    stylelint({
+      build: true,
+      emitWarningAsError: true,
+      fix: true,
+    }),
+
     // Leaflet
     // Leaflet
 
 
     viteStaticCopy({
     viteStaticCopy({

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