Skip to content

Commit ce26829

Browse files
authored
feat(lint): add stylelint overrides and variation files
In #2592 I completely missed there are also LESS files named with *.overrides and *.variables extensions, so these LESS files are fixed in this PR. As in #2592, only whitespaces are fixed, no functional change.
1 parent d4987bf commit ce26829

File tree

199 files changed

+18940
-19170
lines changed

Some content is hidden

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

199 files changed

+18940
-19170
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- uses: actions/setup-node@v3
1313
- name: Install dependencies
1414
run: yarn
15-
- name: Lint JS files
15+
- name: Lint JS and CSS/LESS files
1616
run: npm run lint
1717
test:
1818
name: Test build process on node ${{ matrix.node-version }}

.stylelintrc.js

Lines changed: 34 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,39 +8,52 @@ module.exports = {
88
'test/coverage/**',
99
],
1010
rules: {
11-
indentation: 4,
1211
'at-rule-empty-line-before': null,
13-
'block-closing-brace-newline-before': null,
14-
'declaration-block-trailing-semicolon': null, // bad formatting with "each()"
15-
'declaration-empty-line-before': null,
12+
'block-closing-brace-newline-before': null, // fix bad formatting with "each()"
13+
'declaration-block-trailing-semicolon': null, // fix bad formatting with "each()"
14+
indentation: null, // TODO change to "4" once https://github.com/fomantic/Fomantic-UI/pull/2593#discussion_r1045131096 is fixed
1615
'max-line-length': null,
16+
'no-descending-specificity': null,
17+
'no-extra-semicolons': null, // fix GH-1832 - workaround for wikimedia/less.php parser
1718
'rule-empty-line-before': null,
1819

1920
// TODO
20-
'no-descending-specificity': null, // 11532 errors
21-
'property-case': null, // 338 errors
22-
'string-quotes': null, // 249 errors
23-
'no-duplicate-selectors': null, // 212 errors
21+
'string-quotes': null, // 1676 errors
22+
'at-rule-no-unknown': null, // 1081 errors
23+
'property-case': null, // 866 errors
24+
'at-rule-name-case': null, // 764 errors
25+
'no-duplicate-selectors': null, // 224 errors
2426
'selector-not-notation': null, // 169 errors
2527
'no-invalid-position-at-import-rule': null, // 104 errors
26-
'at-rule-no-unknown': null, // 104 errors
27-
'import-notation': null, // 55 errors
28-
'function-no-unknown': null, // 43 errors
29-
'property-no-vendor-prefix': null, // 31 errors
28+
'function-no-unknown': null, // 67 errors
29+
'length-zero-no-unit': null, // 64 errors
30+
'import-notation': null, // 56 errors
31+
'keyframes-name-pattern': null, // 50 errors
32+
'property-no-vendor-prefix': null, // 49 errors
33+
'number-leading-zero': null, // 49 errors
34+
'color-function-notation': null, // 32 errors
35+
'alpha-value-notation': null, // 32 errors
36+
'color-hex-case': null, // 32 errors
37+
'block-no-empty': null, // 25 errors
3038
'selector-no-vendor-prefix': null, // 19 errors
31-
'number-leading-zero': null, // 19 errors
39+
'selector-class-pattern': null, // 19 errors
40+
'number-no-trailing-zeros': null, // 16 errors
41+
'font-family-name-quotes': null, // 13 errors
3242
'declaration-block-no-redundant-longhand-properties': null, // 12 errors
33-
'value-keyword-case': null, // 11 errors
43+
'value-keyword-case': null, // 12 errors
3444
'value-no-vendor-prefix': null, // 9 errors
35-
'keyframes-name-pattern': null, // 9 errors
36-
'color-function-notation': null, // 8 errors
37-
'alpha-value-notation': null, // 8 errors
45+
'color-hex-length': null, // 9 errors
46+
'no-empty-source': null, // 8 errors
47+
'font-family-no-missing-generic-family-keyword': null, // 8 errors
48+
'number-max-precision': null, // 7 errors
3849
'selector-attribute-quotes': null, // 7 errors
39-
'number-no-trailing-zeros': null, // 6 errors
4050
'shorthand-property-no-redundant-values': null, // 5 errors
51+
'function-url-quotes': null, // 5 errors
4152
'declaration-block-no-duplicate-properties': null, // 2 errors
42-
'number-max-precision': null, // 2 errors
43-
'color-hex-case': null, // 1 error
44-
'color-hex-length': null, // 1 error
53+
'font-family-no-duplicate-names': null, // 2 errors
54+
'function-linear-gradient-no-nonstandard-direction': null, // 1 error
55+
'at-rule-no-vendor-prefix': null, // 1 error
56+
'declaration-block-no-shorthand-property-overrides': null, // 1 error
4557
},
58+
reportNeedlessDisables: true,
4659
};

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
"scripts": {
2727
"build": "gulp build",
2828
"changelog": "auto-changelog -p",
29-
"lint": "eslint --ext .js . && stylelint \"**/*.{css,less}\"",
30-
"lint-fix": "eslint --ext .js . --fix && stylelint \"**/*.{css,less}\" --fix"
29+
"lint": "eslint --ext .js . && stylelint \"**/*.{css,less,overrides,variables}\"",
30+
"lint-fix": "eslint --ext .js . --fix && stylelint \"**/*.{css,less,overrides,variables}\" --fix"
3131
},
3232
"dependencies": {
3333
"@actions/core": "^1.6.0",

src/_site/collections/menu.overrides

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
/*******************************
22
Site Overrides
3-
*******************************/
3+
*******************************/

src/_site/elements/flag.variables

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
/*-------------------
1+
/* -------------------
22
Flag Variables
3-
--------------------*/
3+
-------------------- */

src/_site/globals/site.variables

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
/*******************************
22
User Global Variables
3-
*******************************/
3+
*******************************/

src/definitions/collections/breadcrumb.less

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
display: inline-block;
4444
opacity: @dividerOpacity;
4545
margin: 0 @dividerSpacing 0;
46-
4746
font-size: @dividerSize;
4847
color: @dividerColor;
4948
vertical-align: @dividerVerticalAlign;

src/definitions/collections/form.less

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,9 @@
123123
outline: none;
124124
-webkit-appearance: none;
125125
-webkit-tap-highlight-color: rgba(255, 255, 255, 0);
126-
127126
line-height: @inputLineHeight;
128127
padding: @inputPadding;
129128
font-size: @inputFontSize;
130-
131129
background: @inputBackground;
132130
border: @inputBorder;
133131
color: @inputColor;
@@ -152,7 +150,6 @@
152150
margin: 0;
153151
-webkit-appearance: none;
154152
-webkit-tap-highlight-color: rgba(255, 255, 255, 0);
155-
156153
padding: @textAreaPadding;
157154
background: @textAreaBackground;
158155
border: @textAreaBorder;
@@ -796,15 +793,12 @@
796793
content: '';
797794
top: 50%;
798795
left: 50%;
799-
800796
margin: @loaderMargin;
801797
width: @loaderSize;
802798
height: @loaderSize;
803-
804799
animation: loader @loaderSpeed infinite linear;
805800
border: @loaderLineWidth solid @loaderLineColor;
806801
border-radius: @circularRadius;
807-
808802
box-shadow: 0 0 0 1px transparent;
809803
visibility: visible;
810804
z-index: @loaderLineZIndex;
@@ -1119,10 +1113,8 @@
11191113
.ui.form .inline.field > select {
11201114
display: inline-block;
11211115
width: auto;
1122-
11231116
margin-top: 0;
11241117
margin-bottom: 0;
1125-
11261118
vertical-align: middle;
11271119
font-size: @inlineInputSize;
11281120
}

src/definitions/collections/grid.less

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@
6666
.ui.grid > .row > .column {
6767
position: relative;
6868
display: inline-block;
69-
7069
width: @oneWide;
7170
padding-left: (@gutterWidth / 2);
7271
padding-right: (@gutterWidth / 2);
@@ -1096,10 +1095,8 @@
10961095
content: "";
10971096
top: 0;
10981097
left: 0;
1099-
11001098
width: e(%("calc(100%% - %d)", @gutterWidth));
11011099
height: 1px;
1102-
11031100
margin: 0 (@gutterWidth / 2);
11041101
box-shadow: @verticallyDividedBorder;
11051102
}

src/definitions/collections/menu.less

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@
8282
-webkit-tap-highlight-color: transparent;
8383
flex: 0 0 auto;
8484
user-select: none;
85-
8685
background: @itemBackground;
8786
padding: @itemVerticalPadding @itemHorizontalPadding;
8887
text-transform: @itemTextTransform;
@@ -102,7 +101,6 @@
102101
top: 0;
103102
right: 0;
104103
height: 100%;
105-
106104
width: @dividerSize;
107105
background: @dividerBackground;
108106
}
@@ -292,6 +290,7 @@
292290
/* IE needs 0, all others support max-content to show dropdown icon inline, so keep both settings! */
293291
min-width: 0;
294292
}
293+
295294
min-width: max-content;
296295
margin: 0 0 0 @dropdownMenuDistance;
297296
box-shadow: @dropdownVerticalMenuBoxShadow;
@@ -643,7 +642,6 @@ Floated Menu / Item
643642
.ui.tabular.menu .item {
644643
background: transparent;
645644
border-bottom: none;
646-
647645
border-left: @tabularBorderWidth solid transparent;
648646
border-right: @tabularBorderWidth solid transparent;
649647
border-top: @tabularOppositeBorderWidth solid transparent;
@@ -968,7 +966,6 @@ Floated Menu / Item
968966
border-bottom-style: solid;
969967
border-radius: 0;
970968
align-self: flex-end;
971-
972969
margin: 0 0 -@secondaryPointingBorderWidth;
973970
padding: @secondaryPointingItemVerticalPadding @secondaryPointingItemHorizontalPadding;
974971
border-bottom-width: @secondaryPointingBorderWidth;
@@ -1094,7 +1091,6 @@ Floated Menu / Item
10941091
border-radius: 0;
10951092
box-shadow: none;
10961093
border: none;
1097-
10981094
margin: @textMenuMargin;
10991095
}
11001096
.ui.text.menu .item {
@@ -1596,6 +1592,7 @@ Floated Menu / Item
15961592
/* IE hack to make dropdown icons appear inline */
15971593
display: -ms-inline-flexbox !important;
15981594
}
1595+
15991596
display: inline-block;
16001597
}
16011598
}
@@ -1764,15 +1761,12 @@ Floated Menu / Item
17641761
left: 50%;
17651762
transform: translateX(-50%) translateY(-50%) rotate(45deg);
17661763
background: none;
1767-
17681764
margin: (@arrowBorderWidth / 2) 0 0;
17691765
width: @arrowSize;
17701766
height: @arrowSize;
1771-
17721767
border: none;
17731768
border-bottom: @arrowBorder;
17741769
border-right: @arrowBorder;
1775-
17761770
z-index: @arrowZIndex;
17771771
transition: @arrowTransition;
17781772
}
@@ -1783,10 +1777,8 @@ Floated Menu / Item
17831777
right: 0;
17841778
bottom: auto;
17851779
left: auto;
1786-
17871780
transform: translateX(50%) translateY(-50%) rotate(45deg);
17881781
margin: 0 -(@arrowBorderWidth / 2) 0 0;
1789-
17901782
border: none;
17911783
border-top: @arrowBorder;
17921784
border-right: @arrowBorder;

0 commit comments

Comments
 (0)