Skip to content

Commit a9d4173

Browse files
silverwindGiteaBot
andauthored
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 <[email protected]>
1 parent 116066e commit a9d4173

File tree

5 files changed

+66
-10
lines changed

5 files changed

+66
-10
lines changed

.stylelintrc.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ overrides:
1111
- files: ["**/chroma/*", "**/codemirror/*"]
1212
rules:
1313
block-no-empty: null
14+
- files: ["**/*.vue"]
15+
customSyntax: postcss-html
1416

1517
rules:
1618
alpha-value-notation: null
@@ -96,7 +98,7 @@ rules:
9698
property-no-vendor-prefix: null
9799
rule-empty-line-before: null
98100
rule-selector-property-disallowed-list: null
99-
scale-unlimited/declaration-strict-value: [[color, background-color, border-color, font-weight], {ignoreValues: /^(inherit|transparent|unset|initial|currentcolor|none)$/, ignoreFunctions: false}]
101+
scale-unlimited/declaration-strict-value: [[color, background-color, border-color, font-weight], {ignoreValues: /^(inherit|transparent|unset|initial|currentcolor|none)$/, ignoreFunctions: false, disableFix: true}]
100102
selector-attribute-name-disallowed-list: null
101103
selector-attribute-operator-allowed-list: null
102104
selector-attribute-operator-disallowed-list: null

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,11 +372,11 @@ lint-js-fix: node_modules
372372

373373
.PHONY: lint-css
374374
lint-css: node_modules
375-
npx stylelint --color --max-warnings=0 web_src/css
375+
npx stylelint --color --max-warnings=0 web_src/css web_src/js/components/*.vue
376376

377377
.PHONY: lint-css-fix
378378
lint-css-fix: node_modules
379-
npx stylelint --color --max-warnings=0 web_src/css --fix
379+
npx stylelint --color --max-warnings=0 web_src/css web_src/js/components/*.vue --fix
380380

381381
.PHONY: lint-swagger
382382
lint-swagger: node_modules

package-lock.json

Lines changed: 53 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
"eslint-plugin-wc": "1.5.0",
7575
"jsdom": "22.0.0",
7676
"markdownlint-cli": "0.34.0",
77+
"postcss-html": "1.5.0",
7778
"stylelint": "15.6.2",
7879
"stylelint-declaration-strict-value": "1.9.2",
7980
"svgo": "3.0.2",

web_src/js/components/RepoActionView.vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ export function ansiLogToHTML(line) {
429429
/* action view header */
430430
431431
.action-view-header {
432-
margin: 20px 0px;
432+
margin: 20px 0;
433433
}
434434
435435
.action-info-summary {
@@ -452,7 +452,7 @@ export function ansiLogToHTML(line) {
452452
.action-commit-summary {
453453
display: flex;
454454
gap: 5px;
455-
margin: 10px 0px 10px 25px;
455+
margin: 10px 0 10px 25px;
456456
}
457457
458458
/* ================ */
@@ -472,7 +472,7 @@ export function ansiLogToHTML(line) {
472472
.job-artifacts-title {
473473
font-size: 18px;
474474
margin-top: 16px;
475-
padding: 16px 10px 0px 20px;
475+
padding: 16px 10px 0 20px;
476476
border-top: 1px solid var(--color-secondary);
477477
}
478478
@@ -639,8 +639,8 @@ export function ansiLogToHTML(line) {
639639
}
640640
641641
.job-step-section .job-step-logs {
642-
font-family: monospace, monospace;
643-
margin: 8px 0px;
642+
font-family: monospace;
643+
margin: 8px 0;
644644
font-size: 12px;
645645
}
646646
@@ -673,7 +673,7 @@ export function ansiLogToHTML(line) {
673673
margin-left: 10px;
674674
}
675675
676-
/* TODO: group support */
676+
/* TODO: group support
677677
678678
.job-log-group {
679679
@@ -683,5 +683,5 @@ export function ansiLogToHTML(line) {
683683
}
684684
.job-log-list {
685685
686-
}
686+
} */
687687
</style>

0 commit comments

Comments
 (0)