Merge pull request #6586 from wallabag/fix/build-stylelint-error

Fix/build stylelint error
This commit is contained in:
Jérémy Benoist 2023-06-12 18:40:22 +02:00 committed by GitHub
commit 0482d59c30
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 87 additions and 55 deletions

View file

@ -54,7 +54,7 @@
}
a {
border-bottom: 1px dotted $blueAccentColor;
border-bottom: 1px dotted $blue-accent-color;
text-decoration: none;
}
@ -105,7 +105,7 @@
margin: 2.1rem 0 0.68rem;
}
aside {
.entry-info {
.tools {
display: flex;
flex-flow: row wrap;

View file

@ -73,7 +73,7 @@ main {
.card-entry-labels-hidden li {
display: inline-block;
background-color: $blueAccentColor;
background-color: $blue-accent-color;
margin: 0 5px;
padding: 5px 12px;
border-radius: 3px;
@ -85,10 +85,6 @@ main {
white-space: nowrap;
}
.card-content .estimatedTime {
margin-bottom: 10px;
}
.card-action {
padding: 10px 10px 10px 15px;
@ -160,7 +156,7 @@ a.original:not(.waves-effect) {
.card-tag-labels li {
margin: 10px 10px 10px auto;
padding: 5px 12px 5px 16px !important;
background-color: $blueAccentColor;
background-color: $blue-accent-color;
border-radius: 3px;
color: #fff;
cursor: default;
@ -251,7 +247,7 @@ a.original:not(.waves-effect) {
}
.chip {
background-color: $blueAccentColor;
background-color: $blue-accent-color;
padding: 0 7px;
margin: auto 1px;
border-radius: 6px;
@ -315,7 +311,7 @@ a.original:not(.waves-effect) {
color: #fff !important;
}
.settings .div_tabs {
.settings .tabs-container {
padding-bottom: 15px;
}

View file

@ -131,7 +131,7 @@
background-color: #282c34;
}
nav input {
nav input {
color: #abb2bf;
}

View file

@ -27,7 +27,7 @@
-webkit-font-smoothing: antialiased;
/* Support for Safari and Chrome. */
text-rendering: optimizeLegibility;
text-rendering: optimizelegibility;
/* Support for Firefox. */
-moz-osx-font-smoothing: grayscale;

View file

@ -19,7 +19,7 @@ body {
}
a {
color: $blueAccentColor;
color: $blue-accent-color;
}
main,

View file

@ -10,7 +10,7 @@
@media only screen and (min-width: 992px) {
nav,
body:not(.entry):not(.login) main,
.index main,
footer {
padding-left: 240px;
}

View file

@ -131,11 +131,11 @@ nav {
margin: 0 1%;
}
#button_filters {
.button-filters {
display: none;
}
#button_export {
.button-export {
display: none;
}

View file

@ -18,20 +18,16 @@
/* Hide useless blocks */
body > header,
#article_toolbar,
#links,
#sort,
body > footer,
.top_link,
div.tools,
.entry-tools,
header div,
.messages,
.entry + .results,
#slide-out,
.left-bar,
.progress,
.hide-on-large-only,
#article > aside,
#article .mbm a {
.entry-info,
.title-edit {
display: none !important;
}
@ -39,7 +35,7 @@
padding-left: 0 !important;
}
#article {
.article {
margin: inherit !important;
}

View file

@ -45,6 +45,6 @@
font-weight: bold;
}
span.numberItems {
.items-number {
float: right;
}

View file

@ -2,4 +2,4 @@
Variables
========================================================================== */
$blueAccentColor: #00acc1;
$blue-accent-color: #00acc1;

View file

@ -58,6 +58,7 @@
"style-loader": "^3.3.3",
"stylelint": "^15.7.0",
"stylelint-config-standard": "^33.0.0",
"stylelint-config-standard-scss": "^9.0.0",
"stylelint-scss": "^5.0.1",
"stylelint-webpack-plugin": "^4.1.1",
"terser-webpack-plugin": "^5.3.9",

View file

@ -9,7 +9,7 @@
<div class="card-panel settings">
<div class="row">
<div class="div_tabs col s12">
<div class="tabs-container col s12">
<ul class="tabs">
<li class="tab col s12 m6 l3"><a class="active" href="#set1">{{ 'config.tab_menu.settings'|trans }}</a></li>
<li class="tab col s12 m6 l3"><a href="#set2">{{ 'config.tab_menu.feed'|trans }}</a></li>

View file

@ -36,7 +36,7 @@
</ul>
</div>
</nav>
<ul id="slide-out" class="collapsible side-nav fixed reader-mode" data-collapsible="accordion">
<ul id="slide-out" class="left-bar collapsible side-nav fixed reader-mode" data-collapsible="accordion">
<li class="bold border-bottom hide-on-med-and-down">
<a class="waves-effect collapsible-header" href="{{ path('homepage') }}">
<i class="material-icons small">arrow_back</i>
@ -232,12 +232,12 @@
{% endblock %}
{% block content %}
<div id="article">
<div id="article" class="article">
<header class="mbm">
<h1><span{% if entry.language is defined and entry.language is not null %} lang="{{ entry.getHTMLLanguage() }}"{% endif %}>{{ entry.title|striptags|default('entry.default_title'|trans)|raw }}</span> <a href="{{ path('edit', {'id': entry.id}) }}" title="{{ 'entry.view.edit_title'|trans }}"><i class="material-icons grey-text">create</i></a></h1>
<h1><span{% if entry.language is defined and entry.language is not null %} lang="{{ entry.getHTMLLanguage() }}"{% endif %}>{{ entry.title|striptags|default('entry.default_title'|trans)|raw }}</span> <a class="title-edit" href="{{ path('edit', {'id': entry.id}) }}" title="{{ 'entry.view.edit_title'|trans }}"><i class="material-icons grey-text">create</i></a></h1>
</header>
<aside>
<div class="tools grey-text" dir="auto">
<aside class="entry-info">
<div class="tools entry-tools grey-text" dir="auto">
<ul class="stats">
<li>
{% include "@WallabagCore/Entry/_reading_time.html.twig" with {'entry': entry} only %}
@ -273,7 +273,7 @@
{% if entry.originUrl is not empty %}
<li>
<i class="material-icons grey-text" title="{{ 'entry.view.provided_by'|trans }}">launch</i>
<a href="{{ entry.originUrl|e }}" target="_blank" rel="noopener" class="tool grey-text">
<a href="{{ entry.originUrl|e }}" target="_blank" rel="noopener" class="tool grey-text" data-tests="entry-origin-url">
{{ entry.originUrl|striptags|removeSchemeAndWww|u.truncate(32) }}
</a>
</li>

View file

@ -9,7 +9,7 @@
<div class="card-panel settings">
<div class="row">
<div class="div_tabs col s12">
<div class="tabs-container col s12">
<ul class="tabs">
<li class="tab col s12 m6 l3"><a class="active" href="#set1">{{ 'about.top_menu.who_behind_wallabag'|trans }}</a></li>
<li class="tab col s12 m6 l3"><a href="#set2">{{ 'about.top_menu.getting_help'|trans }}</a></li>

View file

@ -9,7 +9,7 @@
<div class="card-panel settings">
<div class="row">
<div class="div_tabs col s12">
<div class="tabs-container col s12">
<ul class="tabs">
<li class="tab col s12 m6 l3"><a class="active" href="#set1">{{ 'howto.tab_menu.add_link'|trans }}</a></li>
<li class="tab col s12 m6 l3"><a href="#set2">{{ 'howto.tab_menu.shortcuts'|trans }}</a></li>

View file

@ -23,9 +23,11 @@
{% endfor %}
{% endblock %}
{% block body_class %}index{% endblock %}
{% block menu %}
<nav class="cyan darken-1">
<ul id="slide-out" class="side-nav fixed">
<ul id="slide-out" class="left-bar side-nav fixed">
{% block logo %}
<li class="logo border-bottom">
<a title="{{ 'menu.left.back_to_unread'|trans }}" href="{{ path('unread') }}">
@ -53,22 +55,22 @@
{% endif %}
<li class="bold {% if active_route == 'unread' %}active{% endif %}">
<a class="waves-effect" href="{{ path('unread') }}">{{ 'menu.left.unread'|trans }} <span class="numberItems grey-text">{{ count_entries('unread') }}</span></a>
<a class="waves-effect" href="{{ path('unread') }}">{{ 'menu.left.unread'|trans }} <span class="items-number grey-text">{{ count_entries('unread') }}</span></a>
</li>
<li class="bold {% if active_route == 'starred' %}active{% endif %}">
<a class="waves-effect" href="{{ path('starred') }}">{{ 'menu.left.starred'|trans }} <span class="numberItems grey-text">{{ count_entries('starred') }}</span></a>
<a class="waves-effect" href="{{ path('starred') }}">{{ 'menu.left.starred'|trans }} <span class="items-number grey-text">{{ count_entries('starred') }}</span></a>
</li>
<li class="bold {% if active_route == 'archive' %}active{% endif %}">
<a class="waves-effect" href="{{ path('archive') }}">{{ 'menu.left.archive'|trans }} <span class="numberItems grey-text">{{ count_entries('archive') }}</span></a>
<a class="waves-effect" href="{{ path('archive') }}">{{ 'menu.left.archive'|trans }} <span class="items-number grey-text">{{ count_entries('archive') }}</span></a>
</li>
<li class="bold {% if active_route == 'annotated' %}active{% endif %}">
<a class="waves-effect" href="{{ path('annotated') }}">{{ 'menu.left.with_annotations'|trans }} <span class="numberItems grey-text">{{ count_entries('annotated') }}</span></a>
<a class="waves-effect" href="{{ path('annotated') }}">{{ 'menu.left.with_annotations'|trans }} <span class="items-number grey-text">{{ count_entries('annotated') }}</span></a>
</li>
<li class="bold {% if active_route == 'all' %}active{% endif %}">
<a class="waves-effect" href="{{ path('all') }}">{{ 'menu.left.all_articles'|trans }} <span class="numberItems grey-text">{{ count_entries('all') }}</span></a>
<a class="waves-effect" href="{{ path('all') }}">{{ 'menu.left.all_articles'|trans }} <span class="items-number grey-text">{{ count_entries('all') }}</span></a>
</li>
<li class="bold {% if current_route == 'tags' %}active{% endif %}">
<a class="waves-effect" href="{{ path('tag') }}">{{ 'menu.left.tags'|trans }} <span class="numberItems grey-text">{{ count_tags() }}</span></a>
<a class="waves-effect" href="{{ path('tag') }}">{{ 'menu.left.tags'|trans }} <span class="items-number grey-text">{{ count_tags() }}</span></a>
</li>
</ul>
<div class="nav-panels">
@ -98,12 +100,12 @@
</a>
</li>
{% endif %}
<li id="button_filters">
<li id="button_filters" class="button-filters">
<a class="nav-panel-menu button-collapse-right tooltipped js-filters-action" data-position="bottom" data-delay="50" data-tooltip="{{ 'menu.top.filter_entries'|trans }}" href="#" data-activates="filters">
<i class="material-icons">filter_list</i>
</a>
</li>
<li id="button_export">
<li id="button_export" class="button-export">
<a class="nav-panel-menu button-collapse-right tooltipped js-export-action" data-position="bottom" data-delay="50" data-tooltip="{{ 'menu.top.export'|trans }}" href="#" data-activates="export">
<i class="material-icons">file_download</i>
</a>

View file

@ -1,6 +1,6 @@
module.exports = {
extends: ['stylelint-config-standard'],
customSyntax: require('postcss-scss'),
extends: ['stylelint-config-standard-scss'],
customSyntax: 'postcss-scss',
plugins: ['stylelint-scss'],
rules: {
'at-rule-no-unknown': null,
@ -8,5 +8,16 @@ module.exports = {
'font-family-no-missing-generic-family-keyword': null,
'no-descending-specificity': null,
'scss/at-rule-no-unknown': true,
'media-feature-range-notation': null,
'selector-class-pattern': [
'^[a-z]([-]?[a-z0-9]+)*(__[a-z0-9]([-]?[a-z0-9]+)*)?(--[a-z0-9]([-]?[a-z0-9]+)*)?$',
{
/** This option will resolve nested selectors with & interpolation. - https://stylelint.io/user-guide/rules/selector-class-pattern/#resolvenestedselectors-true--false-default-false */
resolveNestedSelectors: true,
message: function expected(selectorValue) {
return `Expected class selector "${selectorValue}" to match BEM CSS pattern https://en.bem.info/methodology/css. Selector validation tool: https://regexr.com/3apms`;
},
},
],
},
};

View file

@ -591,8 +591,8 @@ class EntryControllerTest extends WallabagCoreTestCase
$this->assertGreaterThan(1, $title = $crawler->filter('div[id=article] h1')->extract(['_text']));
$this->assertStringContainsString('My updated title hehe :)', $title[0]);
$this->assertGreaterThan(1, $stats = $crawler->filter('div[class="tools grey-text"] ul[class=stats] li a[class="tool grey-text"]')->extract(['_text']));
$this->assertStringContainsString('example.io', trim($stats[1]));
$originUrl = $crawler->filter('[data-tests="entry-origin-url"]')->text();
$this->assertStringContainsString('example.io', $originUrl);
}
public function testEditRemoveOriginUrl()
@ -626,9 +626,8 @@ class EntryControllerTest extends WallabagCoreTestCase
$this->assertGreaterThan(1, $title);
$this->assertStringContainsString('My updated title hehe :)', $title[0]);
$stats = $crawler->filter('div[class="tools grey-text"] ul[class=stats] li a[class="tool grey-text"]')->extract(['_text']);
$this->assertCount(1, $stats);
$this->assertStringNotContainsString('example.io', trim($stats[0]));
$originUrl = $crawler->filter('[data-tests="entry-origin-url"]')->extract(['_text']);
$this->assertCount(0, $originUrl);
}
public function testToggleArchive()

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -4677,7 +4677,7 @@ postcss-scss@^4.0.6:
resolved "https://registry.yarnpkg.com/postcss-scss/-/postcss-scss-4.0.6.tgz#5d62a574b950a6ae12f2aa89b60d63d9e4432bfd"
integrity sha512-rLDPhJY4z/i4nVFZ27j9GqLxj1pwxE80eAzUNRMXtcpipFYIeowerzBgG3yJhMtObGEXidtIgbUpQ3eLDsf5OQ==
postcss-selector-parser@^6.0.13, postcss-selector-parser@^6.0.2, postcss-selector-parser@^6.0.4:
postcss-selector-parser@^6.0.11, postcss-selector-parser@^6.0.13, postcss-selector-parser@^6.0.2, postcss-selector-parser@^6.0.4:
version "6.0.13"
resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.13.tgz#d05d8d76b1e8e173257ef9d60b706a8e5e99bf1b"
integrity sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==
@ -5445,11 +5445,28 @@ style-search@^0.1.0:
resolved "https://registry.yarnpkg.com/style-search/-/style-search-0.1.0.tgz#7958c793e47e32e07d2b5cafe5c0bf8e12e77902"
integrity sha512-Dj1Okke1C3uKKwQcetra4jSuk0DqbzbYtXipzFlFMZtowbF1x7BKJwB9AayVMyFARvU8EDrZdcax4At/452cAg==
stylelint-config-recommended-scss@^11.0.0:
version "11.0.0"
resolved "https://registry.yarnpkg.com/stylelint-config-recommended-scss/-/stylelint-config-recommended-scss-11.0.0.tgz#7b933ecac99cd3b52d14d1746e3ecd36f421b4b6"
integrity sha512-EDghTDU7aOv2LTsRZvcT1w8mcjUaMhuy+t38iV5I/0Qiu6ixdkRwhLEMul3K/fnB2v9Nwqvb3xpvJfPH+HduDw==
dependencies:
postcss-scss "^4.0.6"
stylelint-config-recommended "^12.0.0"
stylelint-scss "^4.6.0"
stylelint-config-recommended@^12.0.0:
version "12.0.0"
resolved "https://registry.yarnpkg.com/stylelint-config-recommended/-/stylelint-config-recommended-12.0.0.tgz#d0993232fca017065fd5acfcb52dd8a188784ef4"
integrity sha512-x6x8QNARrGO2sG6iURkzqL+Dp+4bJorPMMRNPScdvaUK8PsynriOcMW7AFDKqkWAS5wbue/u8fUT/4ynzcmqdQ==
stylelint-config-standard-scss@^9.0.0:
version "9.0.0"
resolved "https://registry.yarnpkg.com/stylelint-config-standard-scss/-/stylelint-config-standard-scss-9.0.0.tgz#70c66e1179612519fdf6ca1dbff23c804def1b6b"
integrity sha512-yPKpJsrZn4ybuQZx/DkEHuCjw7pJginErE/47dFhCnrvD48IJ4UYec8tSiCuJWMA3HRjbIa3nh5ZeSauDGuVAg==
dependencies:
stylelint-config-recommended-scss "^11.0.0"
stylelint-config-standard "^33.0.0"
stylelint-config-standard@^33.0.0:
version "33.0.0"
resolved "https://registry.yarnpkg.com/stylelint-config-standard/-/stylelint-config-standard-33.0.0.tgz#1f7bb299153a53874073e93829e37a475842f0f9"
@ -5457,6 +5474,16 @@ stylelint-config-standard@^33.0.0:
dependencies:
stylelint-config-recommended "^12.0.0"
stylelint-scss@^4.6.0:
version "4.7.0"
resolved "https://registry.yarnpkg.com/stylelint-scss/-/stylelint-scss-4.7.0.tgz#f986bf8c5a4b93eae2b67d3a3562eef822657908"
integrity sha512-TSUgIeS0H3jqDZnby1UO1Qv3poi1N8wUYIJY6D1tuUq2MN3lwp/rITVo0wD+1SWTmRm0tNmGO0b7nKInnqF6Hg==
dependencies:
postcss-media-query-parser "^0.2.3"
postcss-resolve-nested-selector "^0.1.1"
postcss-selector-parser "^6.0.11"
postcss-value-parser "^4.2.0"
stylelint-scss@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/stylelint-scss/-/stylelint-scss-5.0.1.tgz#b33a6580b5734eace083cfc2cc3021225e28547f"