Skip to content

Commit

Permalink
chore: apply stylelint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
wazolab committed Jan 19, 2024
1 parent 84dc609 commit 53683ae
Show file tree
Hide file tree
Showing 23 changed files with 74 additions and 28 deletions.
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"recommendations": [
"vue.volar",
"dbaeumer.vscode-eslint",
"stylelint.vscode-stylelint"
"stylelint.vscode-stylelint",
"bradlc.vscode-tailwindcss"
],
"unwantedRecommendations": [
"vscode.typescript-language-features",
Expand Down
2 changes: 0 additions & 2 deletions assets/details.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
$small-range: (767px);
$medium-range: (1024px);
$large-range: (1280px);

$screen: 'only screen' !default;
$landscape: '#{$screen} and (orientation: landscape)' !default;
$portrait: '#{$screen} and (orientation: portrait)' !default;
Expand All @@ -12,7 +11,6 @@ $medium-and-small: '#{$screen} and (max-width: #{($medium-range)})' !default;
$medium-only: '#{$screen} and (min-width:#{($small-range)}) and (max-width:#{($medium-range)})' !default;
$x-medium-only: '#{$screen} and (min-width:#{($medium-range)}) and (max-width:#{($large-range)})' !default;
$large-only: '#{$screen} and (min-width:#{($large-range)})' !default;

$white-color: #ffff;

%font-light,
Expand Down
2 changes: 1 addition & 1 deletion components/Home/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ export default defineNuxtComponent({
transform: translateX(-10px);
}
.right-3\/8 {
.right-3 {
right: 37.5%;
}
</style>
5 changes: 3 additions & 2 deletions components/Layout/Footer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,11 @@ export default defineNuxtComponent({
width: 3.4rem;
vertical-align: baseline;
}
@extend %font-medium;
@media (max-width: 991px) {
.site-footer__bottom .copyright {
@media (width <= 991px) {
.site-footer-bottom .copyright {
width: 100%;
margin-top: 0;
text-align: center;
Expand Down
6 changes: 4 additions & 2 deletions components/Layout/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,12 @@ export default defineNuxtComponent({
display: flex;
flex-direction: row;
overflow: visible;
// height: 8.6rem;
// min-height: 8.6rem;
align-items: center;
justify-content: space-between;
// padding: 0.8rem 1.3rem;
&::before,
Expand All @@ -77,7 +79,7 @@ export default defineNuxtComponent({
}
}
@media (max-width: 600px) {
@media (width <= 600px) {
height: 6rem;
& {
Expand All @@ -89,7 +91,7 @@ export default defineNuxtComponent({
}
}
@media only screen and (max-width: 767px) {
@media only screen and (width <= 767px) {
#header #logo :deep(img) {
max-height: 80px;
max-width: 193px;
Expand Down
5 changes: 3 additions & 2 deletions components/Layout/PoiLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,13 @@ export default defineNuxtComponent({
:deep(body) {
color: $color-text;
background-color: #fefefe;
padding: 1rem 1rem;
padding: 1rem;
min-width: 21rem;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
text-rendering: optimizelegibility;
line-height: 1.3;
word-wrap: break-word;
@extend %font-light;
}
Expand Down
8 changes: 4 additions & 4 deletions components/MainMap/FavoriteMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export default defineNuxtComponent({
@click="$emit('toggleFavorites')"
>
<FavoriteIcon :is-active="isModeFavorites" />
<span class="tw-hidden md:tw-inline favoriteTitle">{{
<span class="tw-hidden md:tw-inline favorite-title">{{
$t('favorites.title')
}}</span>
<Badge
Expand All @@ -144,7 +144,7 @@ export default defineNuxtComponent({
class="tw-text-zinc-500 tw-mr-2"
size="sm"
/>
<span class="tw-hidden md:tw-inline favoriteTitle">
<span class="tw-hidden md:tw-inline favorite-title">
{{ $t('favorites.menu_notebook') }}
</span>
</button>
Expand All @@ -171,8 +171,8 @@ export default defineNuxtComponent({
</template>

<style lang="scss" scoped>
.favoriteTitle {
@media (max-width: 860px) {
.favorite-title {
@media (width <= 860px) {
@apply tw-hidden;
}
}
Expand Down
1 change: 1 addition & 0 deletions components/Map/Map.vue
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@ export default defineNuxtComponent({
#map .maplibregl-ctrl-group > button,
#map .maplibregl-ctrl-group > button:not(:disabled) {
border: none;
@apply tw-text-sm tw-font-bold tw-text-zinc-800 tw-bg-white tw-rounded-full tw-shadow-md tw-outline-none tw-w-11 tw-h-11;
@apply focus:tw-rounded-full focus:tw-shadow-md focus:tw-outline-none focus-visible:tw-bg-zinc-100;
@apply hover:tw-bg-zinc-100;
Expand Down
1 change: 1 addition & 0 deletions components/PoisDetails/FieldsGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ export default defineNuxtComponent({
.block {
margin-bottom: 3rem;
}
@media print {
.block {
margin-bottom: 0.5rem !important;
Expand Down
1 change: 1 addition & 0 deletions components/PoisDetails/Mapillary.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ div {
iframe {
width: 100%;
height: 346px;
@apply tw-bg-gray-100;
}
</style>
2 changes: 1 addition & 1 deletion components/PoisDetails/PoiDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ export default defineNuxtComponent({
margin: auto;
}
@media (max-width: 991px) {
@media (width <= 991px) {
.detail-wrapper {
flex-direction: column;
Expand Down
2 changes: 1 addition & 1 deletion components/PoisDetails/Route/RouteMap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export default defineNuxtComponent({
}
}
@media (max-width: 991px) {
@media (width <= 991px) {
.detail-wrapper {
flex-direction: column;
Expand Down
1 change: 1 addition & 0 deletions components/UI/CookiesConsent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export default defineNuxtComponent({
</template>

<style>
/* stylelint-disable selector-class-pattern */
.cookie__bar__buttons__button--accept,
.cookie__bar__buttons__button--decline,
.cookie__bar__buttons__button--accept:hover,
Expand Down
2 changes: 1 addition & 1 deletion components/UI/IconsBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ ul {
}
}
@media (max-width: 991px) {
@media (width <= 991px) {
ul {
text-align: center;
}
Expand Down
3 changes: 1 addition & 2 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export default defineNuxtConfig({
'@fortawesome/vue-fontawesome',
],
},
buildModules: ['@nuxtjs/stylelint-module'],
components: false,
css: ['@fortawesome/fontawesome-svg-core/styles.css'],
devtools: { enabled: true },
Expand Down Expand Up @@ -66,7 +65,7 @@ export default defineNuxtConfig({
'@nuxtjs/i18n',
'@nuxt/image-edge',
'@pinia/nuxt',
async (options, nuxt) => {
async (_options, nuxt) => {
nuxt.hooks.hook('vite:extendConfig', config =>
// @ts-expect-error: Do we really need to extend the config ?
config.plugins.push(vuetify()))
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"start:cypress": "CONFIG=vidos-config-empty.json yarn build-fixture && yarn run cypress open",
"lint": "yarn lint:js && yarn lint:style",
"lint:js": "eslint .",
"lint:style": "stylelint --cache **/*.{vue,css}",
"lint:style": "stylelint --cache **/*.{vue,css,scss}",
"test": "yarn test:cypress && yarn test:histoire",
"test:cypress": "yarn build-fixture && yarn run cypress run",
"test:histoire:report": "yarn build:histoire && npx --yes -- reg-cli __screenshots__/current __screenshots__/actual __screenshots__/diff -R __screenshots__/diff/index.html -J __screenshots__/diff/index.json --thresholdPixel 5 --matchingThreshold 0.3 --extendedErrors || exit 0",
Expand Down Expand Up @@ -97,8 +97,8 @@
"sass": "^1.63.4",
"sass-loader": "^13.3.2",
"stylelint": "^16.1.0",
"stylelint-config-recommended-scss": "^14.0.0",
"stylelint-config-recommended-vue": "^1.5.0",
"stylelint-config-standard-scss": "^13.0.0",
"tailwindcss": "^3.3.2",
"typescript": "^5.1.3",
"vite-plugin-vuetify": "^1.0.2",
Expand Down
5 changes: 3 additions & 2 deletions pages/category/[id].vue
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,13 @@ export default defineNuxtComponent({
.page-index {
color: $color-text;
background-color: #fefefe;
padding: 1rem 1rem;
padding: 1rem;
min-width: 21rem;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
text-rendering: optimizelegibility;
line-height: 1.3;
word-wrap: break-word;
@extend %font-light;
}
</style>
1 change: 1 addition & 0 deletions pages/embedded.vue
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ export default defineNuxtComponent({
</template>

<style scoped>
/* stylelint-disable selector-id-pattern */
body,
#__nuxt,
#__layout {
Expand Down
1 change: 1 addition & 0 deletions pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ export default defineNuxtComponent({
</template>

<style scoped>
/* stylelint-disable selector-id-pattern */
body,
#__nuxt,
#__layout {
Expand Down
6 changes: 4 additions & 2 deletions pages/poi/[id]/details.vue
Original file line number Diff line number Diff line change
Expand Up @@ -178,17 +178,19 @@ export default defineNuxtComponent({
.page-details {
color: $color-text;
background-color: #fefefe;
padding: 1rem 1rem;
padding: 1rem;
min-width: 21rem;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
text-rendering: optimizelegibility;
line-height: 1.3;
word-wrap: break-word;
@extend %font-light;
}
</style>

<style>
/* stylelint-disable selector-id-pattern */
body,
#__nuxt,
#__layout {
Expand Down
1 change: 1 addition & 0 deletions pages/pois/[ids]/map.vue
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ export default defineNuxtComponent({
</template>

<style scoped>
/* stylelint-disable selector-id-pattern */
body,
#__nuxt,
#__layout {
Expand Down
11 changes: 9 additions & 2 deletions stylelint.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
/** @type {import('stylelint').Config} */

export default {
$schema: 'https://json.schemastore.org/stylelintrc.json',
extends: ['stylelint-config-recommended-vue', 'stylelint-config-recommended-vue/scss'],
extends: ['stylelint-config-standard-scss', 'stylelint-config-recommended-vue/scss'],
rules: {
'scss/at-rule-no-unknown': [
true,
{
ignoreAtRules: ['tailwind'],
},
],
},
}
29 changes: 28 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3041,8 +3041,8 @@ __metadata:
sass: ^1.63.4
sass-loader: ^13.3.2
stylelint: ^16.1.0
stylelint-config-recommended-scss: ^14.0.0
stylelint-config-recommended-vue: ^1.5.0
stylelint-config-standard-scss: ^13.0.0
tailwindcss: ^3.3.2
typescript: ^5.1.3
url-slug: ^4.0.1
Expand Down Expand Up @@ -14200,6 +14200,33 @@ __metadata:
languageName: node
linkType: hard

"stylelint-config-standard-scss@npm:^13.0.0":
version: 13.0.0
resolution: "stylelint-config-standard-scss@npm:13.0.0"
dependencies:
stylelint-config-recommended-scss: ^14.0.0
stylelint-config-standard: ^36.0.0
peerDependencies:
postcss: ^8.3.3
stylelint: ^16.1.0
peerDependenciesMeta:
postcss:
optional: true
checksum: 87191c0b59c705417d2a646cd0be091c60b54b3af5357815e37c0314cba05996a777a4a57c4e236e896a427ae4f7989daf31a267907716e88fbdd863efbfae73
languageName: node
linkType: hard

"stylelint-config-standard@npm:^36.0.0":
version: 36.0.0
resolution: "stylelint-config-standard@npm:36.0.0"
dependencies:
stylelint-config-recommended: ^14.0.0
peerDependencies:
stylelint: ^16.1.0
checksum: f08ab93b5bfd92f81555cbbbccb8768b301fb2f225f478d77ac010d7f41aa04153bc9f7f211d7f6f2c9b94e8986fe6727c514a9df9af50abfb567d73f9c8ed72
languageName: node
linkType: hard

"stylelint-scss@npm:^6.0.0":
version: 6.0.0
resolution: "stylelint-scss@npm:6.0.0"
Expand Down

0 comments on commit 53683ae

Please sign in to comment.