Skip to content

Commit 2a7595e

Browse files
committed
DEV: Update linting
1 parent adaed4d commit 2a7595e

File tree

10 files changed

+544
-1010
lines changed

10 files changed

+544
-1010
lines changed

Gemfile.lock

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
activesupport (8.0.2)
4+
activesupport (8.0.3)
55
base64
66
benchmark (>= 0.3)
77
bigdecimal
@@ -17,45 +17,45 @@ GEM
1717
ast (2.4.3)
1818
base64 (0.3.0)
1919
benchmark (0.4.1)
20-
bigdecimal (3.2.0)
20+
bigdecimal (3.3.0)
2121
concurrent-ruby (1.3.5)
22-
connection_pool (2.5.3)
22+
connection_pool (2.5.4)
2323
drb (2.2.3)
2424
i18n (1.14.7)
2525
concurrent-ruby (~> 1.0)
26-
json (2.12.2)
26+
json (2.15.1)
2727
language_server-protocol (3.17.0.5)
2828
lint_roller (1.1.0)
2929
logger (1.7.0)
30-
minitest (5.25.5)
30+
minitest (5.26.0)
3131
parallel (1.27.0)
32-
parser (3.3.8.0)
32+
parser (3.3.9.0)
3333
ast (~> 2.4.1)
3434
racc
3535
prettier_print (1.2.1)
36-
prism (1.4.0)
36+
prism (1.5.1)
3737
racc (1.8.1)
38-
rack (3.1.16)
38+
rack (3.2.2)
3939
rainbow (3.1.1)
40-
regexp_parser (2.10.0)
41-
rubocop (1.75.8)
40+
regexp_parser (2.11.3)
41+
rubocop (1.81.1)
4242
json (~> 2.3)
4343
language_server-protocol (~> 3.17.0.2)
4444
lint_roller (~> 1.1.0)
4545
parallel (~> 1.10)
4646
parser (>= 3.3.0.2)
4747
rainbow (>= 2.2.2, < 4.0)
4848
regexp_parser (>= 2.9.3, < 3.0)
49-
rubocop-ast (>= 1.44.0, < 2.0)
49+
rubocop-ast (>= 1.47.1, < 2.0)
5050
ruby-progressbar (~> 1.7)
5151
unicode-display_width (>= 2.4.0, < 4.0)
52-
rubocop-ast (1.44.1)
52+
rubocop-ast (1.47.1)
5353
parser (>= 3.3.7.2)
5454
prism (~> 1.4)
5555
rubocop-capybara (2.22.1)
5656
lint_roller (~> 1.1)
5757
rubocop (~> 1.72, >= 1.72.1)
58-
rubocop-discourse (3.12.1)
58+
rubocop-discourse (3.13.3)
5959
activesupport (>= 6.1)
6060
lint_roller (>= 1.1.0)
6161
rubocop (>= 1.73.2)
@@ -67,13 +67,13 @@ GEM
6767
rubocop-factory_bot (2.27.1)
6868
lint_roller (~> 1.1)
6969
rubocop (~> 1.72, >= 1.72.1)
70-
rubocop-rails (2.32.0)
70+
rubocop-rails (2.33.4)
7171
activesupport (>= 4.2.0)
7272
lint_roller (~> 1.1)
7373
rack (>= 1.1)
7474
rubocop (>= 1.75.0, < 2.0)
7575
rubocop-ast (>= 1.44.0, < 2.0)
76-
rubocop-rspec (3.6.0)
76+
rubocop-rspec (3.7.0)
7777
lint_roller (~> 1.1)
7878
rubocop (~> 1.72, >= 1.72.1)
7979
rubocop-rspec_rails (2.31.0)
@@ -82,14 +82,14 @@ GEM
8282
rubocop-rspec (~> 3.5)
8383
ruby-progressbar (1.13.0)
8484
securerandom (0.4.1)
85-
syntax_tree (6.2.0)
85+
syntax_tree (6.3.0)
8686
prettier_print (>= 1.2.0)
8787
tzinfo (2.0.6)
8888
concurrent-ruby (~> 1.0)
89-
unicode-display_width (3.1.4)
90-
unicode-emoji (~> 4.0, >= 4.0.4)
91-
unicode-emoji (4.0.4)
92-
uri (1.0.3)
89+
unicode-display_width (3.2.0)
90+
unicode-emoji (~> 4.1)
91+
unicode-emoji (4.1.0)
92+
uri (1.0.4)
9393

