1
0
mirror of synced 2026-05-22 15:03:15 +00:00

DEV: Update linting config and run gjs-codemod (#52)

* DEV: Update linting config and run gjs-codemod

* DEV: Update linting config and run gjs-codemod
This commit is contained in:
Jarek Radosz
2025-06-05 13:09:57 +02:00
committed by GitHub
parent c5e98c2af8
commit 92e2b4efcd
9 changed files with 498 additions and 1019 deletions
+1
View File
@@ -1,3 +1,4 @@
< 3.5.0.beta5-dev: c5e98c2af8b6715675ca383d6ca9f868c263ce88
< 3.5.0.beta1-dev: a0c59ffe2b8968b417b1b43cedeeb96954b07c8b < 3.5.0.beta1-dev: a0c59ffe2b8968b417b1b43cedeeb96954b07c8b
< 3.4.0.beta1-dev: 3a5decb0a56bca658e75c7e365c62e0ea7044ccd < 3.4.0.beta1-dev: 3a5decb0a56bca658e75c7e365c62e0ea7044ccd
< 3.3.0.beta1-dev: 3106625aab4021cbba219629d88604d213829a68 < 3.3.0.beta1-dev: 3106625aab4021cbba219629d88604d213829a68
+23 -21
View File
@@ -14,30 +14,31 @@ GEM
securerandom (>= 0.3) securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5) tzinfo (~> 2.0, >= 2.0.5)
uri (>= 0.13.1) uri (>= 0.13.1)
ast (2.4.2) ast (2.4.3)
base64 (0.2.0) base64 (0.3.0)
benchmark (0.4.0) benchmark (0.4.1)
bigdecimal (3.1.9) bigdecimal (3.2.1)
concurrent-ruby (1.3.5) concurrent-ruby (1.3.5)
connection_pool (2.5.0) connection_pool (2.5.3)
drb (2.2.1) drb (2.2.3)
i18n (1.14.7) i18n (1.14.7)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
json (2.10.2) json (2.12.2)
language_server-protocol (3.17.0.4) language_server-protocol (3.17.0.5)
lint_roller (1.1.0) lint_roller (1.1.0)
logger (1.6.6) logger (1.7.0)
minitest (5.25.5) minitest (5.25.5)
parallel (1.26.3) parallel (1.27.0)
parser (3.3.7.1) parser (3.3.8.0)
ast (~> 2.4.1) ast (~> 2.4.1)
racc racc
prettier_print (1.2.1) prettier_print (1.2.1)
prism (1.4.0)
racc (1.8.1) racc (1.8.1)
rack (3.1.12) rack (3.1.15)
rainbow (3.1.1) rainbow (3.1.1)
regexp_parser (2.10.0) regexp_parser (2.10.0)
rubocop (1.74.0) rubocop (1.76.0)
json (~> 2.3) json (~> 2.3)
language_server-protocol (~> 3.17.0.2) language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.1.0) lint_roller (~> 1.1.0)
@@ -45,11 +46,12 @@ GEM
parser (>= 3.3.0.2) parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0) rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.9.3, < 3.0) regexp_parser (>= 2.9.3, < 3.0)
rubocop-ast (>= 1.38.0, < 2.0) rubocop-ast (>= 1.45.0, < 2.0)
ruby-progressbar (~> 1.7) ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 4.0) unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.39.0) rubocop-ast (1.45.0)
parser (>= 3.3.1.0) parser (>= 3.3.7.2)
prism (~> 1.4)
rubocop-capybara (2.22.1) rubocop-capybara (2.22.1)
lint_roller (~> 1.1) lint_roller (~> 1.1)
rubocop (~> 1.72, >= 1.72.1) rubocop (~> 1.72, >= 1.72.1)
@@ -65,13 +67,13 @@ GEM
rubocop-factory_bot (2.27.1) rubocop-factory_bot (2.27.1)
lint_roller (~> 1.1) lint_roller (~> 1.1)
rubocop (~> 1.72, >= 1.72.1) rubocop (~> 1.72, >= 1.72.1)
rubocop-rails (2.30.3) rubocop-rails (2.32.0)
activesupport (>= 4.2.0) activesupport (>= 4.2.0)
lint_roller (~> 1.1) lint_roller (~> 1.1)
rack (>= 1.1) rack (>= 1.1)
rubocop (>= 1.72.1, < 2.0) rubocop (>= 1.75.0, < 2.0)
rubocop-ast (>= 1.38.0, < 2.0) rubocop-ast (>= 1.44.0, < 2.0)
rubocop-rspec (3.5.0) rubocop-rspec (3.6.0)
lint_roller (~> 1.1) lint_roller (~> 1.1)
rubocop (~> 1.72, >= 1.72.1) rubocop (~> 1.72, >= 1.72.1)
rubocop-rspec_rails (2.31.0) rubocop-rspec_rails (2.31.0)
@@ -98,4 +100,4 @@ DEPENDENCIES
syntax_tree syntax_tree
BUNDLED WITH BUNDLED WITH
2.6.6 2.6.9
+3 -3
View File
@@ -70,9 +70,9 @@
background: rgb(255, 255, 255); background: rgb(255, 255, 255);
background: linear-gradient( background: linear-gradient(
180deg, 180deg,
rgba(255, 255, 255, 0) 10%, rgb(255, 255, 255, 0) 10%,
rgba(255, 255, 255, 0.6) 60%, rgb(255, 255, 255, 0.6) 60%,
rgba(255, 255, 255, 1) 100% rgb(255, 255, 255, 1) 100%
); );
} }
} }
@@ -1,6 +1,9 @@
import Component from "@ember/component"; import Component from "@ember/component";
import { tagName } from "@ember-decorators/component"; import { tagName } from "@ember-decorators/component";
import DButton from "discourse/components/d-button";
import routeAction from "discourse/helpers/route-action";
import discourseComputed from "discourse/lib/decorators"; import discourseComputed from "discourse/lib/decorators";
import { i18n } from "discourse-i18n";
const enabledCategories = settings.enabled_categories const enabledCategories = settings.enabled_categories
.split("|") .split("|")
@@ -53,4 +56,39 @@ export default class TopicInGatedCategory extends Component {
shouldShow(hidden) { shouldShow(hidden) {
return !hidden; return !hidden;
} }
<template>
{{#if this.shouldShow}}
<div class="custom-gated-topic-container">
<div class="custom-gated-topic-content">
<div class="custom-gated-topic-content--header">
{{i18n (themePrefix "heading_text")}}
</div>
<p class="custom-gated-topic-content--text">
{{i18n (themePrefix "subheading_text")}}
</p>
<div class="custom-gated-topic-content--cta">
<div class="custom-gated-topic-content--cta__signup">
<DButton
@action={{routeAction "showCreateAccount"}}
class="btn-primary btn-large sign-up-button"
@translatedLabel={{i18n (themePrefix "signup_cta_label")}}
/>
</div>
<div class="custom-gated-topic-content--cta__login">
<DButton
@action={{routeAction "showLogin"}}
@id="cta-login-link"
class="btn btn-text login-button"
@translatedLabel={{i18n (themePrefix "login_cta_label")}}
/>
</div>
</div>
</div>
</div>
{{/if}}
</template>
} }
@@ -1,32 +0,0 @@
{{#if this.shouldShow}}
<div class="custom-gated-topic-container">
<div class="custom-gated-topic-content">
<div class="custom-gated-topic-content--header">
{{theme-i18n "heading_text"}}
</div>
<p class="custom-gated-topic-content--text">
{{theme-i18n "subheading_text"}}
</p>
<div class="custom-gated-topic-content--cta">
<div class="custom-gated-topic-content--cta__signup">
{{d-button
action=(route-action "showCreateAccount")
class="btn-primary btn-large sign-up-button"
translatedLabel=(theme-i18n "signup_cta_label")
}}
</div>
<div class="custom-gated-topic-content--cta__login">
{{d-button
action=(route-action "showLogin")
id="cta-login-link"
class="btn btn-text login-button"
translatedLabel=(theme-i18n "login_cta_label")
}}
</div>
</div>
</div>
</div>
{{/if}}
@@ -0,0 +1,13 @@
import Component from "@ember/component";
import { classNames } from "@ember-decorators/component";
import TopicInGatedCategory from "../../components/topic-in-gated-category";
@classNames("topic-above-post-stream-outlet", "topic-in-gated-category")
export default class TopicInGatedCategoryConnector extends Component {
<template>
<TopicInGatedCategory
@categoryId={{this.model.category_id}}
@tags={{this.model.tags}}
/>
</template>
}
@@ -1,4 +0,0 @@
{{topic-in-gated-category
categoryId=this.model.category_id
tags=this.model.tags
}}
+4 -4
View File
@@ -1,11 +1,11 @@
{ {
"private": true, "private": true,
"devDependencies": { "devDependencies": {
"@discourse/lint-configs": "2.11.1", "@discourse/lint-configs": "2.25.0",
"ember-template-lint": "7.0.1", "ember-template-lint": "7.8.1",
"eslint": "9.22.0", "eslint": "9.28.0",
"prettier": "3.5.3", "prettier": "3.5.3",
"stylelint": "16.16.0" "stylelint": "16.20.0"
}, },
"engines": { "engines": {
"node": ">= 22", "node": ">= 22",
+416 -955
View File
File diff suppressed because it is too large Load Diff