mirror of
				https://github.com/go-gitea/gitea
				synced 2025-10-31 11:28:24 +00:00 
			
		
		
		
	Run stylelint on .vue files (#24865)
- Run stylelint on .vue files - Fix discovered issues - Suppress warning spam from `declaration-strict-value` rule Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
		| @@ -11,6 +11,8 @@ overrides: | |||||||
|   - files: ["**/chroma/*", "**/codemirror/*"] |   - files: ["**/chroma/*", "**/codemirror/*"] | ||||||
|     rules: |     rules: | ||||||
|       block-no-empty: null |       block-no-empty: null | ||||||
|  |   - files: ["**/*.vue"] | ||||||
|  |     customSyntax: postcss-html | ||||||
|  |  | ||||||
| rules: | rules: | ||||||
|   alpha-value-notation: null |   alpha-value-notation: null | ||||||
| @@ -96,7 +98,7 @@ rules: | |||||||
|   property-no-vendor-prefix: null |   property-no-vendor-prefix: null | ||||||
|   rule-empty-line-before: null |   rule-empty-line-before: null | ||||||
|   rule-selector-property-disallowed-list: null |   rule-selector-property-disallowed-list: null | ||||||
|   scale-unlimited/declaration-strict-value: [[color, background-color, border-color, font-weight], {ignoreValues: /^(inherit|transparent|unset|initial|currentcolor|none)$/, ignoreFunctions: false}] |   scale-unlimited/declaration-strict-value: [[color, background-color, border-color, font-weight], {ignoreValues: /^(inherit|transparent|unset|initial|currentcolor|none)$/, ignoreFunctions: false, disableFix: true}] | ||||||
|   selector-attribute-name-disallowed-list: null |   selector-attribute-name-disallowed-list: null | ||||||
|   selector-attribute-operator-allowed-list: null |   selector-attribute-operator-allowed-list: null | ||||||
|   selector-attribute-operator-disallowed-list: null |   selector-attribute-operator-disallowed-list: null | ||||||
|   | |||||||
							
								
								
									
										4
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								Makefile
									
									
									
									
									
								
							| @@ -372,11 +372,11 @@ lint-js-fix: node_modules | |||||||
|  |  | ||||||
| .PHONY: lint-css | .PHONY: lint-css | ||||||
| lint-css: node_modules | lint-css: node_modules | ||||||
| 	npx stylelint --color --max-warnings=0 web_src/css | 	npx stylelint --color --max-warnings=0 web_src/css web_src/js/components/*.vue | ||||||
|  |  | ||||||
| .PHONY: lint-css-fix | .PHONY: lint-css-fix | ||||||
| lint-css-fix: node_modules | lint-css-fix: node_modules | ||||||
| 	npx stylelint --color --max-warnings=0 web_src/css --fix | 	npx stylelint --color --max-warnings=0 web_src/css web_src/js/components/*.vue --fix | ||||||
|  |  | ||||||
| .PHONY: lint-swagger | .PHONY: lint-swagger | ||||||
| lint-swagger: node_modules | lint-swagger: node_modules | ||||||
|   | |||||||
							
								
								
									
										53
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										53
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							| @@ -74,6 +74,7 @@ | |||||||
|         "eslint-plugin-wc": "1.5.0", |         "eslint-plugin-wc": "1.5.0", | ||||||
|         "jsdom": "22.0.0", |         "jsdom": "22.0.0", | ||||||
|         "markdownlint-cli": "0.34.0", |         "markdownlint-cli": "0.34.0", | ||||||
|  |         "postcss-html": "1.5.0", | ||||||
|         "stylelint": "15.6.2", |         "stylelint": "15.6.2", | ||||||
|         "stylelint-declaration-strict-value": "1.9.2", |         "stylelint-declaration-strict-value": "1.9.2", | ||||||
|         "svgo": "3.0.2", |         "svgo": "3.0.2", | ||||||
| @@ -5679,6 +5680,37 @@ | |||||||
|         "url": "https://github.com/sponsors/sindresorhus" |         "url": "https://github.com/sponsors/sindresorhus" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|  |     "node_modules/htmlparser2": { | ||||||
|  |       "version": "8.0.2", | ||||||
|  |       "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.2.tgz", | ||||||
|  |       "integrity": "sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==", | ||||||
|  |       "dev": true, | ||||||
|  |       "funding": [ | ||||||
|  |         "https://github.com/fb55/htmlparser2?sponsor=1", | ||||||
|  |         { | ||||||
|  |           "type": "github", | ||||||
|  |           "url": "https://github.com/sponsors/fb55" | ||||||
|  |         } | ||||||
|  |       ], | ||||||
|  |       "dependencies": { | ||||||
|  |         "domelementtype": "^2.3.0", | ||||||
|  |         "domhandler": "^5.0.3", | ||||||
|  |         "domutils": "^3.0.1", | ||||||
|  |         "entities": "^4.4.0" | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     "node_modules/htmlparser2/node_modules/entities": { | ||||||
|  |       "version": "4.5.0", | ||||||
|  |       "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", | ||||||
|  |       "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", | ||||||
|  |       "dev": true, | ||||||
|  |       "engines": { | ||||||
|  |         "node": ">=0.12" | ||||||
|  |       }, | ||||||
|  |       "funding": { | ||||||
|  |         "url": "https://github.com/fb55/entities?sponsor=1" | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|     "node_modules/http-errors": { |     "node_modules/http-errors": { | ||||||
|       "version": "2.0.0", |       "version": "2.0.0", | ||||||
|       "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", |       "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", | ||||||
| @@ -7871,6 +7903,27 @@ | |||||||
|         "node": "^10 || ^12 || >=14" |         "node": "^10 || ^12 || >=14" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|  |     "node_modules/postcss-html": { | ||||||
|  |       "version": "1.5.0", | ||||||
|  |       "resolved": "https://registry.npmjs.org/postcss-html/-/postcss-html-1.5.0.tgz", | ||||||
|  |       "integrity": "sha512-kCMRWJRHKicpA166kc2lAVUGxDZL324bkj/pVOb6RhjB0Z5Krl7mN0AsVkBhVIRZZirY0lyQXG38HCVaoKVNoA==", | ||||||
|  |       "dev": true, | ||||||
|  |       "dependencies": { | ||||||
|  |         "htmlparser2": "^8.0.0", | ||||||
|  |         "js-tokens": "^8.0.0", | ||||||
|  |         "postcss": "^8.4.0", | ||||||
|  |         "postcss-safe-parser": "^6.0.0" | ||||||
|  |       }, | ||||||
|  |       "engines": { | ||||||
|  |         "node": "^12 || >=14" | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     "node_modules/postcss-html/node_modules/js-tokens": { | ||||||
|  |       "version": "8.0.1", | ||||||
|  |       "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-8.0.1.tgz", | ||||||
|  |       "integrity": "sha512-3AGrZT6tuMm1ZWWn9mLXh7XMfi2YtiLNPALCVxBCiUVq0LD1OQMxV/AdS/s7rLJU5o9i/jBZw/N4vXXL5dm29A==", | ||||||
|  |       "dev": true | ||||||
|  |     }, | ||||||
|     "node_modules/postcss-media-query-parser": { |     "node_modules/postcss-media-query-parser": { | ||||||
|       "version": "0.2.3", |       "version": "0.2.3", | ||||||
|       "resolved": "https://registry.npmjs.org/postcss-media-query-parser/-/postcss-media-query-parser-0.2.3.tgz", |       "resolved": "https://registry.npmjs.org/postcss-media-query-parser/-/postcss-media-query-parser-0.2.3.tgz", | ||||||
|   | |||||||
| @@ -74,6 +74,7 @@ | |||||||
|     "eslint-plugin-wc": "1.5.0", |     "eslint-plugin-wc": "1.5.0", | ||||||
|     "jsdom": "22.0.0", |     "jsdom": "22.0.0", | ||||||
|     "markdownlint-cli": "0.34.0", |     "markdownlint-cli": "0.34.0", | ||||||
|  |     "postcss-html": "1.5.0", | ||||||
|     "stylelint": "15.6.2", |     "stylelint": "15.6.2", | ||||||
|     "stylelint-declaration-strict-value": "1.9.2", |     "stylelint-declaration-strict-value": "1.9.2", | ||||||
|     "svgo": "3.0.2", |     "svgo": "3.0.2", | ||||||
|   | |||||||
| @@ -429,7 +429,7 @@ export function ansiLogToHTML(line) { | |||||||
| /* action view header */ | /* action view header */ | ||||||
|  |  | ||||||
| .action-view-header { | .action-view-header { | ||||||
|   margin: 20px 0px; |   margin: 20px 0; | ||||||
| } | } | ||||||
|  |  | ||||||
| .action-info-summary { | .action-info-summary { | ||||||
| @@ -452,7 +452,7 @@ export function ansiLogToHTML(line) { | |||||||
| .action-commit-summary { | .action-commit-summary { | ||||||
|   display: flex; |   display: flex; | ||||||
|   gap: 5px; |   gap: 5px; | ||||||
|   margin: 10px 0px 10px 25px; |   margin: 10px 0 10px 25px; | ||||||
| } | } | ||||||
|  |  | ||||||
| /* ================ */ | /* ================ */ | ||||||
| @@ -472,7 +472,7 @@ export function ansiLogToHTML(line) { | |||||||
| .job-artifacts-title { | .job-artifacts-title { | ||||||
|   font-size: 18px; |   font-size: 18px; | ||||||
|   margin-top: 16px; |   margin-top: 16px; | ||||||
|   padding: 16px 10px 0px 20px; |   padding: 16px 10px 0 20px; | ||||||
|   border-top: 1px solid var(--color-secondary); |   border-top: 1px solid var(--color-secondary); | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -639,8 +639,8 @@ export function ansiLogToHTML(line) { | |||||||
| } | } | ||||||
|  |  | ||||||
| .job-step-section .job-step-logs { | .job-step-section .job-step-logs { | ||||||
|   font-family: monospace, monospace; |   font-family: monospace; | ||||||
|   margin: 8px 0px; |   margin: 8px 0; | ||||||
|   font-size: 12px; |   font-size: 12px; | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -673,7 +673,7 @@ export function ansiLogToHTML(line) { | |||||||
|   margin-left: 10px; |   margin-left: 10px; | ||||||
| } | } | ||||||
|  |  | ||||||
| /* TODO: group support */ | /* TODO: group support | ||||||
|  |  | ||||||
| .job-log-group { | .job-log-group { | ||||||
|  |  | ||||||
| @@ -683,5 +683,5 @@ export function ansiLogToHTML(line) { | |||||||
| } | } | ||||||
| .job-log-list { | .job-log-list { | ||||||
|  |  | ||||||
| } | } */ | ||||||
| </style> | </style> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user