DEV: Update linting (#76)

This commit is contained in:
Jarek Radosz 2025-03-17 12:46:35 +01:00 committed by GitHub
parent 0ea5befe97
commit a0b530dcd5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 1326 additions and 1392 deletions

View File

@ -1,8 +1,9 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (7.2.1.1)
activesupport (8.0.2)
base64
benchmark (>= 0.3)
bigdecimal
concurrent-ruby (~> 1.0, >= 1.3.1)
connection_pool (>= 2.2.5)
@ -12,68 +13,81 @@ GEM
minitest (>= 5.1)
securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5)
uri (>= 0.13.1)
ast (2.4.2)
base64 (0.2.0)
bigdecimal (3.1.8)
concurrent-ruby (1.3.4)
connection_pool (2.4.1)
benchmark (0.4.0)
bigdecimal (3.1.9)
concurrent-ruby (1.3.5)
connection_pool (2.5.0)
drb (2.2.1)
i18n (1.14.6)
i18n (1.14.7)
concurrent-ruby (~> 1.0)
json (2.7.2)
language_server-protocol (3.17.0.3)
logger (1.6.1)
minitest (5.25.1)
json (2.10.2)
language_server-protocol (3.17.0.4)
lint_roller (1.1.0)
logger (1.6.6)
minitest (5.25.5)
parallel (1.26.3)
parser (3.3.5.0)
parser (3.3.7.1)
ast (~> 2.4.1)
racc
prettier_print (1.2.1)
racc (1.8.1)
rack (3.1.10)
rack (3.1.12)
rainbow (3.1.1)
regexp_parser (2.9.2)
rubocop (1.67.0)
regexp_parser (2.10.0)
rubocop (1.74.0)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.1.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.4, < 3.0)
rubocop-ast (>= 1.32.2, < 2.0)
regexp_parser (>= 2.9.3, < 3.0)
rubocop-ast (>= 1.38.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.32.3)
unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.39.0)
parser (>= 3.3.1.0)
rubocop-capybara (2.21.0)
rubocop (~> 1.41)
rubocop-discourse (3.8.2)
rubocop-capybara (2.22.1)
lint_roller (~> 1.1)
rubocop (~> 1.72, >= 1.72.1)
rubocop-discourse (3.12.1)
activesupport (>= 6.1)
rubocop (>= 1.59.0)
rubocop-capybara (>= 2.0.0)
rubocop-factory_bot (>= 2.0.0)
rubocop-rails (>= 2.25.0)
lint_roller (>= 1.1.0)
rubocop (>= 1.73.2)
rubocop-capybara (>= 2.22.0)
rubocop-factory_bot (>= 2.27.0)
rubocop-rails (>= 2.30.3)
rubocop-rspec (>= 3.0.1)
rubocop-rspec_rails (>= 2.30.0)
rubocop-factory_bot (2.26.1)
rubocop (~> 1.61)
rubocop-rails (2.26.2)
rubocop-rspec_rails (>= 2.31.0)
rubocop-factory_bot (2.27.1)
lint_roller (~> 1.1)
rubocop (~> 1.72, >= 1.72.1)
rubocop-rails (2.30.3)
activesupport (>= 4.2.0)
lint_roller (~> 1.1)
rack (>= 1.1)
rubocop (>= 1.52.0, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rspec (3.1.0)
rubocop (~> 1.61)
rubocop-rspec_rails (2.30.0)
rubocop (~> 1.61)
rubocop-rspec (~> 3, >= 3.0.1)
rubocop (>= 1.72.1, < 2.0)
rubocop-ast (>= 1.38.0, < 2.0)
rubocop-rspec (3.5.0)
lint_roller (~> 1.1)
rubocop (~> 1.72, >= 1.72.1)
rubocop-rspec_rails (2.31.0)
lint_roller (~> 1.1)
rubocop (~> 1.72, >= 1.72.1)
rubocop-rspec (~> 3.5)
ruby-progressbar (1.13.0)
securerandom (0.3.1)
securerandom (0.4.1)
syntax_tree (6.2.0)
prettier_print (>= 1.2.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.6.0)
unicode-display_width (3.1.4)
unicode-emoji (~> 4.0, >= 4.0.4)
unicode-emoji (4.0.4)
uri (1.0.3)
PLATFORMS
arm64-darwin-23
@ -84,4 +98,4 @@ DEPENDENCIES
syntax_tree
BUNDLED WITH
2.5.21
2.6.6

View File

@ -3,47 +3,59 @@
margin: 0 auto !important;
max-width: unset;
color: var(--secondary);
h1 {
line-height: var(--line-height-small);
@include breakpoint("large", min-width) {
font-size: 4em;
}
}
p {
margin-top: 0.5em;
margin-bottom: 2em;
@include breakpoint("large", min-width) {
font-size: var(--font-up-1);
}
}
.btn {
height: 100%;
}
.search-menu input[type="text"] {
border: 1px solid transparent;
border-radius: 0.25em;
min-height: 40px;
&:focus {
outline: 3px solid rgba(var(--primary-rgb), 0.35);
}
}
.widget-link.show-help {
color: rgba(var(--primary-rgb), 0.75);
border-radius: 0.5em;
padding: 0.5em;
background-color: rgba(var(--secondary-rgb), 0.25);
&:hover {
color: var(--primary);
}
}
.search-menu .search-input {
border-color: var(--tertiary-hover);
outline: 1px solid var(--tertiary-hover);
}
.results {
top: 43px;
border-radius: 0.25em;
}
.search-context {
top: 3.25em;
right: 1em;
@ -66,12 +78,15 @@
.custom-search-banner-wrap {
padding: 1em 0 2em;
color: var(--tertiary);
.mobile-view & {
color: var(--secondary);
}
h1 {
margin-bottom: 0;
}
.search-widget {
margin-top: 2em;
}
@ -102,12 +117,14 @@
.badge-category-bg {
border-radius: 0.125em;
}
.badge-category-parent-bg {
border-top-left-radius: 0.125em;
border-bottom-left-radius: 0.125em;
+ .badge-category-bg {
border-top-left-radius: 0px;
border-bottom-left-radius: 0px;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
border-top-right-radius: 0.125em;
border-bottom-right-radius: 0.125em;
}
@ -124,6 +141,7 @@
padding: 0.15em 0.25em 0.15em 0.35em;
background-color: var(--primary-low);
color: var(--primary) !important;
&:hover {
background-color: var(--primary-low-mid);
color: var(--primary);
@ -137,9 +155,9 @@
margin-left: unset;
}
.topic-list .link-bottom-line .discourse-tag.simple:after,
.topic-list .link-bottom-line .discourse-tag.simple::after,
.topic-list .link-bottom-line .discourse-tag.box {
margin-right: 0px;
margin-right: 0;
}
#site-text-logo {
@ -150,6 +168,7 @@
.cm-header-links {
display: none;
}
.list-controls .nav-pills .drop li:first-of-type {
display: none;
}
@ -178,6 +197,7 @@ input[type="color"],
div.ac-wrap {
border-radius: 4px;
}
.d-header {
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.06);
}
@ -190,6 +210,7 @@ div.ac-wrap {
border-radius: 0.25em;
margin-left: 0.3em;
border: 1px solid transparent;
svg {
font-size: 1.25em;
}
@ -207,6 +228,7 @@ div.ac-wrap {
.drop-down-mode .d-header-icons .active .icon {
border: 1px solid transparent;
.d-icon {
color: var(--tertiary);
}
@ -223,7 +245,7 @@ div.ac-wrap {
background-color: rgba(var(--tertiary-rgb), 0.5);
}
.btn:not(.themes-tab):not(.components-tab),
.btn:not(.themes-tab, .components-tab),
.select-kit.dropdown-select-box .dropdown-select-box-header {
border-radius: 8px;
border: 1px solid transparent;
@ -231,7 +253,7 @@ div.ac-wrap {
.post-admin-menu.popup-menu {
.btn.widget-button {
border-radius: 0px;
border-radius: 0;
}
}
@ -247,23 +269,17 @@ div.ac-wrap {
border-left-color: var(--tertiary);
}
// graceful ish style
@mixin box-shadow($value: 0px) {
box-shadow: 0 24px 40px rgba(0, 0, 0, 0.07),
0 10.8529px 24.1177px rgba(0, 0, 0, 0.0456112),
0 4.50776px 10.0172px rgba(0, 0, 0, 0.035),
0 1.63037px 3.62304px rgba(0, 0, 0, 0.0243888);
}
html {
body:not(.no-ember) {
background: linear-gradient(
background:
linear-gradient(
0deg,
rgba(var(--primary-rgb), 0.075) 0%,
rgba(var(--primary-rgb), 0.075) 100%
),
linear-gradient(0deg, var(--secondary) 100%, var(--secondary) 100%);
}
.background-container {
position: fixed;
top: 0;
@ -277,6 +293,7 @@ html {
);
clip-path: ellipse(148% 70% at 91% -14%);
}
body.no-ember .background-container {
display: none;
}
@ -289,21 +306,29 @@ html body #main-outlet {
border-radius: 1em;
padding: 3em 3em 5%;
max-width: 1150px;
.archetype-regular & {
min-height: 500px;
}
padding-bottom: 5% !important; // overriding inline style
box-shadow:
0 24px 40px rgba(0, 0, 0, 0.07),
0 10.8529px 24.1177px rgba(0, 0, 0, 0.0456112),
0 4.50776px 10.0172px rgba(0, 0, 0, 0.035),
0 1.63037px 3.62304px rgba(0, 0, 0, 0.0243888);
@media screen and (max-width: 700px) {
padding: 1.5em;
margin-top: 0;
}
padding-bottom: 5% !important; //overriding inline style
@include box-shadow;
@media screen and (max-width: 1120px) {
width: 80%;
}
@media screen and (max-width: 1075px) {
width: 85%;
}
.archetype-regular & {
min-height: 500px;
}
}
.nav-pills:not(.user-nav) > li a.active,
@ -334,6 +359,7 @@ html body #main-outlet {
0% {
background-color: var(--highlight-low);
}
100% {
background-color: var(--secondary);
}
@ -343,35 +369,44 @@ html body #main-outlet {
border-collapse: separate;
border-spacing: 0 0.25em;
display: contents;
.topic-list-header {
tr {
display: flex;
border-bottom: none;
}
display: contents;
.topic-list-data.default {
width: 63%;
}
.topic-list-data.posters {
width: 7%;
}
.topic-list-data.posts {
width: 15%;
}
.topic-list-data.activity {
width: 15%;
}
}
.topic-list-body {
display: contents;
.topic-list-item-separator {
width: 100%;
margin: 0.75em 0;
display: flex;
.topic-list-data {
width: 100%;
}
}
.topic-list-item {
display: flex;
margin-bottom: 0.5em;
@ -380,33 +415,41 @@ html body #main-outlet {
border-radius: 1em;
position: relative;
transition: box-shadow 100ms ease-in-out;
box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.05);
box-shadow: 0 0 8px rgba(0, 0, 0, 0.05);
overflow: hidden;
&.visited {
border: 1px solid rgba(var(--primary-rgb), 0.1);
.discourse-tag {
opacity: 0.75;
}
&:hover {
border: 1px solid rgba(var(--primary-rgb), 0.25);
.discourse-tag {
opacity: 1;
}
}
}
&:hover {
background-color: var(--secondary);
box-shadow: 0px 0px 12px rgba(0, 0, 0, 0.1);
box-shadow: 0 0 12px rgba(0, 0, 0, 0.1);
border: 1px solid rgba(var(--primary-rgb), 0.3);
a.title:not(.badge-notification),
a.topic-excerpt {
color: var(--primary) !important;
}
}
.topic-list-data.main-link {
width: 63%;
order: 2;
}
.topic-list-data.posters {
width: 7%;
order: 1;
@ -414,10 +457,12 @@ html body #main-outlet {
display: flex;
justify-content: center;
align-items: center;
a:not(.latest) {
display: none;
}
}
.topic-list-data.posts {
width: 15%;
order: 3;
@ -425,6 +470,7 @@ html body #main-outlet {
justify-content: center;
align-items: center;
}
.topic-list-data.age {
width: 15%;
order: 4;
@ -432,54 +478,39 @@ html body #main-outlet {
justify-content: center;
align-items: center;
}
&.selected {
td:nth-of-type(1) {
box-shadow: none;
}
&:focus-visible td:nth-of-type(2) {
box-shadow: inset 3px 0 0 var(--tertiary);
border-radius: calc(1em - 3px);
}
}
}
}
}
.topic-list-data.num.views {
display: none;
}
.full-width .contents .topic-list .topic-list-item .posters a.latest {
margin-right: 4px;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-content: center;
align-items: center;
.avatar {
margin-right: 0;
}
}
.full-width .contents .topic-list {
.topic-list-item {
.main-link {
min-height: 100%;
min-height: 100%;
.link-top-line {
display: block;
margin-bottom: 0.25em;
}
.title {
font-weight: bold;
}
.link-area {
display: flex;
.link-title-area {
margin-right: 1em;
font-size: $font-up-1;
}
.link-meta-area {
font-size: $font-down-3;
display: flex;
@ -487,41 +518,58 @@ html body #main-outlet {
}
}
}
.posters {
.avatar {
width: 40px;
height: 40px;
border-radius: 8px;
}
a.latest {
margin-right: 4px;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-content: center;
align-items: center;
.avatar {
margin-right: 0;
}
}
a:not(.latest) {
margin-left: -22px;
.avatar {
border: 3px solid var(--secondary);
}
}
}
.posts-map,
.num.age.activity {
a {
padding: 0;
}
}
.posts-map {
position: relative;
.number {
margin-right: 0.25em;
}
}
.post-activity {
.d-icon-reply {
color: var(--primary-medium);
margin-right: 0.25em;
}
.relative-date {
color: var(--primary-medium);
}
@ -529,6 +577,10 @@ html body #main-outlet {
}
}
.topic-list-data.num.views {
display: none;
}
// published page additions
.published-page-content-wrapper {
max-width: 1000px;
@ -537,7 +589,8 @@ html body #main-outlet {
background: var(--secondary);
border-radius: 1em;
padding: 3em 3em 5%;
box-shadow: 0 24px 40px rgba(0, 0, 0, 0.07),
box-shadow:
0 24px 40px rgba(0, 0, 0, 0.07),
0 10.8529px 24.1177px rgba(0, 0, 0, 0.0456112),
0 4.50776px 10.0172px rgba(0, 0, 0, 0.035),
0 1.63037px 3.62304px rgba(0, 0, 0, 0.0243888);
@ -549,6 +602,7 @@ html body #main-outlet {
.background-container {
display: none;
}
&::before {
background: linear-gradient(
90deg,

View File

@ -4,6 +4,7 @@
h1 {
font-size: 2.5em !important;
}
p {
font-weight: normal;
font-size: $font-up-1;
@ -11,20 +12,30 @@
}
html
body:not(.static-tos):not(.static-faq):not(.static-privacy):not(
.about-page
):not(.static-faq):not(.badges-page):not(.tags-page):not(
.archetype-banner
):not(.archetype-regular):not(.archetype-private_message):not(
.admin-interface
):not(.edit-category):not(.user-summary-page):not(.user-activity-page):not(
.user-invites-page
):not(.user-preferences-page):not(.user-messages-page):not(
.user-notifications-page
):not(.user-badges-page)
body:not(
.static-tos,
.static-faq,
.static-privacy,
.about-page,
.static-faq,
.badges-page,
.tags-page,
.archetype-banner,
.archetype-regular,
.archetype-private_message,
.admin-interface,
.edit-category,
.user-summary-page,
.user-activity-page,
.user-invites-page,
.user-preferences-page,
.user-messages-page,
.user-notifications-page,
.user-badges-page
)
#main-outlet {
width: calc(100% - 1em);
padding: 0em 0.5em 1em 0.5em;
padding: 0 0.5em 1em 0.5em;
box-shadow: none;
background-color: transparent;
}
@ -57,10 +68,10 @@ html body.user-messages-page #main-outlet,
html body.user-notifications-page #main-outlet,
html body.user-badges-page #main-outlet,
html body.staff:not(.navigation-topics) #main-outlet {
border-radius: 0px;
border-radius: 0;
width: calc(100% - 3em);
background-color: var(--secondary);
margin-bottom: 0px;
margin-bottom: 0;
}
.container.posts > .row {
@ -69,7 +80,7 @@ html body.staff:not(.navigation-topics) #main-outlet {
.navigation-categories .navigation-container,
.categories-list .navigation-container {
border-bottom: 0px !important;
border-bottom: 0 !important;
}
body.category .category-breadcrumb .select-kit-header,
@ -98,16 +109,18 @@ ol.category-breadcrumb {
border-radius: 8px;
border: none;
background-color: var(--secondary);
a:hover,
a:focus {
color: var(--primary);
background-color: var(--secondary);
}
}
.drop {
top: calc(100% + 0.5em);
border-radius: 8px;
box-shadow: 0px 0px 12px rgba(0, 0, 0, 0.25);
box-shadow: 0 0 12px rgba(0, 0, 0, 0.25);
}
}
@ -150,7 +163,7 @@ ol.category-breadcrumb {
background: var(--secondary);
padding: 1em;
border-radius: 8px;
box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.05);
box-shadow: 0 0 8px rgba(0, 0, 0, 0.05);
border: 1px solid rgba(var(--primary-rgb), 0.1);
margin-bottom: 0.5em;
}
@ -170,7 +183,7 @@ ol.category-breadcrumb {
.full-width .contents .topic-list .topic-list-header tr {
background-color: var(--secondary);
border-radius: 8px;
box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.05);
box-shadow: 0 0 8px rgba(0, 0, 0, 0.05);
border: 1px solid rgba(var(--primary-rgb), 0.1);
margin-bottom: 1em;
}
@ -183,6 +196,7 @@ ol.category-breadcrumb {
> .topic-list-data {
width: 100%;
}
.discourse-tags {
order: 3;
width: 100%;
@ -192,6 +206,7 @@ ol.category-breadcrumb {
.full-width .contents .topic-list .topic-list-item .posts-map {
padding: 0;
.number {
margin: 0;
}
@ -212,18 +227,20 @@ ol.category-breadcrumb {
}
// default category list styles when the modern category boxes theme component isn't used
.category-list-item.category {
background: var(--secondary);
border-radius: 1em;
tbody {
display: flex;
flex-direction: column;
width: 100%;
}
td {
width: 100%;
}
.num.posts {
padding-right: 0.25em;
}

View File

@ -1,10 +1,11 @@
{
"private": true,
"devDependencies": {
"@discourse/lint-configs": "2.4.0",
"ember-template-lint": "6.1.0",
"eslint": "9.19.0",
"prettier": "2.8.8"
"@discourse/lint-configs": "2.11.1",
"ember-template-lint": "7.0.1",
"eslint": "9.22.0",
"prettier": "3.5.3",
"stylelint": "16.16.0"
},
"engines": {
"node": ">= 22",

File diff suppressed because it is too large Load Diff

View File

@ -2,6 +2,7 @@ html body.has-sidebar-page.has-full-page-chat {
#main-outlet-wrapper {
gap: 2em;
}
#main-outlet {
padding-bottom: 0 !important;
}
@ -29,7 +30,8 @@ html body.has-sidebar-page.has-full-page-chat {
.has-full-page-chat #main-outlet.wrap {
margin-bottom: 30px;
padding-bottom: 0px !important;
padding-bottom: 0 !important;
.full-page-chat {
grid-template-rows: calc(var(--full-page-chat-height) - 50px);
}
@ -46,6 +48,7 @@ html body.has-sidebar-page.has-full-page-chat {
border-radius: 0;
margin: 0;
padding: 0;
.full-page-chat {
grid-template-rows: var(--full-page-chat-height);
}

View File

@ -1,27 +1,5 @@
.showcased-categories-sidebar .two-topic-list-sidebar {
.topic-excerpt {
display: none;
}
.btn-link.posts-map.badge-posts {
display: block;
}
.two-topic-list-sidebar .topic-list .topic-list-item {
height: unset;
}
}
.showcased-categories-sidebar {
.full-width .contents .topic-list {
display: unset;
}
.two-topic-list-sidebar {
.topic-excerpt {
display: none;
}
.btn-link.posts-map.badge-posts {
display: block;
}
@ -29,5 +7,13 @@
.topic-list .topic-list-item {
height: unset;
}
.topic-excerpt {
display: none;
}
}
.full-width .contents .topic-list {
display: unset;
}
}

View File

@ -1,12 +1,4 @@
// sidebar
@mixin box-shadow($value: 0px) {
box-shadow: 0 24px 40px rgba(0, 0, 0, 0.07),
0 10.8529px 24.1177px rgba(0, 0, 0, 0.0456112),
0 4.50776px 10.0172px rgba(0, 0, 0, 0.035),
0 1.63037px 3.62304px rgba(0, 0, 0, 0.0243888);
}
#main-outlet-wrapper {
.sidebar-wrapper {
margin: 30px 0 50px;
@ -14,8 +6,13 @@
border-radius: 1em;
top: calc(var(--header-offset) + 30px);
height: calc(100vh - (var(--header-offset) + 80px));
@include box-shadow;
box-shadow:
0 24px 40px rgba(0, 0, 0, 0.07),
0 10.8529px 24.1177px rgba(0, 0, 0, 0.0456112),
0 4.50776px 10.0172px rgba(0, 0, 0, 0.035),
0 1.63037px 3.62304px rgba(0, 0, 0, 0.0243888);
}
.sidebar-footer-wrapper {
background: var(--secondary);
}
@ -25,6 +22,7 @@ body.has-sidebar-page {
#main-outlet-wrapper {
padding-left: 8px;
}
#main-outlet {
max-width: unset;
}

3
stylelint.config.mjs Normal file
View File

@ -0,0 +1,3 @@
export default {
extends: ["@discourse/lint-configs/stylelint"],
};