9494
PLATFORMS
9595
ruby
@@ -99,4 +99,4 @@ DEPENDENCIES
9999
syntax_tree
100100

101101
BUNDLED WITH
102-
2.6.9
102+
2.7.2

app/controllers/newsletter_integration/newsletter_subscription_controller.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def subscribe
1414
newsletter_integration_id: GLOBAL_NEWSLETTER_ID,
1515
)
1616
subscription.ensure_active!
17-
render json: success_json, status: 200
17+
render json: success_json, status: :ok
1818
end
1919

2020
def unsubscribe
@@ -30,7 +30,7 @@ def unsubscribe
3030
else
3131
subscription.ensure_inactive!
3232
end
33-
render json: success_json, status: 200
33+
render json: success_json, status: :ok
3434
end
3535

3636
private

app/controllers/newsletter_integration/webhooks/mailchimp_controller.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ class BadSecret < StandardError
1313
skip_before_action :check_xhr, :redirect_to_login_if_required, :verify_authenticity_token
1414

1515
rescue_from BadSecret do
16-
render body: "not ok", status: 404
16+
render body: "not ok", status: :not_found
1717
end
1818

1919
# when a webhook is created on Mailchimp, they test the callback URL with a
2020
# GET request and expect a 200 response to allow the webhook to be created.
2121
def verify
22-
render body: "ok", status: 200
22+
render body: "ok", status: :ok
2323
end
2424

2525
def sync
@@ -34,7 +34,7 @@ def sync
3434
desired_active_state = false
3535
else
3636
Rails.logger.warn("Mailchimp webhooks controller: unknown event type #{type.inspect}.")
37-
render body: "not ok", status: 422
37+
render body: "not ok", status: :unprocessable_content
3838
return
3939
end
4040

@@ -48,7 +48,7 @@ def sync
4848
subscription.active = desired_active_state
4949
subscription.save!
5050
end
51-
render body: "ok", status: 200
51+
render body: "ok", status: :ok
5252
end
5353

5454
private

assets/javascripts/discourse/connectors/top-notices/newsletter-banner.gjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ import Component from "@glimmer/component";
22
import { tracked } from "@glimmer/tracking";
33
import { action } from "@ember/object";
44
import { service } from "@ember/service";
5+
import { htmlSafe } from "@ember/template";
56
import DButton from "discourse/components/d-button";
67
import emoji from "discourse/helpers/emoji";
7-
import getUrl from "discourse/helpers/get-url";
8-
import htmlSafe from "discourse/helpers/html-safe";
98
import { ajax } from "discourse/lib/ajax";
109
import { popupAjaxError } from "discourse/lib/ajax-error";
10+
import getUrl from "discourse/lib/get-url";
1111
import { i18n } from "discourse-i18n";
1212

1313
export default class NewsletterBanner extends Component {

assets/javascripts/discourse/initializers/setup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
name: "discourse-newsletter-integration-setup",
55

66
initialize() {
7-
withPluginApi("1.6.0", (api) => {
7+
withPluginApi((api) => {
88
const currentUser = api.getCurrentUser();
99
if (!currentUser) {
1010
return;

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"private": true,
33
"devDependencies": {
4-
"@discourse/lint-configs": "2.23.0",
5-
"ember-template-lint": "7.7.0",
6-
"eslint": "9.28.0",
7-
"prettier": "3.5.3",
8-
"stylelint": "16.20.0"
4+
"@discourse/lint-configs": "2.32.0",
5+
"ember-template-lint": "7.9.1",
6+
"eslint": "9.37.0",
7+
"prettier": "3.6.2",
8+
"stylelint": "16.25.0"
99
},
1010
"engines": {
1111
"node": ">= 22",

0 commit comments

Comments
 (0)