Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEV: Update linting #135

Merged
merged 1 commit into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
16 changes: 8 additions & 8 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ GEM
remote: https://rubygems.org/
specs:
ast (2.4.2)
json (2.6.3)
json (2.7.1)
language_server-protocol (3.17.0.3)
parallel (1.23.0)
parser (3.2.2.4)
Expand All @@ -11,26 +11,26 @@ GEM
prettier_print (1.2.1)
racc (1.7.3)
rainbow (3.1.1)
regexp_parser (2.8.2)
regexp_parser (2.8.3)
rexml (3.2.6)
rubocop (1.57.2)
rubocop (1.59.0)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.2.2.4)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.28.1, < 2.0)
rubocop-ast (>= 1.30.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.30.0)
parser (>= 3.2.1.0)
rubocop-capybara (2.19.0)
rubocop (~> 1.41)
rubocop-discourse (3.4.1)
rubocop (>= 1.1.0)
rubocop-rspec (>= 2.0.0)
rubocop-discourse (3.5.0)
rubocop (>= 1.59.0)
rubocop-rspec (>= 2.25.0)
rubocop-factory_bot (2.24.0)
rubocop (~> 1.33)
rubocop-rspec (2.25.0)
Expand All @@ -56,4 +56,4 @@ DEPENDENCIES
syntax_tree

BUNDLED WITH
2.3.4
2.4.22
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export default Component.extend({
tagName: "",
disabled: true,
user: null,
endorsements: null,
categoriesAllowingEndorsements: null,

init() {
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"author": "Mark VanLandingham",
"license": "MIT",
"devDependencies": {
"@discourse/lint-configs": "^1.0.0",
"ember-template-lint": "^5.11.2",
"eslint": "^8.51.0",
"@discourse/lint-configs": "^1.3.1",
"ember-template-lint": "^5.13.0",
"eslint": "^8.55.0",
"minimasonry": "^1.3.2",
"prettier": "^2.8.8"
}
Expand Down
1 change: 0 additions & 1 deletion plugin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
# version: 0.0.1
# authors: Mark VanLandingham
# url: https://github.com/discourse/discourse-category-experts
# transpile_js: true

register_asset "stylesheets/common.scss"

Expand Down
4 changes: 2 additions & 2 deletions spec/jobs/remind_admin_of_category_expert_posts_job_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def fabricate_category_with_category_experts
before { SiteSetting.send_category_experts_reminder_pms = true }

it "sends a PM to staff and moderators with the proper topic count" do
expect { execute }.to change { Topic.count }.by (1)
expect { execute }.to change { Topic.count }.by(1)

pm = Topic.where(archetype: Archetype.private_message).last
expect(pm.first_post.raw.start_with?("There are [2 category expert questions]")).to eq(true)
Expand All @@ -46,7 +46,7 @@ def fabricate_category_with_category_experts
before { SiteSetting.send_category_experts_reminder_pms = false }

it "does nothing" do
expect { execute }.to change { Topic.count }.by (0)
expect { execute }.not_to change { Topic.count }
end
end
end
4 changes: 2 additions & 2 deletions spec/jobs/remind_category_experts_job_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def fabricate_category_with_category_experts(groups)
end

it "Sends out the correct PM to each category expert" do
expect { execute }.to change { Topic.count }.by (2) # Sent a PM to each expert
expect { execute }.to change { Topic.count }.by(2) # Sent a PM to each expert

# Expert 1 should get 2 rows, 1 for each category
expert1_message = expert1.topics_allowed.where(archetype: Archetype.private_message).last
Expand All @@ -66,7 +66,7 @@ def fabricate_category_with_category_experts(groups)
before { SiteSetting.send_category_experts_reminder_pms = false }

it "does nothing" do
expect { execute }.to change { Topic.count }.by (0)
expect { execute }.not_to change { Topic.count }
end
end
end
4 changes: 2 additions & 2 deletions spec/models/category_expert_endorsement_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@

expect {
CategoryExpertEndorsement.create(user: user, endorsed_user: endorsee, category: category1)
}.to change { Reviewable.count }.by (1)
}.to change { Reviewable.count }.by(1)
end

it "does not create a reviewable if the new count does not match the site setting" do
SiteSetting.category_expert_suggestion_threshold = 3

expect {
CategoryExpertEndorsement.create(user: user, endorsed_user: endorsee, category: category1)
}.to change { Reviewable.count }.by (0)
}.not_to change { Reviewable.count }
end
end
end
Loading