Skip to content

Commit 5f0b83c

Browse files
authored
DEV: Update linting (#53)
1 parent c9de6ad commit 5f0b83c

File tree

5 files changed

+1197
-1296
lines changed

5 files changed

+1197
-1296
lines changed

Gemfile.lock

Lines changed: 53 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
activesupport (7.2.1.1)
4+
activesupport (8.0.2)
55
base64
6+
benchmark (>= 0.3)
67
bigdecimal
78
concurrent-ruby (~> 1.0, >= 1.3.1)
89
connection_pool (>= 2.2.5)
@@ -12,68 +13,81 @@ GEM
1213
minitest (>= 5.1)
1314
securerandom (>= 0.3)
1415
tzinfo (~> 2.0, >= 2.0.5)
16+
uri (>= 0.13.1)
1517
ast (2.4.2)
1618
base64 (0.2.0)
17-
bigdecimal (3.1.8)
18-
concurrent-ruby (1.3.4)
19-
connection_pool (2.4.1)
19+
benchmark (0.4.0)
20+
bigdecimal (3.1.9)
21+
concurrent-ruby (1.3.5)
22+
connection_pool (2.5.0)
2023
drb (2.2.1)
21-
i18n (1.14.6)
24+
i18n (1.14.7)
2225
concurrent-ruby (~> 1.0)
23-
json (2.7.2)
24-
language_server-protocol (3.17.0.3)
25-
logger (1.6.1)
26-
minitest (5.25.1)
26+
json (2.10.2)
27+
language_server-protocol (3.17.0.4)
28+
lint_roller (1.1.0)
29+
logger (1.6.6)
30+
minitest (5.25.5)
2731
parallel (1.26.3)
28-
parser (3.3.5.0)
32+
parser (3.3.7.1)
2933
ast (~> 2.4.1)
3034
racc
3135
prettier_print (1.2.1)
3236
racc (1.8.1)
33-
rack (3.1.8)
37+
rack (3.1.12)
3438
rainbow (3.1.1)
35-
regexp_parser (2.9.2)
36-
rubocop (1.67.0)
39+
regexp_parser (2.10.0)
40+
rubocop (1.74.0)
3741
json (~> 2.3)
38-
language_server-protocol (>= 3.17.0)
42+
language_server-protocol (~> 3.17.0.2)
43+
lint_roller (~> 1.1.0)
3944
parallel (~> 1.10)
4045
parser (>= 3.3.0.2)
4146
rainbow (>= 2.2.2, < 4.0)
42-
regexp_parser (>= 2.4, < 3.0)
43-
rubocop-ast (>= 1.32.2, < 2.0)
47+
regexp_parser (>= 2.9.3, < 3.0)
48+
rubocop-ast (>= 1.38.0, < 2.0)
4449
ruby-progressbar (~> 1.7)
45-
unicode-display_width (>= 2.4.0, < 3.0)
46-
rubocop-ast (1.32.3)
50+
unicode-display_width (>= 2.4.0, < 4.0)
51+
rubocop-ast (1.39.0)
4752
parser (>= 3.3.1.0)
48-
rubocop-capybara (2.21.0)
49-
rubocop (~> 1.41)
50-
rubocop-discourse (3.8.2)
53+
rubocop-capybara (2.22.1)
54+
lint_roller (~> 1.1)
55+
rubocop (~> 1.72, >= 1.72.1)
56+
rubocop-discourse (3.12.1)
5157
activesupport (>= 6.1)
52-
rubocop (>= 1.59.0)
53-
rubocop-capybara (>= 2.0.0)
54-
rubocop-factory_bot (>= 2.0.0)
55-
rubocop-rails (>= 2.25.0)
58+
lint_roller (>= 1.1.0)
59+
rubocop (>= 1.73.2)
60+
rubocop-capybara (>= 2.22.0)
61+
rubocop-factory_bot (>= 2.27.0)
62+
rubocop-rails (>= 2.30.3)
5663
rubocop-rspec (>= 3.0.1)
57-
rubocop-rspec_rails (>= 2.30.0)
58-
rubocop-factory_bot (2.26.1)
59-
rubocop (~> 1.61)
60-
rubocop-rails (2.26.2)
64+
rubocop-rspec_rails (>= 2.31.0)
65+
rubocop-factory_bot (2.27.1)
66+
lint_roller (~> 1.1)
67+
rubocop (~> 1.72, >= 1.72.1)
68+
rubocop-rails (2.30.3)
6169
activesupport (>= 4.2.0)
70+
lint_roller (~> 1.1)
6271
rack (>= 1.1)
63-
rubocop (>= 1.52.0, < 2.0)
64-
rubocop-ast (>= 1.31.1, < 2.0)
65-
rubocop-rspec (3.1.0)
66-
rubocop (~> 1.61)
67-
rubocop-rspec_rails (2.30.0)
68-
rubocop (~> 1.61)
69-
rubocop-rspec (~> 3, >= 3.0.1)
72+
rubocop (>= 1.72.1, < 2.0)
73+
rubocop-ast (>= 1.38.0, < 2.0)
74+
rubocop-rspec (3.5.0)
75+
lint_roller (~> 1.1)
76+
rubocop (~> 1.72, >= 1.72.1)
77+
rubocop-rspec_rails (2.31.0)
78+
lint_roller (~> 1.1)
79+
rubocop (~> 1.72, >= 1.72.1)
80+
rubocop-rspec (~> 3.5)
7081
ruby-progressbar (1.13.0)
71-
securerandom (0.3.1)
82+
securerandom (0.4.1)
7283
syntax_tree (6.2.0)
7384
prettier_print (>= 1.2.0)
7485
tzinfo (2.0.6)
7586
concurrent-ruby (~> 1.0)
76-
unicode-display_width (2.6.0)
87+
unicode-display_width (3.1.4)
88+
unicode-emoji (~> 4.0, >= 4.0.4)
89+
unicode-emoji (4.0.4)
90+
uri (1.0.3)
7791

7892
PLATFORMS
7993
arm64-darwin-23
@@ -84,4 +98,4 @@ DEPENDENCIES
8498
syntax_tree
8599

86100
BUNDLED WITH
87-
2.5.21
101+
2.6.6

common/common.scss

Lines changed: 36 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,29 @@ html.homepage-featured-topics {
1010
border-bottom: 1px solid var(--primary-low);
1111
position: relative;
1212

13+
@media screen and (max-width: 450px) {
14+
margin-top: 1em;
15+
}
16+
1317
.spinner {
1418
position: absolute;
1519
left: 0;
1620
right: 0;
1721
top: 80px;
22+
margin-left: auto;
23+
margin-right: auto;
24+
1825
@media screen and (max-width: 450px) {
1926
top: 70px;
2027
}
21-
margin-left: auto;
22-
margin-right: auto;
23-
}
24-
@media screen and (max-width: 450px) {
25-
margin-top: 1em;
2628
}
29+
2730
h2 {
2831
border-bottom: 1px solid var(--primary-low);
2932
padding-bottom: 0.5em;
3033
margin-bottom: 1.5em;
3134
}
35+
3236
.featured-topics {
3337
display: flex;
3438
justify-content: center;
@@ -44,9 +48,11 @@ html.homepage-featured-topics {
4448

4549
@media screen and (min-width: 451px) {
4650
margin: 0 1.25em;
51+
4752
&:first-of-type:not(:last-of-type) {
4853
margin-left: 0;
4954
}
55+
5056
&:last-of-type:not(:first-of-type) {
5157
margin-right: 0;
5258
}
@@ -56,6 +62,7 @@ html.homepage-featured-topics {
5662
&:nth-of-type(4) {
5763
margin-right: 0;
5864
}
65+
5966
&:nth-of-type(n + 5) {
6067
display: none;
6168
}
@@ -65,32 +72,37 @@ html.homepage-featured-topics {
6572
&:nth-of-type(3) {
6673
margin-right: 0;
6774
}
75+
6876
&:nth-of-type(n + 4) {
6977
display: none;
7078
}
7179
}
7280

7381
@media screen and (max-width: 600px) {
7482
width: 100%;
83+
7584
&:nth-of-type(2) {
7685
margin-right: 0;
7786
}
87+
7888
&:nth-of-type(n + 3) {
7989
display: none;
8090
}
8191
}
8292

8393
@media screen and (max-width: 450px) {
8494
width: 100%;
95+
8596
&:nth-of-type(n + 2) {
8697
display: none;
8798
}
8899
}
100+
89101
h3 {
90102
margin: 0;
91-
padding: 1em 0 1.5em;
92103
font-size: var(--font-up-2);
93104
padding: 0.5em 1em 1em 1em;
105+
94106
a {
95107
display: -webkit-box;
96108
overflow: hidden;
@@ -100,12 +112,14 @@ html.homepage-featured-topics {
100112
-webkit-box-orient: vertical;
101113
}
102114
}
115+
103116
.featured-topic-image {
104117
height: 200px;
105118
max-width: 450px;
106119
width: 100%;
107120
background-size: cover;
108121
background-position: center center;
122+
109123
a {
110124
display: block;
111125
width: 100%;
@@ -115,19 +129,22 @@ html.homepage-featured-topics {
115129
}
116130
}
117131

118-
//same effect till max-width 600px
132+
// same effect till max-width 600px
119133
&.-mobile-stacked,
120134
&.-mobile-horizontal {
121135
.featured-topics {
122136
justify-content: flex-start;
137+
123138
@media screen and (max-width: 999px) {
124139
flex-direction: row;
125140
gap: 1.25em;
126-
padding-bottom: 1rem; //spacing for scroll on mobile
141+
padding-bottom: 1rem; // spacing for scroll on mobile
127142
overflow-x: scroll;
143+
128144
.featured-topic {
129145
flex-shrink: 0;
130146
margin: 0;
147+
131148
&:nth-of-type(n + 5) {
132149
display: flex;
133150
}
@@ -137,6 +154,7 @@ html.homepage-featured-topics {
137154
@media screen and (max-width: 800px) {
138155
.featured-topic {
139156
flex-basis: 45%;
157+
140158
&:nth-of-type(n + 4) {
141159
display: flex;
142160
}
@@ -151,12 +169,15 @@ html.homepage-featured-topics {
151169
flex-direction: column;
152170
align-items: center;
153171
gap: 0;
172+
154173
.featured-topic {
155174
flex-basis: 100%;
156175
margin: 0;
176+
157177
&:nth-of-type(n + 3) {
158178
display: flex;
159179
}
180+
160181
&:nth-of-type(n + 2) {
161182
display: flex;
162183
}
@@ -167,6 +188,7 @@ html.homepage-featured-topics {
167188
}
168189
}
169190
}
191+
170192
&.-mobile-horizontal {
171193
.featured-topics {
172194
.featured-topic {
@@ -175,13 +197,15 @@ html.homepage-featured-topics {
175197
&:nth-of-type(n + 3) {
176198
display: flex;
177199
}
200+
178201
&:nth-of-type(n + 2) {
179202
display: flex;
180203
}
181204
}
182205
}
183206
}
184207
}
208+
185209
@media screen and (max-width: 400px) {
186210
&.-mobile-horizontal {
187211
.featured-topics {
@@ -201,11 +225,12 @@ body:not(.staff) {
201225
}
202226

203227
button.featured-topic-toggle {
228+
gap: 0.35em;
229+
justify-content: flex-start;
230+
margin-bottom: 1.5em;
231+
204232
.d-button-label + .d-icon {
205233
order: -1;
206234
margin: 0;
207235
}
208-
gap: 0.35em;
209-
justify-content: flex-start;
210-
margin-bottom: 1.5em;
211236
}

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
{
22
"private": true,
33
"devDependencies": {
4-
"@discourse/lint-configs": "2.4.0",
5-
"ember-template-lint": "6.1.0",
6-
"eslint": "9.19.0",
7-
"prettier": "2.8.8"
4+
"@discourse/lint-configs": "2.11.1",
5+
"ember-template-lint": "7.0.1",
6+
"eslint": "9.22.0",
7+
"prettier": "3.5.3",
8+
"stylelint": "16.16.0"
89
},
910
"engines": {
1011
"node": ">= 22",

0 commit comments

Comments
 (0)