Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add stylelint-stylistic #25285

Merged
merged 2 commits into from
Jun 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 77 additions & 0 deletions .stylelintrc.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
plugins:
- stylelint-declaration-strict-value
- stylelint-stylistic

ignoreFiles:
- "**/*.go"
Expand Down Expand Up @@ -132,6 +133,82 @@ rules:
selector-type-no-unknown: [true, {ignore: [custom-elements]}]
shorthand-property-no-redundant-values: true
string-no-newline: true
stylistic/at-rule-name-case: null
stylistic/at-rule-name-newline-after: null
stylistic/at-rule-name-space-after: null
stylistic/at-rule-semicolon-newline-after: null
stylistic/at-rule-semicolon-space-before: null
stylistic/block-closing-brace-empty-line-before: null
stylistic/block-closing-brace-newline-after: null
stylistic/block-closing-brace-newline-before: null
stylistic/block-closing-brace-space-after: null
stylistic/block-closing-brace-space-before: null
stylistic/block-opening-brace-newline-after: null
stylistic/block-opening-brace-newline-before: null
stylistic/block-opening-brace-space-after: null
stylistic/block-opening-brace-space-before: null
stylistic/color-hex-case: lower
stylistic/declaration-bang-space-after: never
stylistic/declaration-bang-space-before: null
stylistic/declaration-block-semicolon-newline-after: null
stylistic/declaration-block-semicolon-newline-before: null
stylistic/declaration-block-semicolon-space-after: null
stylistic/declaration-block-semicolon-space-before: never
stylistic/declaration-block-trailing-semicolon: null
stylistic/declaration-colon-newline-after: null
stylistic/declaration-colon-space-after: null
stylistic/declaration-colon-space-before: never
stylistic/function-comma-newline-after: null
stylistic/function-comma-newline-before: null
stylistic/function-comma-space-after: null
stylistic/function-comma-space-before: null
stylistic/function-max-empty-lines: 0
stylistic/function-parentheses-newline-inside: never-multi-line
stylistic/function-parentheses-space-inside: null
stylistic/function-whitespace-after: null
stylistic/indentation: 2
stylistic/linebreaks: null
stylistic/max-empty-lines: 1
stylistic/max-line-length: null
stylistic/media-feature-colon-space-after: null
stylistic/media-feature-colon-space-before: never
stylistic/media-feature-name-case: null
stylistic/media-feature-parentheses-space-inside: null
stylistic/media-feature-range-operator-space-after: always
stylistic/media-feature-range-operator-space-before: always
stylistic/media-query-list-comma-newline-after: null
stylistic/media-query-list-comma-newline-before: null
stylistic/media-query-list-comma-space-after: null
stylistic/media-query-list-comma-space-before: null
stylistic/no-empty-first-line: null
stylistic/no-eol-whitespace: true
stylistic/no-extra-semicolons: true
stylistic/no-missing-end-of-source-newline: null
stylistic/number-leading-zero: null
stylistic/number-no-trailing-zeros: null
stylistic/property-case: lower
stylistic/selector-attribute-brackets-space-inside: null
stylistic/selector-attribute-operator-space-after: null
stylistic/selector-attribute-operator-space-before: null
stylistic/selector-combinator-space-after: null
stylistic/selector-combinator-space-before: null
stylistic/selector-descendant-combinator-no-non-space: null
stylistic/selector-list-comma-newline-after: null
stylistic/selector-list-comma-newline-before: null
stylistic/selector-list-comma-space-after: always-single-line
stylistic/selector-list-comma-space-before: never-single-line
stylistic/selector-max-empty-lines: 0
stylistic/selector-pseudo-class-case: lower
stylistic/selector-pseudo-class-parentheses-space-inside: never
stylistic/selector-pseudo-element-case: lower
stylistic/string-quotes: double
stylistic/unicode-bom: null
stylistic/unit-case: lower
stylistic/value-list-comma-newline-after: null
stylistic/value-list-comma-newline-before: null
stylistic/value-list-comma-space-after: null
stylistic/value-list-comma-space-before: null
stylistic/value-list-max-empty-lines: 0
time-min-milliseconds: null
unit-allowed-list: null
unit-disallowed-list: null
Expand Down
16 changes: 16 additions & 0 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
"postcss-html": "1.5.0",
"stylelint": "15.7.0",
"stylelint-declaration-strict-value": "1.9.2",
"stylelint-stylistic": "0.4.2",
"svgo": "3.0.2",
"updates": "14.1.1",
"vitest": "0.32.0"
Expand Down
3 changes: 1 addition & 2 deletions web_src/css/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -1573,7 +1573,7 @@ img.ui.avatar,
position: absolute;
display: block;
background: linear-gradient(to right, var(--color-header-wrapper-transparent), var(--color-header-wrapper) 100%);
content: '';
content: "";
right: 0;
height: 39px;
width: 60px;
Expand Down Expand Up @@ -2168,7 +2168,6 @@ table th[data-sortt-desc] .svg {
background: var(--color-secondary-dark-1) !important;
}


