Skip to content

Commit 062d4c2

Browse files
authored
DEV: Update linting setup (#99)
1 parent c1201e0 commit 062d4c2

File tree

5 files changed

+50
-57
lines changed

5 files changed

+50
-57
lines changed

Gemfile.lock

Lines changed: 33 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,79 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
activesupport (7.1.3.3)
4+
activesupport (7.2.1.1)
55
base64
66
bigdecimal
7-
concurrent-ruby (~> 1.0, >= 1.0.2)
7+
concurrent-ruby (~> 1.0, >= 1.3.1)
88
connection_pool (>= 2.2.5)
99
drb
1010
i18n (>= 1.6, < 2)
11+
logger (>= 1.4.2)
1112
minitest (>= 5.1)
12-
mutex_m
13-
tzinfo (~> 2.0)
13+
securerandom (>= 0.3)
14+
tzinfo (~> 2.0, >= 2.0.5)
1415
ast (2.4.2)
1516
base64 (0.2.0)
1617
bigdecimal (3.1.8)
17-
concurrent-ruby (1.2.3)
18+
concurrent-ruby (1.3.4)
1819
connection_pool (2.4.1)
1920
drb (2.2.1)
20-
i18n (1.14.5)
21+
i18n (1.14.6)
2122
concurrent-ruby (~> 1.0)
2223
json (2.7.2)
2324
language_server-protocol (3.17.0.3)
24-
minitest (5.23.1)
25-
mutex_m (0.2.0)
26-
parallel (1.24.0)
27-
parser (3.3.1.0)
25+
logger (1.6.1)
26+
minitest (5.25.1)
27+
parallel (1.26.3)
28+
parser (3.3.5.0)
2829
ast (~> 2.4.1)
2930
racc
3031
prettier_print (1.2.1)
31-
racc (1.8.0)
32-
rack (3.0.11)
32+
racc (1.8.1)
33+
rack (3.1.8)
3334
rainbow (3.1.1)
3435
regexp_parser (2.9.2)
35-
rexml (3.3.6)
36-
strscan
37-
rubocop (1.64.0)
36+
rubocop (1.67.0)
3837
json (~> 2.3)
3938
language_server-protocol (>= 3.17.0)
4039
parallel (~> 1.10)
4140
parser (>= 3.3.0.2)
4241
rainbow (>= 2.2.2, < 4.0)
43-
regexp_parser (>= 1.8, < 3.0)
44-
rexml (>= 3.2.5, < 4.0)
45-
rubocop-ast (>= 1.31.1, < 2.0)
42+
regexp_parser (>= 2.4, < 3.0)
43+
rubocop-ast (>= 1.32.2, < 2.0)
4644
ruby-progressbar (~> 1.7)
4745
unicode-display_width (>= 2.4.0, < 3.0)
48-
rubocop-ast (1.31.3)
46+
rubocop-ast (1.32.3)
4947
parser (>= 3.3.1.0)
50-
rubocop-capybara (2.20.0)
48+
rubocop-capybara (2.21.0)
5149
rubocop (~> 1.41)
52-
rubocop-discourse (3.8.0)
50+
rubocop-discourse (3.8.2)
5351
activesupport (>= 6.1)
5452
rubocop (>= 1.59.0)
5553
rubocop-capybara (>= 2.0.0)
5654
rubocop-factory_bot (>= 2.0.0)
5755
rubocop-rails (>= 2.25.0)
58-
rubocop-rspec (>= 2.25.0)
59-
rubocop-factory_bot (2.25.1)
60-
rubocop (~> 1.41)
61-
rubocop-rails (2.25.0)
56+
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)
6261
activesupport (>= 4.2.0)
6362
rack (>= 1.1)
64-
rubocop (>= 1.33.0, < 2.0)
63+
rubocop (>= 1.52.0, < 2.0)
6564
rubocop-ast (>= 1.31.1, < 2.0)
66-
rubocop-rspec (2.29.2)
67-
rubocop (~> 1.40)
68-
rubocop-capybara (~> 2.17)
69-
rubocop-factory_bot (~> 2.22)
70-
rubocop-rspec_rails (~> 2.28)
71-
rubocop-rspec_rails (2.28.3)
72-
rubocop (~> 1.40)
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)
7370
ruby-progressbar (1.13.0)
74-
strscan (3.1.0)
71+
securerandom (0.3.1)
7572
syntax_tree (6.2.0)
7673
prettier_print (>= 1.2.0)
7774
tzinfo (2.0.6)
7875
concurrent-ruby (~> 1.0)
79-
unicode-display_width (2.5.0)
76+
unicode-display_width (2.6.0)
8077

8178
PLATFORMS
8279
ruby
@@ -86,4 +83,4 @@ DEPENDENCIES
8683
syntax_tree
8784

