DEV: Update linting (#364)

This commit is contained in:
Jarek Radosz 2025-03-13 16:08:17 +01:00 committed by GitHub
parent 41ee039443
commit e290d651f2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 1030 additions and 363 deletions

View File

@ -1,80 +1,93 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (7.1.3.3)
activesupport (8.0.2)
base64
benchmark (>= 0.3)
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
concurrent-ruby (~> 1.0, >= 1.3.1)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
logger (>= 1.4.2)
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5)
uri (>= 0.13.1)
ast (2.4.2)
base64 (0.2.0)
bigdecimal (3.1.8)
concurrent-ruby (1.2.3)
connection_pool (2.4.1)
benchmark (0.4.0)
bigdecimal (3.1.9)
concurrent-ruby (1.3.5)
connection_pool (2.5.0)
drb (2.2.1)
i18n (1.14.5)
i18n (1.14.7)
concurrent-ruby (~> 1.0)
json (2.7.2)
language_server-protocol (3.17.0.3)
minitest (5.23.1)
mutex_m (0.2.0)
parallel (1.24.0)
parser (3.3.1.0)
json (2.10.2)
language_server-protocol (3.17.0.4)
lint_roller (1.1.0)
logger (1.6.6)
minitest (5.25.5)
parallel (1.26.3)
parser (3.3.7.1)
ast (~> 2.4.1)
racc
prettier_print (1.2.1)
racc (1.8.0)
rack (3.0.12)
racc (1.8.1)
rack (3.1.12)
rainbow (3.1.1)
regexp_parser (2.9.2)
rexml (3.3.9)
rubocop (1.64.0)
regexp_parser (2.10.0)
rubocop (1.74.0)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.1.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.31.1, < 2.0)
regexp_parser (>= 2.9.3, < 3.0)
rubocop-ast (>= 1.38.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.31.3)
unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.38.1)
parser (>= 3.3.1.0)
rubocop-capybara (2.20.0)
rubocop (~> 1.41)
rubocop-discourse (3.8.0)
rubocop-capybara (2.22.1)
lint_roller (~> 1.1)
rubocop (~> 1.72, >= 1.72.1)
rubocop-discourse (3.12.1)
activesupport (>= 6.1)
rubocop (>= 1.59.0)
rubocop-capybara (>= 2.0.0)
rubocop-factory_bot (>= 2.0.0)
rubocop-rails (>= 2.25.0)
rubocop-rspec (>= 2.25.0)
rubocop-factory_bot (2.25.1)
rubocop (~> 1.41)
rubocop-rails (2.25.0)
lint_roller (>= 1.1.0)
rubocop (>= 1.73.2)
rubocop-capybara (>= 2.22.0)
rubocop-factory_bot (>= 2.27.0)
rubocop-rails (>= 2.30.3)
rubocop-rspec (>= 3.0.1)
rubocop-rspec_rails (>= 2.31.0)
rubocop-factory_bot (2.27.1)
lint_roller (~> 1.1)
rubocop (~> 1.72, >= 1.72.1)
rubocop-rails (2.30.3)
activesupport (>= 4.2.0)
lint_roller (~> 1.1)
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rspec (2.29.2)
rubocop (~> 1.40)
rubocop-capybara (~> 2.17)
rubocop-factory_bot (~> 2.22)
rubocop-rspec_rails (~> 2.28)
rubocop-rspec_rails (2.28.3)
rubocop (~> 1.40)
rubocop (>= 1.72.1, < 2.0)
rubocop-ast (>= 1.38.0, < 2.0)
rubocop-rspec (3.5.0)
lint_roller (~> 1.1)
rubocop (~> 1.72, >= 1.72.1)
rubocop-rspec_rails (2.31.0)
lint_roller (~> 1.1)
rubocop (~> 1.72, >= 1.72.1)
rubocop-rspec (~> 3.5)
ruby-progressbar (1.13.0)
securerandom (0.4.1)
syntax_tree (6.2.0)
prettier_print (>= 1.2.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.5.0)
unicode-display_width (3.1.4)
unicode-emoji (~> 4.0, >= 4.0.4)
unicode-emoji (4.0.4)
uri (1.0.3)
PLATFORMS
ruby
@ -84,4 +97,4 @@ DEPENDENCIES
syntax_tree
BUNDLED WITH
2.5.10
2.6.5