/* https://github.com/go-gitea/gitea/pull/11486 */
.ui.sub.header {
text-transform: none;
Expand Down
6 changes: 1 addition & 5 deletions web_src/css/features/imagediff.css
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,7 @@
overflow: hidden;
}

.image-diff-container
.diff-swipe
.swipe-frame
.swipe-container
.after-container {
.image-diff-container .diff-swipe .swipe-frame .swipe-container .after-container {
position: absolute;
right: 0;
}
Expand Down
1 change: 0 additions & 1 deletion web_src/css/helpers.css
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ Gitea's private styles use `g-` prefix.
text-overflow: ellipsis !important;
}


.g-table-auto-ellipsis td.auto-ellipsis {
position: relative;
}
Expand Down
1 change: 0 additions & 1 deletion web_src/css/modules/button.css
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ a.btn:hover {
background: var(--color-hover);
}


.ui.basic.buttons .button:active,
.ui.basic.button:active,
.ui.basic.buttons .active.button,
Expand Down
8 changes: 4 additions & 4 deletions web_src/css/modules/normalize.css
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,9 @@ Correct the inability to style clickable types in iOS and Safari.
*/

button,
[type='button'],
[type='reset'],
[type='submit'] {
[type="button"],
[type="reset"],
[type="submit"] {
-webkit-appearance: button;
}

Expand Down Expand Up @@ -206,7 +206,7 @@ Correct the cursor style of increment and decrement buttons in Safari.
2. Correct the outline style in Safari.
*/

[type='search'] {
[type="search"] {
-webkit-appearance: textfield; /* 1 */
outline-offset: -2px; /* 2 */
}
Expand Down
2 changes: 1 addition & 1 deletion web_src/css/modules/select.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
top: 12px;
right: 8px;
pointer-events: none;
content: '';
content: "";
width: 14px;
height: 14px;
mask-size: cover;
Expand Down
8 changes: 3 additions & 5 deletions web_src/css/repo.css
Original file line number Diff line number Diff line change
Expand Up @@ -1844,7 +1844,6 @@
border: none;
}


@media (max-width: 991.98px) {
.diff-file-box {
scroll-margin-top: 77px; /* match .repository .diff-detail-box */
Expand All @@ -1854,9 +1853,9 @@
/* TODO: this can potentially be made "global" by removing the class prefix */
.diff-file-box .ui.attached.header,
.diff-file-box .ui.attached.table {
margin: 0; /* remove fomantic negative margins */;
width: initial; /* remove fomantic over 100% width */;
max-width: initial; /* remove fomantic over 100% width */;
margin: 0; /* remove fomantic negative margins */
width: initial; /* remove fomantic over 100% width */
max-width: initial; /* remove fomantic over 100% width */
}

.repository .diff-stats {
Expand Down Expand Up @@ -1908,7 +1907,6 @@
flex: 1
}


.repository.packages .empty {
padding-top: 70px;
padding-bottom: 100px;
Expand Down
6 changes: 1 addition & 5 deletions web_src/css/review.css
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,7 @@
.comment-code-cloud .comments .comment {
display: flex;
}
.comment-code-cloud
.comments
.comment
.comment-header-right.actions
.ui.basic.label {
.comment-code-cloud .comments .comment .comment-header-right.actions .ui.basic.label {
display: none;
}
.comment-code-cloud .comments .comment .avatar {
Expand Down
2 changes: 1 addition & 1 deletion web_src/css/shared/settings.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ details.toggleable-item summary::-webkit-details-marker /* Safari */ {

details.toggleable-item summary::after {
transition: transform 0.25s ease;
content: '';
content: "";
width: 14px;
height: 14px;
mask-size: cover;
Expand Down
4 changes: 2 additions & 2 deletions web_src/css/standalone/swagger.css
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ body {
background: #1e1e1e;
}
.swagger-ui, .swagger-back-link {
filter: invert(88%) hue-rotate(180deg);
filter: invert(88%) hue-rotate(180deg);
}
.swagger-ui .microlight {
filter: invert(100%) hue-rotate(180deg);
filter: invert(100%) hue-rotate(180deg);
}
}