Skip to content

Commit

Permalink
print: add eslint-plugin-vue-scoped-css
Browse files Browse the repository at this point in the history
The plugin found some issues in the frontend.
It might also be helpful in print.
  • Loading branch information
BacLuc committed May 12, 2024
1 parent 690f237 commit 2bc2da2
Show file tree
Hide file tree
Showing 7 changed files with 237 additions and 12 deletions.
2 changes: 2 additions & 0 deletions print/components/PicassoChunk.vue
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ export default {
}
</script>

<!-- these styles seem to effect the whole picasso, thus we don't want the vue-scoped-css/enforce-style-type warning here -->
<!-- eslint-disable-next-line -->
<style lang="scss">
$portrait-content-width: 680; /* 794px minus 114px (=2*15mm margin) */
$portrait-content-height: 1009; /* 1123px minus 114px (=2*15mm margin) */
Expand Down
2 changes: 1 addition & 1 deletion print/components/generic/CategoryLabel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default {
}
</script>

<style lang="scss">
<style lang="scss" scoped>
.category-label {
font-size: 80%;
letter-spacing: 0.05em;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default defineNuxtComponent({
})
</script>

<style lang="scss">
<style lang="scss" scoped>
.ec-col {
flex: 0 0 100%;
}
Expand Down
10 changes: 0 additions & 10 deletions print/components/scheduleEntry/contentNode/Material.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,6 @@ export default {
</script>

<style scoped lang="scss">
.material-row {
display: flex;
flex-direction: row;
}
.item {
flex-basis: 7000px;
padding-right: 4px;
Expand All @@ -66,9 +61,4 @@ export default {
padding-right: 4px;
}
}
.list-name {
flex-basis: 3000px;
padding-left: 4px;
}
</style>
229 changes: 229 additions & 0 deletions print/package-lock.json

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

2 changes: 2 additions & 0 deletions print/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"eslint-plugin-local-rules": "2.0.1",
"eslint-plugin-prettier": "5.1.3",
"eslint-plugin-vue": "9.26.0",
"eslint-plugin-vue-scoped-css": "2.8.0",
"nuxt": "3.11.2",
"prettier": "3.2.5",
"sass": "1.69.4",
Expand All @@ -62,6 +63,7 @@
},
"extends": [
"plugin:vue/vue3-recommended",
"plugin:vue-scoped-css/vue3-recommended",
"@nuxt/eslint-config",
"eslint:recommended",
"plugin:prettier/recommended"
Expand Down
2 changes: 2 additions & 0 deletions print/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ const { data: camp, error } = await useAsyncData(
)
</script>

<!-- these styles should be global, thus we don't want the vue-scoped-css/enforce-style-type warning here -->
<!-- eslint-disable-next-line -->
<style>
:root {
--tw-prose-body: #000 !important;
Expand Down

0 comments on commit 2bc2da2

Please sign in to comment.