View File

@ -5,18 +5,23 @@ table.group-reports {
th:first-child {
width: 30%;
}
th:nth-child(2) {
width: 60%;
}
th:last-child {
width: 20%;
text-align: right;
}
tbody tr td {
padding: 0.5em;
&:first-child {
font-size: $font-up-1;
}
&:last-child {
text-align: right;
}
@ -35,12 +40,15 @@ table.group-reports {
height: 400px;
border: 1px solid var(--primary-very-low);
}
&.no-schema {
.editor-panel {
width: 100%;
}
.right-panel {
width: 0;
button.unhide {
position: absolute;
margin-left: -53px;
@ -51,11 +59,13 @@ table.group-reports {
.editor-panel {
flex-grow: 1;
.ace-wrapper {
position: relative;
height: 100%;
width: 100%;
}
.ace_editor {
position: absolute;
left: 0;
@ -64,10 +74,12 @@ table.group-reports {
bottom: 0;
}
}
.right-panel {
flex-shrink: 0;
flex-grow: 0;
width: 345px;
.schema {
border-left: 1px solid var(--primary-low);
height: 100%;
@ -81,7 +93,7 @@ table.group-reports {
padding: 0.5em;
position: sticky;
background-color: var(--secondary);
top: 0px;
top: 0;
z-index: 1;
}
@ -89,34 +101,42 @@ table.group-reports {
font-weight: bold;
border-bottom: 1px solid var(--primary-low);
padding-left: 5px;
.fa {
width: 6px;
}
}
ul {
list-style-type: none;
margin: 0;
}
dl {
margin: 0;
}
dl > div > * {
padding-top: 2px;
padding-bottom: 2px;
}
dl > div {
clear: both;
}
dt {
display: inline-block;
vertical-align: text-top;
overflow-wrap: break-word;
width: 110px;
margin-left: 5px;
&.sensitive {
color: var(--danger);
}
}
dd {
display: inline-block;
vertical-align: text-top;
@ -130,20 +150,12 @@ table.group-reports {
color: var(--primary-medium);
font-style: italic;
}
.popup-info {
color: var(--primary-medium);
.popup {
display: none;
}
&:hover .popup {
display: block;
}
&:focus .popup {
display: block;
}
.popup {
width: 180px;
padding: 4px;
position: relative;
@ -152,11 +164,20 @@ table.group-reports {
padding-right: calc(5px + 0.5em);
}
&:hover .popup {
display: block;
}
&:focus .popup {
display: block;
}
.popup ol {
padding: 0px;
padding: 0;
position: relative;
list-style: none;
> li:before {
> li::before {
content: attr(value) ": ";
}
}
@ -164,15 +185,17 @@ table.group-reports {
}
}
}
.grippie {
cursor: nwse-resize;
clear: both;
font-size: $font-down-2;
-webkit-user-select: none;
user-select: none;
color: var(--primary);
text-align: right;
background: var(--primary-very-low);
border: 1px solid var(--primary-very-low);
.d-icon {
transform: rotate(90deg);
}
@ -184,45 +207,56 @@ table.group-reports {
display: flex;
align-items: center;
margin-bottom: 1em;
h1 {
display: inline-block;
margin: 0 0.5em 0 0;
color: var(--primary);
a {
color: currentColor;
color: currentcolor;
}
}
}
button.previous {
margin-right: 0.5em;
.d-icon {
margin-left: -0.15em; // fixing fontawesome horizontal alignment
}
}
.name-text-field {
width: 100%;
}
.name input,
.desc textarea {
width: 100%;
margin: 0;
}
&:not(.editing) .desc {
margin: 10px 0;
}
.groups {
margin: 10px 0;
display: flex;
flex-direction: row;
align-items: center;
@include breakpoint("tablet") {
flex-direction: column;
align-items: flex-start;
}
.label {
margin-right: 10px;
color: var(--primary-high);
}
.name {
display: inline;
}
@ -237,6 +271,7 @@ table.group-reports {
.query-run {
margin-top: 25px;
.query-plan {
display: inline-block;
margin-left: 15px;
@ -254,33 +289,42 @@ table.group-reports {
.query-params {
border: 1px solid var(--header_primary-medium);
.params-form {
margin: 5px;
html.desktop-view & {
flex-direction: row;
flex-wrap: wrap;
}
}
.param > input,
.param > .select-kit {
margin: 9px;
}
.invalid input {
background-color: var(--danger-low);
}
.invalid .ac-wrap {
background-color: var(--danger-low);
}
.param {
display: flex;
align-items: center;
flex: 0;
.ac-wrap {
display: inline-block;
input {
width: 100px !important; // override an inline style
}
}
input,
.select-kit {
width: auto;
@ -300,6 +344,7 @@ table.group-reports {
.query-create {
display: flex;
input {
margin-right: 0.5em;
margin-bottom: 0;
@ -312,13 +357,16 @@ table.group-reports {
overflow: auto;
max-height: 1000px;
}
table {
width: 100%;
margin-top: 10px;
td {
padding: 8px;
}
}
thead {
th {
position: sticky;
@ -333,16 +381,20 @@ table.group-reports {
.query-list {
display: flex;
align-items: flex-start;
.btn-left {
margin-right: 0.5em;
}
.btn-right {
margin-left: auto;
margin-right: 0.5em;
}
li.none {
display: none;
}
.import-btn {
display: flex;
}
@ -353,24 +405,30 @@ table.group-reports {
.created-by {
width: 15%;
}
.group-names {
width: 15%;
.group-names-header {
position: absolute;
bottom: 8px;
left: 6px;
}
}
.created-at {
width: 15%;
}
.heading {
position: relative;
color: var(--primary-medium);
padding: 50px 0px 0px 0px;
padding: 50px 0 0 0;
th.sortable {
font-weight: normal;
}
.heading-toggle {
bottom: 0;
position: absolute;
@ -378,43 +436,54 @@ table.group-reports {
}
}
}
.query-row {
a {
width: 100%;
}
.query-name {
color: var(--primary);
}
.query-desc {
display: block;
color: var(--primary-high);
}
.query-created-by {
color: var(--primary-high);
}
.query-group-names {
color: var(--tertiary);
a {
display: inline;
}
}
.group-names {
@include breakpoint("tablet") {
text-align: right;
}
}
.query-created-at {
color: var(--primary-medium);
}
}
.query-row:hover {
background-color: inherit;
}
tr a {
color: inherit;
cursor: pointer;
display: inline-block;
}
.no-search-results {
color: var(--primary-medium);
}
@ -423,18 +492,22 @@ table.group-reports {
.result-info {
float: left;
}
.result-about {
color: var(--primary-high);
float: right;
}
.result-explain {
padding-top: 1em;
margin-bottom: 0px;
margin-bottom: 0;
}
.result-post-link {
display: block;
color: inherit !important;
}
.result-json {
display: flex;
}
@ -458,9 +531,11 @@ table.group-reports {
label {
color: var(--primary-high);
}
input {
margin-right: 4px;
}
.popup {
background-color: var(--secondary);
position: absolute;

View File

@ -1,10 +1,11 @@
{
"private": true,
"devDependencies": {
"@discourse/lint-configs": "2.4.0",
"@discourse/lint-configs": "2.7.0",
"ember-template-lint": "6.1.0",
"eslint": "9.19.0",
"prettier": "2.8.8"
"eslint": "9.20.1",
"prettier": "2.8.8",
"stylelint": "16.14.1"
},
"engines": {
"node": ">= 22",

1169
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

3
stylelint.config.mjs Normal file
View File

@ -0,0 +1,3 @@
export default {
extends: ["@discourse/lint-configs/stylelint"],
};