Skip to content

Commit

Permalink
Fix stylelint warnings (refined-github#7772)
Browse files Browse the repository at this point in the history
  • Loading branch information
fregante authored Aug 29, 2024
1 parent 9dd7c8f commit 62624fa
Show file tree
Hide file tree
Showing 19 changed files with 148 additions and 30 deletions.
126 changes: 111 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 17 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,26 @@
},
"stylelint": {
"extends": [
"stylelint-config-xo"
"stylelint-config-standard",
"@stylistic/stylelint-config"
],
"rules": {
"@stylistic/declaration-colon-newline-after": null,
"alpha-value-notation": "percentage",
"@stylistic/string-quotes": "single",
"comment-empty-line-before": [
"always",
{
"except": ["first-nested"],
"ignore": ["after-comment", "stylelint-commands"]
}
],
"@stylistic/indentation": null,
"@stylistic/declaration-colon-newline-after": null,
"@stylistic/selector-combinator-space-before": null,
"@stylistic/selector-descendant-combinator-no-non-space": null,
"@stylistic/value-list-comma-newline-after": null,
"selector-type-no-unknown": null,
"declaration-no-important": null,
"@stylistic/max-line-length": null,
"custom-property-pattern": null,
"selector-class-pattern": null,
"selector-id-pattern": null,
"no-descending-specificity": null
Expand Down Expand Up @@ -97,6 +107,7 @@
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-sucrase": "^5.0.2",
"@sindresorhus/tsconfig": "^6.0.0",
"@stylistic/stylelint-config": "^2.0.0",
"@types/chrome": "^0.0.270",
"@types/codemirror": "^5.60.15",
"@types/dom-navigation": "^1.0.3",
Expand Down Expand Up @@ -124,8 +135,8 @@
"rollup-plugin-styles": "^4.0.0",
"rollup-plugin-webpack-stats": "^1.0.2",
"snarkdown": "^2.0.0",
"stylelint": "^16.8.1",
"stylelint-config-xo": "^1.0.2",
"stylelint": "^16.9.0",
"stylelint-config-standard": "^36.0.1",
"type-fest": "^4.24.0",
"typed-query-selector": "^2.11.4",
"typescript": "^5.5.4",
Expand Down
1 change: 0 additions & 1 deletion source/features/clean-conversations.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
Test URLs:
- Issues: https://github.com/refined-github/sandbox/issues/3
- PRs: https://github.com/refined-github/sandbox/pull/4
- Discussions: https://github.com/vercel/vercel/discussions/3874
Expand Down
2 changes: 2 additions & 0 deletions source/features/clean-notifications.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
.js-notifications-group [id^='notification'] {
flex-direction: row !important;
}

/* Hide duplicate repository URL */
.js-notifications-group [id^='notification'] > .d-flex > .f6 {
font-size: 0 !important;
}

/* Size and position the conversation number */
.js-notifications-group [id^='notification'] > .d-flex > .f6 > span {
display: block;
Expand Down
2 changes: 1 addition & 1 deletion source/features/clean-pinned-issues.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
margin-inline: 0 !important;
}

@media (min-width: 700px) {
@media (width >= 700px) {
[rgh-clean-pinned-issues] .js-pinned-issues-reorder-list {
display: table !important;
width: 100%;
Expand Down
2 changes: 1 addition & 1 deletion source/features/clean-repo-sidebar.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
margin-top: 0 !important;
}

@media (min-width: 768px) {
@media (width >= 768px) {
/* Hide "Releases" header */
[rgh-clean-repo-sidebar] .Layout-sidebar h2 [href$='/releases'] {
display: none;
Expand Down
1 change: 1 addition & 0 deletions source/features/conversation-activity-filter.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
.rgh-conversation-activity-filter-dropdown
.octicon-eye-closed {
display: none !important;

/* For debugging purposes only */
/* display: block !important; */
/* outline: solid 5px #f00; */
Expand Down
2 changes: 1 addition & 1 deletion source/features/mobile-tabs.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@media (max-width: 767px) {
@media (width <= 767px) {
[rgh-mobile-tabs]:root .AppHeader-localBar {
padding: 0;
}
Expand Down
2 changes: 2 additions & 0 deletions source/features/no-unnecessary-split-diff-view.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
:has([data-split-side='left']:is(.blob-code-addition, .blob-code-deletion))
) {
--rgh-only-additions: none;

table-layout: auto !important;
}

Expand All @@ -13,6 +14,7 @@
:has([data-split-side='right']:is(.blob-code-addition, .blob-code-deletion))
) {
--rgh-only-deletions: none;

table-layout: auto !important;
}

Expand Down
1 change: 1 addition & 0 deletions source/features/quick-mention.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
top: 100%;
left: 50%;
translate: -50%;

/* Centers and improves clickable area; !important required to override .btn-link */
padding: 4px 12px !important;
}
Expand Down
1 change: 1 addition & 0 deletions source/features/reactions-avatars.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
:root .rgh-reactions-avatar {
--size: 16px;

margin-left: calc(var(--size) * 0.3); /* Move away from count */
margin-right: calc(var(--size) * -0.5);
height: var(--size);
Expand Down
2 changes: 1 addition & 1 deletion source/features/rgh-welcome-issue.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
display: none !important;
}

@media (min-width: 768px) {
@media (width >= 768px) {
[data-url^='/refined-github/refined-github/issues/3543/show_partial']
.gh-header-title
.js-issue-title {
Expand Down
2 changes: 1 addition & 1 deletion source/features/select-notifications.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* Only when the menu is shown as a dropdown, not as a modal (mobile) #5796 */
/* The media query matches the native one exactly, inverted via `not` */
@media screen and not (max-width: 543px) {
@media screen and not (width <= 543px) {
.js-notifications-mark-selected-actions > *,
.rgh-open-selected-button {
/* Allow clicking on "Done" and other toolbar buttons even when the dropdown (z-index of 99) is open #4753 */
Expand Down
1 change: 1 addition & 0 deletions source/features/show-whitespace.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
[data-rgh-whitespace='tab'] {
background-image: url('data:image/svg+xml,%3Csvg preserveAspectRatio="xMinYMid meet" viewBox="0 0 12 24" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M9.5 10.44L6.62 8.12L7.32 7.26L12.04 11V11.44L7.28 14.9L6.62 13.9L9.48 11.78H0V10.44H9.5Z" fill="rgba(128, 128, 128, 50%25)"/%3E%3C/svg%3E');
background-size: calc(var(--tab-size) * 1ch) 1.25em;

/* 2px because of #4991 */
background-position: 2px center;
}
Expand Down
3 changes: 2 additions & 1 deletion source/features/sticky-notifications-actions.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
@media (min-height: 500px) {
@media (height >= 500px) {
.Box:has(.js-notifications-mark-all-prompt) {
--sticky-padding: 10px;

& .Box-header {
position: sticky;
top: var(--sticky-padding);
z-index: 10;

/* Cover up the content seen through the rounded corners above */
box-shadow: 0
calc((var(--sticky-padding) + var(--borderRadius-medium)) * -1) 0 0
Expand Down
1 change: 1 addition & 0 deletions source/features/tab-size.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ There’s also one place where GitHub incorrectly uses the "user configuration"
:root,
.comment-body .tab-size[data-tab-size='8'] {
--tab-size: 4;

tab-size: var(--tab-size);
}

Expand Down
2 changes: 1 addition & 1 deletion source/features/table-input.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
border-radius: 2px;
}

@media screen and (min-width: 768px) {
@media screen and (width >= 768px) {
:root {
/* #6511 */
--rgh-table-input-size: 20px;
Expand Down
Loading

0 comments on commit 62624fa

Please sign in to comment.