Skip to content

Commit

Permalink
fix(linter): stylelint rules
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-sokolowski committed Apr 10, 2020
1 parent 76bbe99 commit c7b26af
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 150 deletions.
18 changes: 1 addition & 17 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
module.exports = {
extends: ['stylelint-config-standard', 'stylelint-config-recommended-scss'],
plugins: ['stylelint-scss', 'stylelint-order'],
processor: ['stylelint-processor-html'],
rules: {
'no-empty-source': null,
'at-rule-name-space-after': 'always',
'at-rule-no-vendor-prefix': true,
'at-rule-semicolon-space-before': 'never',
Expand All @@ -23,29 +21,19 @@ module.exports = {
]
}
],
'block-closing-brace-empty-line-before': null,
'block-opening-brace-space-before': null,
'color-named': 'never',
'declaration-block-semicolon-newline-after': 'always-multi-line',
'declaration-block-semicolon-newline-before': 'never-multi-line',
'declaration-block-semicolon-space-after': 'always-single-line',
'declaration-empty-line-before': null,
'declaration-no-important': null,
'font-family-name-quotes': null,
'font-family-no-missing-generic-family-keyword': null,
'function-url-no-scheme-relative': true,
'function-url-quotes': 'always',
'function-name-case': null,
'length-zero-no-unit': true,
'max-empty-lines': 1,
'max-line-length': null,
'media-feature-name-no-vendor-prefix': true,
'media-feature-parentheses-space-inside': 'never',
'media-feature-range-operator-space-after': 'always',
'media-feature-range-operator-space-before': 'never',
'no-descending-specificity': null,
'no-duplicate-selectors': true,
'no-eol-whitespace': null,
'number-leading-zero': 'always',
'media-feature-name-no-unknown': [
true,
Expand Down Expand Up @@ -276,15 +264,11 @@ module.exports = {
'selector-max-compound-selectors': 6,
'selector-max-empty-lines': 1,
'selector-max-id': 2,
'selector-max-specificity': null,
'selector-max-type': 3,
'selector-max-universal': 1,
'selector-no-vendor-prefix': true,
'string-quotes': 'double',
'value-keyword-case': 'lower',
'value-list-comma-newline-after': 'never-multi-line',
'value-list-comma-newline-before': 'never-multi-line',
'value-list-comma-space-after': 'always',
'value-no-vendor-prefix': true
'value-no-vendor-prefix': true,
}
};
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@
"sass-loader": "8.0.2",
"standard-version": "7.1.0",
"stylelint": "13.3.1",
"stylelint-config-recommended-scss": "4.2.0",
"stylelint-config-standard": "20.0.0",
"stylelint-order": "4.0.0",
"stylelint-scss": "3.16.1"
},
Expand Down
36 changes: 12 additions & 24 deletions src/flags/a.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
@include flagSymbol("\e901", #fff, 32%, 23%);
}
}
// Åland Islands
&-ax {
//
}
// Albania
&-al {
background: #da291c;
Expand Down Expand Up @@ -35,9 +39,9 @@

&::after {
position: absolute;
top: 38%;
left: 48%;
font-size: $flag-size / 6;
top: 35%;
left: 55%;
font-size: $flag-size / 8;
color: #d21034;
content: "";
transform: rotate(15deg);
Expand All @@ -47,26 +51,10 @@
// American Samoa
&-as {
background:
linear-gradient(
-20deg,
#fff 31%,
transparent 15%
) 0 $flag-size / 3
linear-gradient(
-160deg,
#fff 31%,
transparent 15%
) 0 $flag-size / 3
linear-gradient(
-20deg,
#b00018 34%,
transparent 15%
) 0 $flag-size / 3
linear-gradient(
-160deg,
#b00018 34%,
transparent 15%
) 0 $flag-size / 3
linear-gradient(-20deg, #fff 31%,transparent 15%) 0 $flag-size / 3,
linear-gradient(-160deg, #fff 31%,transparent 15%) 0 $flag-size / 3,
linear-gradient(-20deg, #b00018 34%,transparent 15%) 0 $flag-size / 3,
linear-gradient(-160deg, #b00018 34%,transparent 15%) 0 $flag-size / 3,
#000053;

&::after {
Expand Down Expand Up @@ -111,7 +99,7 @@
@include threePart(#4891d9, #fff, #4891d9);

&::after {
@include flagBase64Symbol($emblem-ar, 35%, 25%, 18px, 18px);
@include flagBase64Symbol($emblem-ar, 33%, 26%, $flag-size / 3.2, $flag-size / 3.2);
}
}
// Armenia
Expand Down
83 changes: 16 additions & 67 deletions src/flags/b.scss
Original file line number Diff line number Diff line change
@@ -1,36 +1,13 @@
// Bahamas
&-bs {
background:
linear-gradient(
146deg,
#000 25%,
transparent 15%
) 0 $flag-size * 0.95
linear-gradient(
34deg,
#000 25%,
transparent 15%
) 0 $flag-size * 0.95
linear-gradient(
to bottom,
#00a9ce,
#00a9ce calc(100% / 3),
#fdda24 calc(100% / 3),
#fdda24 calc(100% / 3 * 2),
#00a9ce calc(100% / 3 * 2),
#00a9ce 100%
);
linear-gradient(146deg, #000 25%, transparent 15%) 0 $flag-size,
linear-gradient(34deg, #000 25%, transparent 15%) 0 $flag-size,
linear-gradient(to bottom, #00a9ce, #00a9ce calc(100% / 3), #fdda24 calc(100% / 3), #fdda24 calc(100% / 3 * 2), #00a9ce calc(100% / 3 * 2), #00a9ce 100%);
}
// Bahrain
&-bh {
background:
linear-gradient(
90deg,
#fff,
#fff 25%,
#ce1126 25%,
#ce1126 100%
);
background: linear-gradient(90deg, #fff, #fff 25%, #ce1126 25%, #ce1126 100%);

&::before {
position: absolute;
Expand All @@ -40,36 +17,21 @@
height: 100%;
content: "";
background:
linear-gradient(
154deg,
#fff 35%,
transparent 31%
) 0 $flag-height / 10
linear-gradient(
24deg,
#fff 35%,
transparent 31%
) 0 $flag-width / 5;
linear-gradient(154deg, #fff 35%, transparent 31% ) 0 $flag-height / 10,
linear-gradient(24deg, #fff 35%, transparent 31% ) 0 $flag-width / 5;
background-size: $flag-height / 5 $flag-height / 5;
}
}
// Bangladesh
&-bd {
background:
radial-gradient(
$flag-size / 1.75 at 40% 50%,
#f42a41,
#f42a41 35%,
transparent 35%,
transparent 100%
) #006a4e;
background: radial-gradient($flag-size / 1.75 at 40% 50%, #f42a41, #f42a41 35%, transparent 35%, transparent 100% ) #006a4e;
}
// Barbados
&-bb {
@include threePart(#012169, #ffc726, #012169, to right);

&::before {
@include flagSymbol("\e906", #000, 32%, 20%, $flag-size / 3);
@include flagSymbol("\e906", #000, 34%, 20%, $flag-size / 3);
}
}
// Belarus
Expand All @@ -86,15 +48,7 @@
}
// Belize
&-bz {
background:
linear-gradient(
to bottom,
#ce1126 15%,
#052d74 15%,
#052d74 85%,
#ce1126 85%,
#ce1126 100%
);
background: linear-gradient( to bottom, #ce1126 15%, #052d74 15%, #052d74 85%, #ce1126 85%, #ce1126 100%);
}
// Benin
&-bj {
Expand All @@ -106,12 +60,7 @@
}
// Bhutan
&-bt {
background:
linear-gradient(
146.5deg,
#ffd520 50%,
#ff4e12 50%
);
background: linear-gradient(146.5deg, #ffd520 50%, #ff4e12 50%);
}
// Bolivia
&-bo {
Expand Down Expand Up @@ -161,29 +110,29 @@
149deg,
#009b3a 30%,
transparent 25%
)
),
linear-gradient(
-149deg,
#009b3a 30%,
transparent 25%
)
),
linear-gradient(
-30deg,
#009b3a 30%,
transparent 25%
)
),
linear-gradient(
30deg,
#009b3a 30%,
transparent 25%
)
),
radial-gradient(
$flag-size / 2 at 50% 50%,
transparent 0,
transparent 35%,
#fedf00 35%,
#fedf00 100%
)
),
radial-gradient(
$flag-size at 40% 96%,
transparent 0,
Expand All @@ -192,7 +141,7 @@
#fff 39%,
transparent 39%,
transparent 100%
) #002776;
), #002776;
}
// British Indian Ocean Territory
&-io {
Expand Down
18 changes: 9 additions & 9 deletions stories/countries.const.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const COUNTRY_CODES = [
{ name: 'Benin', code: 'BJ'},
{ name: 'Bermuda', code: 'BM'},
{ name: 'Bhutan', code: 'BT'},
{ name: 'Bolivia, Plurinational State of', code: 'BO'},
{ name: 'Plurinational State of Bolivia', code: 'BO'},
{ name: 'Bonaire, Sint Eustatius and Saba', code: 'BQ'},
{ name: 'Bosnia and Herzegovina', code: 'BA'},
{ name: 'Botswana', code: 'BW'},
Expand All @@ -50,10 +50,10 @@ export const COUNTRY_CODES = [
{ name: 'Colombia', code: 'CO'},
{ name: 'Comoros', code: 'KM'},
{ name: 'Congo', code: 'CG'},
{ name: 'Congo, the Democratic Republic of the', code: 'CD'},
{ name: 'Democratic Republic of Congo', code: 'CD'},
{ name: 'Cook Islands', code: 'CK'},
{ name: 'Costa Rica', code: 'CR'},
{ name: 'Côte d`Ivoire', code: 'CI'},
{ name: 'Côte d\'Ivoire', code: 'CI'},
{ name: 'Croatia', code: 'HR'},
{ name: 'Cuba', code: 'CU'},
{ name: 'Curaçao', code: 'CW'},
Expand Down Expand Up @@ -116,11 +116,11 @@ export const COUNTRY_CODES = [
{ name: 'Kazakhstan', code: 'KZ'},
{ name: 'Kenya', code: 'KE'},
{ name: 'Kiribati', code: 'KI'},
{ name: 'Korea, Democratic People`s Republic of', code: 'KP'},
{ name: 'Democratic People\'s Republic of Korea', code: 'KP'},
{ name: 'Korea, Republic of', code: 'KR'},
{ name: 'Kuwait', code: 'KW'},
{ name: 'Kyrgyzstan', code: 'KG'},
{ name: 'Lao People`s Democratic Republic', code: 'LA'},
{ name: 'Lao People\'s Democratic Republic', code: 'LA'},
{ name: 'Latvia', code: 'LV'},
{ name: 'Lebanon', code: 'LB'},
{ name: 'Lesotho', code: 'LS'},
Expand All @@ -130,7 +130,7 @@ export const COUNTRY_CODES = [
{ name: 'Lithuania', code: 'LT'},
{ name: 'Luxembourg', code: 'LU'},
{ name: 'Macao', code: 'MO'},
{ name: 'Macedonia, the Former Yugoslav Republic of', code: 'MK'},
{ name: 'Former Yugoslav Republic of Macedonia', code: 'MK'},
{ name: 'Madagascar', code: 'MG'},
{ name: 'Malawi', code: 'MW'},
{ name: 'Malaysia', code: 'MY'},
Expand All @@ -143,7 +143,7 @@ export const COUNTRY_CODES = [
{ name: 'Mauritius', code: 'MU'},
{ name: 'Mayotte', code: 'YT'},
{ name: 'Mexico', code: 'MX'},
{ name: 'Micronesia, Federated States of', code: 'FM'},
{ name: 'Federated States of Micronesia', code: 'FM'},
{ name: 'Moldova, Republic of', code: 'MD'},
{ name: 'Monaco', code: 'MC'},
{ name: 'Mongolia', code: 'MN'},
Expand Down Expand Up @@ -239,8 +239,8 @@ export const COUNTRY_CODES = [
{ name: 'Uruguay', code: 'UY'},
{ name: 'Uzbekistan', code: 'UZ'},
{ name: 'Vanuatu', code: 'VU'},
{ name: 'Venezuela, Bolivarian Republic of', code: 'VE'},
{ name: 'Viet Nam', code: 'VN'},
{ name: 'Bolivarian Republic of Venezuela', code: 'VE'},
{ name: 'Vietnam', code: 'VN'},
{ name: 'Virgin Islands, British', code: 'VG'},
{ name: 'Virgin Islands, U.S.', code: 'VI'},
{ name: 'Wallis and Futuna', code: 'WF'},
Expand Down
Loading

0 comments on commit c7b26af

Please sign in to comment.