Skip to content

Commit 49fe24f

Browse files
authored
Merge pull request #10802 from internetarchive/prettier
Use the prettier plugin for stylelint to format css/less files
2 parents 5368547 + 9640e88 commit 49fe24f

File tree

106 files changed

+1314
-1651
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+1314
-1651
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,10 @@ repos:
9292
- id: stylelint
9393
files: \.(css|less)$
9494
additional_dependencies:
95-
- stylelint@15.10.1
96-
- stylelint-declaration-strict-value@1.9.2
97-
- postcss-less@3.1.4
95+
- stylelint@16.19.1
96+
- stylelint-declaration-strict-value@1.10.11
97+
- postcss-less@6.0.0
98+
- stylelint-prettier@5.0.3
9899
args: [--fix]
99100

100101
- repo: local

.stylelintrc.json

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"extends": ["stylelint-prettier/recommended"],
23
"customSyntax": "postcss-less",
34
"plugins": [
45
"stylelint-declaration-strict-value"
@@ -24,14 +25,8 @@
2425
"declaration-block-no-redundant-longhand-properties": true,
2526
"no-duplicate-selectors": true,
2627
"block-no-empty": true,
27-
"indentation": 2,
2828
"function-url-quotes": "never",
2929
"length-zero-no-unit": true,
30-
"max-empty-lines": 1,
31-
"no-eol-whitespace": true,
32-
"number-leading-zero": "never",
33-
"no-missing-end-of-source-newline": true,
34-
"max-line-length": 100,
3530
"shorthand-property-no-redundant-values":true,
3631
"selector-max-specificity": "1,4,0",
3732
"unit-no-unknown": true,
@@ -44,13 +39,9 @@
4439
"at-rule-no-unknown": true,
4540
"comment-no-empty": true,
4641
"no-duplicate-at-import-rules": true,
47-
"no-extra-semicolons": true,
4842
"no-empty-source": true,
4943
"font-family-no-duplicate-names": true,
5044
"font-family-no-missing-generic-family-keyword": [true, {"ignoreFontFamilies": ["!important"]}],
51-
"no-descending-specificity": true,
52-
"string-quotes": ["double", {"avoidEscape":false}],
53-
"declaration-bang-space-before": "always",
54-
"declaration-colon-space-after": "always"
45+
"no-descending-specificity": true
5546
}
5647
}

openlibrary/plugins/openlibrary/js/ile/utils/SelectionManager/SelectionManager.less

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
box-shadow: 0 0 10px 2px inset @selection-outline;
1010
}
1111
.ile-selectable {
12-
box-shadow: 0 0 0 2px inset rgba(0,0,0,.1);
13-
transition-duration: .2s;
12+
box-shadow: 0 0 0 2px inset rgba(0, 0, 0, 0.1);
13+
transition-duration: 0.2s;
1414
transition-property: background-color, box-shadow;
1515
border-radius: 4px;
1616
}
@@ -28,15 +28,15 @@
2828
background: @ile-toolbar-background;
2929
color: @ile-toolbar-text-color;
3030
z-index: @ile-toolbar-z-index;
31-
font-size: .9em;
31+
font-size: 0.9em;
3232
}
3333
#ile-toolbar a {
3434
padding: 4px 16px;
3535
display: inline-block;
3636
color: @ile-toolbar-text-color;
3737
text-decoration: none;
3838
border-left: 2px dotted @ile-toolbar-text-color;
39-
transition: background .2s;
39+
transition: background 0.2s;
4040
cursor: pointer;
4141
}
4242
#ile-selection-actions {
@@ -73,7 +73,9 @@
7373
#ile-drag-status .images li:first-child {
7474
flex-shrink: 0;
7575
}
76-
#ile-drag-actions a:hover { background: rgba(0,0,0,.15); }
76+
#ile-drag-actions a:hover {
77+
background: rgba(0, 0, 0, 0.15);
78+
}
7779

7880
a.ile-selectable[href^="/authors/OL"] {
7981
padding-right: 4px;
@@ -83,9 +85,9 @@ a.ile-selectable[href^="/authors/OL"] {
8385
.ile-select-handle {
8486
padding: 0 5px;
8587
text-decoration: none;
86-
opacity: .2;
88+
opacity: 0.2;
8789
cursor: default;
88-
transition: opacity .2s;
90+
transition: opacity 0.2s;
8991
color: @selection-outline;
9092
}
9193

0 commit comments

Comments
 (0)