1
0
mirror of synced 2026-05-22 14:23:18 +00:00

DEV: Update linting and add types (#93)

* DEV: Update linting and add types

* DEV: Update linting and add types
This commit is contained in:
Jarek Radosz
2026-01-28 14:16:05 +01:00
committed by GitHub
parent 21814f38ce
commit 07a74c0532
6 changed files with 1022 additions and 556 deletions
+1
View File
@@ -1,2 +1,3 @@
node_modules node_modules
.discourse-site .discourse-site
.eslintcache
+28 -26
View File
@@ -1,14 +1,14 @@
GEM GEM
remote: https://rubygems.org/ remote: https://rubygems.org/
specs: specs:
activesupport (8.0.3) activesupport (8.1.2)
base64 base64
benchmark (>= 0.3)
bigdecimal bigdecimal
concurrent-ruby (~> 1.0, >= 1.3.1) concurrent-ruby (~> 1.0, >= 1.3.1)
connection_pool (>= 2.2.5) connection_pool (>= 2.2.5)
drb drb
i18n (>= 1.6, < 2) i18n (>= 1.6, < 2)
json
logger (>= 1.4.2) logger (>= 1.4.2)
minitest (>= 5.1) minitest (>= 5.1)
securerandom (>= 0.3) securerandom (>= 0.3)
@@ -16,29 +16,29 @@ GEM
uri (>= 0.13.1) uri (>= 0.13.1)
ast (2.4.3) ast (2.4.3)
base64 (0.3.0) base64 (0.3.0)
benchmark (0.4.1) bigdecimal (4.0.1)
bigdecimal (3.3.0) concurrent-ruby (1.3.6)
concurrent-ruby (1.3.5) connection_pool (3.0.2)
connection_pool (2.5.4)
drb (2.2.3) drb (2.2.3)
i18n (1.14.7) i18n (1.14.8)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
json (2.15.1) json (2.18.0)
language_server-protocol (3.17.0.5) language_server-protocol (3.17.0.5)
lint_roller (1.1.0) lint_roller (1.1.0)
logger (1.7.0) logger (1.7.0)
minitest (5.26.0) minitest (6.0.1)
prism (~> 1.5)
parallel (1.27.0) parallel (1.27.0)
parser (3.3.9.0) parser (3.3.10.1)
ast (~> 2.4.1) ast (~> 2.4.1)
racc racc
prettier_print (1.2.1) prettier_print (1.2.1)
prism (1.5.1) prism (1.8.0)
racc (1.8.1) racc (1.8.1)
rack (3.2.3) rack (3.2.4)
rainbow (3.1.1) rainbow (3.1.1)
regexp_parser (2.11.3) regexp_parser (2.11.3)
rubocop (1.81.1) rubocop (1.84.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)
@@ -46,37 +46,39 @@ 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.47.1, < 2.0) rubocop-ast (>= 1.49.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.47.1) rubocop-ast (1.49.0)
parser (>= 3.3.7.2) parser (>= 3.3.7.2)
prism (~> 1.4) prism (~> 1.7)
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)
rubocop-discourse (3.13.3) rubocop-discourse (3.14.0)
activesupport (>= 6.1) activesupport (>= 6.1)
lint_roller (>= 1.1.0) lint_roller (>= 1.1.0)
rubocop (>= 1.73.2)
rubocop-capybara (>= 2.22.0) rubocop-capybara (>= 2.22.0)
rubocop-discourse-base (>= 1.0.0)
rubocop-factory_bot (>= 2.27.0) rubocop-factory_bot (>= 2.27.0)
rubocop-rails (>= 2.30.3) rubocop-rails (>= 2.30.3)
rubocop-rspec (>= 3.0.1) rubocop-rspec (>= 3.0.1)
rubocop-rspec_rails (>= 2.31.0) rubocop-rspec_rails (>= 2.31.0)
rubocop-factory_bot (2.27.1) rubocop-discourse-base (1.0.0)
rubocop (>= 1.80.0)
rubocop-factory_bot (2.28.0)
lint_roller (~> 1.1) lint_roller (~> 1.1)
rubocop (~> 1.72, >= 1.72.1) rubocop (~> 1.72, >= 1.72.1)
rubocop-rails (2.33.4) rubocop-rails (2.34.3)
activesupport (>= 4.2.0) activesupport (>= 4.2.0)
lint_roller (~> 1.1) lint_roller (~> 1.1)
rack (>= 1.1) rack (>= 1.1)
rubocop (>= 1.75.0, < 2.0) rubocop (>= 1.75.0, < 2.0)
rubocop-ast (>= 1.44.0, < 2.0) rubocop-ast (>= 1.44.0, < 2.0)
rubocop-rspec (3.7.0) rubocop-rspec (3.9.0)
lint_roller (~> 1.1) lint_roller (~> 1.1)
rubocop (~> 1.72, >= 1.72.1) rubocop (~> 1.81)
rubocop-rspec_rails (2.31.0) rubocop-rspec_rails (2.32.0)
lint_roller (~> 1.1) lint_roller (~> 1.1)
rubocop (~> 1.72, >= 1.72.1) rubocop (~> 1.72, >= 1.72.1)
rubocop-rspec (~> 3.5) rubocop-rspec (~> 3.5)
@@ -88,8 +90,8 @@ GEM
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
unicode-display_width (3.2.0) unicode-display_width (3.2.0)
unicode-emoji (~> 4.1) unicode-emoji (~> 4.1)
unicode-emoji (4.1.0) unicode-emoji (4.2.0)
uri (1.0.4) uri (1.1.1)
PLATFORMS PLATFORMS
arm64-darwin-23 arm64-darwin-23
@@ -100,4 +102,4 @@ DEPENDENCIES
syntax_tree syntax_tree
BUNDLED WITH BUNDLED WITH
2.7.2 4.0.4
+23 -7
View File
@@ -1,17 +1,33 @@
{ {
"private": true, "private": true,
"devDependencies": { "devDependencies": {
"@discourse/lint-configs": "2.32.0", "@discourse/lint-configs": "2.37.2",
"ember-template-lint": "7.9.1", "@glint/ember-tsc": "1.0.9",
"eslint": "9.37.0", "concurrently": "^9.2.1",
"prettier": "3.6.2", "discourse": "npm:@discourse/types@2026.1.0-2709d36",
"stylelint": "16.25.0" "ember-template-lint": "7.9.3",
"eslint": "9.39.2",
"prettier": "3.8.0",
"stylelint": "17.0.0"
},
"scripts": {
"lint": "concurrently \"pnpm:lint:*(!fix)\" --names \"lint:\"",
"lint:fix": "concurrently \"pnpm:lint:*:fix\" --names \"fix:\"",
"lint:css": "pnpm stylelint {javascripts,desktop,mobile,common,scss}/**/*.scss --allow-empty-input",
"lint:css:fix": "pnpm stylelint {javascripts,desktop,mobile,common,scss}/**/*.scss --fix --allow-empty-input",
"lint:js": "eslint {javascripts,test} --cache --no-error-on-unmatched-pattern",
"lint:js:fix": "eslint {javascripts,test} --fix --no-error-on-unmatched-pattern",
"lint:hbs": "ember-template-lint javascripts/**/*.gjs --no-error-on-unmatched-pattern",
"lint:hbs:fix": "ember-template-lint javascripts/**/*.gjs --fix --no-error-on-unmatched-pattern",
"lint:prettier": "pnpm prettier {javascripts,desktop,mobile,common,scss}/**/*.scss {javascripts,test}/**/*.{js,gjs} --check --no-error-on-unmatched-pattern",
"lint:prettier:fix": "pnpm prettier {javascripts,desktop,mobile,common,scss}/**/*.scss {javascripts,test}/**/*.{js,gjs} -w --no-error-on-unmatched-pattern",
"lint:types": "ember-tsc -b"
}, },
"engines": { "engines": {
"node": ">= 22", "node": ">= 22",
"npm": "please-use-pnpm", "npm": "please-use-pnpm",
"yarn": "please-use-pnpm", "yarn": "please-use-pnpm",
"pnpm": "9.x" "pnpm": "^10"
}, },
"packageManager": "pnpm@9.15.5" "packageManager": "pnpm@10.28.0"
} }
+947 -522
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1,6 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
RSpec.describe "Core features", type: :system do RSpec.describe "Core features" do
before { upload_theme_or_component } before { upload_theme_or_component }
it_behaves_like "having working core features" it_behaves_like "having working core features"
+22
View File
@@ -0,0 +1,22 @@
{
"extends": "discourse/tsconfig-plugin",
"include": [
"javascripts/**/*",
"migrations/**/*",
"test/**/*",
"node_modules/discourse/declarations/**/*"
],
"compilerOptions": {
"paths": {
"admin/*": ["./node_modules/discourse/declarations/admin/*"],
"float-kit/*": ["./node_modules/discourse/declarations/float-kit/*"],
"select-kit/*": ["./node_modules/discourse/declarations/select-kit/*"],
"truth-helpers": [
"./node_modules/discourse/declarations/truth-helpers/index.d.ts"
],
"truth-helpers/*": [
"./node_modules/discourse/declarations/truth-helpers/*"
]
}
}
}