DEV: Use @discourse/lint-configs (#35)

(and update ruby linting setup)
This commit is contained in:
Jarek Radosz 2023-10-24 21:07:34 +02:00 committed by GitHub
parent b3b181ae1f
commit 65d6af67f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 1040 additions and 823 deletions

View File

@ -1,3 +0,0 @@
{
"extends": "eslint-config-discourse"
}

1
.eslintrc.cjs Normal file
View File

@ -0,0 +1 @@
module.exports = require("@discourse/lint-configs/eslint");

View File

@ -1 +0,0 @@
{}

1
.prettierrc.cjs Normal file
View File

@ -0,0 +1 @@
module.exports = require("@discourse/lint-configs/prettier");

View File

@ -1,2 +1,2 @@
--print-width=100 --print-width=100
--plugins=plugin/trailing_comma,disable_ternary --plugins=plugin/trailing_comma,plugin/disable_auto_ternary

View File

@ -1,4 +1 @@
module.exports = { module.exports = require("@discourse/lint-configs/template-lint");
plugins: ["ember-template-lint-plugin-discourse"],
extends: "discourse:recommended",
};

View File

@ -5,5 +5,4 @@ source "https://rubygems.org"
group :development do group :development do
gem "rubocop-discourse" gem "rubocop-discourse"
gem "syntax_tree" gem "syntax_tree"
gem "syntax_tree-disable_ternary"
end end

View File

@ -2,36 +2,47 @@ GEM
remote: https://rubygems.org/ remote: https://rubygems.org/
specs: specs:
ast (2.4.2) ast (2.4.2)
json (2.6.2) base64 (0.1.1)
parallel (1.22.1) json (2.6.3)
parser (3.1.2.1) language_server-protocol (3.17.0.3)
parallel (1.23.0)
parser (3.2.2.4)
ast (~> 2.4.1) ast (~> 2.4.1)
prettier_print (1.2.0) racc
prettier_print (1.2.1)
racc (1.7.1)
rainbow (3.1.1) rainbow (3.1.1)
regexp_parser (2.6.0) regexp_parser (2.8.2)
rexml (3.2.5) rexml (3.2.6)
rubocop (1.36.0) rubocop (1.57.1)
base64 (~> 0.1.1)
json (~> 2.3) json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10) parallel (~> 1.10)
parser (>= 3.1.2.1) parser (>= 3.2.2.4)
rainbow (>= 2.2.2, < 4.0) rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0) regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0) rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.20.1, < 2.0) rubocop-ast (>= 1.28.1, < 2.0)
ruby-progressbar (~> 1.7) ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0) unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.21.0) rubocop-ast (1.29.0)
parser (>= 3.1.1.0) parser (>= 3.2.1.0)
rubocop-discourse (3.0) rubocop-capybara (2.19.0)
rubocop (~> 1.41)
rubocop-discourse (3.4.0)
rubocop (>= 1.1.0) rubocop (>= 1.1.0)
rubocop-rspec (>= 2.0.0) rubocop-rspec (>= 2.0.0)
rubocop-rspec (2.13.2) rubocop-factory_bot (2.24.0)
rubocop (~> 1.33) rubocop (~> 1.33)
ruby-progressbar (1.11.0) rubocop-rspec (2.24.1)
syntax_tree (5.1.0) rubocop (~> 1.33)
rubocop-capybara (~> 2.17)
rubocop-factory_bot (~> 2.22)
ruby-progressbar (1.13.0)
syntax_tree (6.2.0)
prettier_print (>= 1.2.0) prettier_print (>= 1.2.0)
syntax_tree-disable_ternary (1.0.0) unicode-display_width (2.5.0)
unicode-display_width (2.3.0)
PLATFORMS PLATFORMS
arm64-darwin-20 arm64-darwin-20
@ -44,7 +55,6 @@ PLATFORMS
DEPENDENCIES DEPENDENCIES
rubocop-discourse rubocop-discourse
syntax_tree syntax_tree
syntax_tree-disable_ternary
BUNDLED WITH BUNDLED WITH
2.3.10 2.3.10

View File

@ -5,6 +5,9 @@
"author": "Discourse", "author": "Discourse",
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
"eslint-config-discourse": "^3.1.0" "@discourse/lint-configs": "^1.0.0",
"ember-template-lint": "^5.11.2",
"eslint": "^8.52.0",
"prettier": "^2.8.8"
} }
} }

1796
yarn.lock

File diff suppressed because it is too large Load Diff