Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add eslint-plugin-vue-scoped-css #26720

Merged
merged 4 commits into from
Aug 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
188 changes: 188 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
"eslint-plugin-sonarjs": "0.20.0",
"eslint-plugin-unicorn": "48.0.1",
"eslint-plugin-vue": "9.17.0",
"eslint-plugin-vue-scoped-css": "2.5.0",
"eslint-plugin-wc": "1.5.0",
"jsdom": "22.1.0",
"markdownlint-cli": "0.35.0",
Expand Down
3 changes: 3 additions & 0 deletions web_src/js/components/.eslintrc.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
plugins:
- eslint-plugin-vue
- eslint-plugin-vue-scoped-css

extends:
- ../../../.eslintrc.yaml
- plugin:vue/vue3-recommended
- plugin:vue-scoped-css/vue3-recommended

env:
browser: true
Expand All @@ -12,3 +14,4 @@ rules:
vue/attributes-order: [0]
vue/html-closing-bracket-spacing: [2, {startTag: never, endTag: never, selfClosingTag: never}]
vue/max-attributes-per-line: [0]
vue-scoped-css/enforce-style-type: [0]
41 changes: 18 additions & 23 deletions web_src/js/components/RepoActionView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -524,11 +524,6 @@ export function initRepositoryActionView() {
overflow-y: auto;
}

.job-group-section .job-group-summary {
margin: 5px 0;
padding: 10px;
}

.job-artifacts-title {
font-size: 18px;
margin-top: 16px;
Expand Down Expand Up @@ -674,24 +669,6 @@ export function initRepositoryActionView() {

/* end fomantic dropdown menu overrides */

/* selectors here are intentionally exact to only match fullscreen */

.full.height > .action-view-right {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also ever questioned about this 😂

Glad to see they are moved to a global scope.

Copy link
Member Author

@silverwind silverwind Aug 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I was surprised it even worked, but apparently "scoped" style in Vue only means the final part of the selector needs to be local to the component, not the whole selector.

Pretty bad decision from Vue authors imho to not scope it completely to the component.

width: 100%;
height: 100%;
padding: 0;
border-radius: 0;
}

.full.height > .action-view-right > .job-info-header {
border-radius: 0;
}

.full.height > .action-view-right > .job-step-container {
height: calc(100% - 60px);
border-radius: 0;
}

.job-info-header {
display: flex;
justify-content: space-between;
Expand Down Expand Up @@ -834,6 +811,24 @@ export function initRepositoryActionView() {
margin-left: 10px;
}

/* selectors here are intentionally exact to only match fullscreen */

.full.height > .action-view-right {
width: 100%;
height: 100%;
padding: 0;
border-radius: 0;
}

.full.height > .action-view-right > .job-info-header {
border-radius: 0;
}

.full.height > .action-view-right > .job-step-container {
height: calc(100% - 60px);
border-radius: 0;
}

/* TODO: group support

.job-log-group {
Expand Down