8885
BUNDLED WITH
89-
2.5.10
86+
2.5.21

javascripts/discourse/services/toc-processor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { tracked } from "@glimmer/tracking";
22
import { action } from "@ember/object";
3-
import Service, { inject as service } from "@ember/service";
3+
import Service, { service } from "@ember/service";
44
import { slugify } from "discourse/lib/utilities";
55

66
export default class TocProcessor extends Service {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"private": true,
33
"devDependencies": {
4-
"@discourse/lint-configs": "1.3.10",
4+
"@discourse/lint-configs": "1.4.2",
55
"ember-template-lint": "6.0.0",
66
"eslint": "8.57.1",
77
"prettier": "2.8.8",

pnpm-lock.yaml

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

spec/system/discotoc_timeline_user_spec.rb

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
:post,
1515
raw:
1616
"<div data-theme-toc='true'></div>\n\n# Heading 1\nContent for the first heading\n## Heading 2\nContent for the second heading\n### Heading 3\nContent for the third heading\n# Heading 4\nContent for the fourth heading",
17-
topic: topic_1
17+
topic: topic_1,
1818
)
1919
end
2020

@@ -23,7 +23,7 @@
2323
:post,
2424
raw:
2525
"\n# Heading 1\nContent for the first heading\n## Heading 2\nContent for the second heading\n### Heading 3\nContent for the third heading\n# Heading 4\nContent for the fourth heading",
26-
topic: topic_2
26+
topic: topic_2,
2727
)
2828
end
2929

@@ -32,7 +32,7 @@
3232
:post,
3333
raw:
3434
"intentionally \n long \n content \n so \n there's \n plenty \n to be \n scrolled \n past \n which \n will \n force \n the \n timeline \n to \n hide \n scroll \n scroll \n scroll \n scroll \n scroll \n scroll \n scroll \n scroll \n scroll \n scroll \n scroll \n scroll \n scroll \n scroll \n scroll ",
35-
topic: topic_1
35+
topic: topic_1,
3636
)
3737
end
3838

@@ -41,7 +41,7 @@
4141
:post,
4242
raw:
4343
"<div data-theme-toc='true'></div>\n\n# Heading For Reply 1\nContent for the first heading\n## Heading For Reply 2\nContent for the second heading\n### Heading For Reply 3\nContent for the third heading\n# Heading For Reply 4\nContent for the fourth heading",
44-
topic: topic_1
44+
topic: topic_1,
4545
)
4646
end
4747

@@ -50,7 +50,7 @@
5050
:post,
5151
raw:
5252
"intentionally \n long \n content \n so \n there's \n plenty \n to be \n scrolled \n past \n which \n will \n force \n the \n timeline \n to \n hide \n scroll \n scroll \n scroll \n scroll \n scroll \n scroll \n scroll \n scroll \n scroll \n scroll \n scroll \n scroll \n scroll \n scroll \n scroll ",
53-
topic: topic_1
53+
topic: topic_1,
5454
)
5555
end
5656

@@ -101,21 +101,17 @@
101101
:post,
102102
topic: source_topic,
103103
raw:
104-
"<div data-theme-toc='true'></div>\n\n# Heading 1 on the source topic\nContent for the first heading\n## Heading 2\nContent for the second heading\n### Heading 3\nContent for the third heading\n# Heading 4\nContent for the fourth heading\n<a href=c>Other topic</a>"
104+
"<div data-theme-toc='true'></div>\n\n# Heading 1 on the source topic\nContent for the first heading\n## Heading 2\nContent for the second heading\n### Heading 3\nContent for the third heading\n# Heading 4\nContent for the fourth heading\n<a href=c>Other topic</a>",
105105
)
106106
visit("/t/#{source_topic.id}")
107107

108108
expect(page).to have_css(
109-
".d-toc-item.d-toc-h1.active a[data-d-toc='toc-h1-heading-1-on-the-source-topic']"
109+
".d-toc-item.d-toc-h1.active a[data-d-toc='toc-h1-heading-1-on-the-source-topic']",
110110
)
111111
find("a[href='/t/#{topic_1.slug}/#{topic_1.id}'").click
112112

113-
expect(page).to have_css(
114-
".d-toc-item.d-toc-h1.active a[data-d-toc='toc-h1-heading-1']"
115-
)
116-
expect(page).to have_no_css(
117-
"a[data-d-toc='toc-h1-heading-1-on-the-source-topic']"
118-
)
113+
expect(page).to have_css(".d-toc-item.d-toc-h1.active a[data-d-toc='toc-h1-heading-1']")
114+
expect(page).to have_no_css("a[data-d-toc='toc-h1-heading-1-on-the-source-topic']")
119115
end
120116

121117
it "timeline will appear without markup if auto_TOC_categories is set to the topic's category" do

0 commit comments

Comments
 (0)