Skip to content
New issue

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

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

Already on GitHub? # to your account

Tighten stylint config. #2406

Merged
merged 2 commits into from
Aug 18, 2019
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
109 changes: 108 additions & 1 deletion .stylintrc
Original file line number Diff line number Diff line change
@@ -1,10 +1,117 @@
{
"blocks": false,
"brackets": {
"expect": false,
"error": true
},
"colons": {
"expect": "never",
"error": true
},
"colors": false,
"commaSpace": {
"expect": "always",
"error": true
},
"commentSpace": {
"expect": "always",
"error": true
},
"cssLiteral": {
"expect": "never",
"error": true
},
"depthLimit": false,
"duplicates":{
"expect": true,
"error": true
},
"efficient": {
"expect": "always",
"error": true
},
"exclude": [],
"extendPref": "@extends",
"globalDupe": false,
"groupOutputByFile": true,
"indentPref": {
"expect": 2,
"error": true
}
},
"leadingZero": {
"expect": "always",
Copy link
Contributor Author

@XhmikosR XhmikosR Aug 15, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally I'd use never here, but most cases were using a leading 0 so I went with always.

"error": true
},
"maxErrors": false,
"maxWarnings": false,
"mixed": {
"expect": true,
"error": true
},
"namingConvention": {
"expect": "lowercase-dash",
"error": true
},
"namingConventionStrict": {
"expect": true,
"error": true
},
"none": {
"expect": "always",
"error": true
},
"noImportant": false,
"parenSpace": {
"expect": "never",
"error": true
},
"placeholders": {
"expect": "always",
"error": true
},
"prefixVarsWithDollar": {
"expect": "always",
"error": true
},
"quotePref": {
"expect": "single",
"error": true
},
"reporterOptions": {
"columns": [
"lineData",
"severity",
"description",
"rule"
],
"columnSplitter": " ",
"showHeaders": false,
"truncate": true
},
"semicolons": {
"expect": "never",
"error": true
},
"sortOrder": false,
"stackedProperties": {
"expect": "never",
"error": true
},
"trailingWhitespace": {
"expect": "never",
"error": true
},
"universal": {
"expect": "never",
"error": true
},
"valid": {
"expect": true,
"error": true
},
"zeroUnits": {
"expect": "never",
"error": true
},
"zIndexNormalize": false
}
2 changes: 1 addition & 1 deletion layouts/css/_base.styl
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,5 @@ blockquote
top 0
left 0
background-color rgba(0, 0, 0, 0.14)
content ""
content ''
display block
2 changes: 1 addition & 1 deletion layouts/css/layout/_lists.styl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

+ li:before
content '|'
padding 0 .3em 0 .1em
padding 0 0.3em 0 0.1em
color $light-gray

@media screen and (max-width: 480px)
Expand Down
2 changes: 1 addition & 1 deletion layouts/css/layout/_sticky-footer.styl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Modernizr test for IE10 and IE11
// see: http://thatemil.com/blog/2013/11/03/sticky-footers-flexbox-and-ie10/
.flexboxtweener
.flexboxtweener,
.flexboxtweener body
height 100%

Expand Down
2 changes: 1 addition & 1 deletion layouts/css/page-modules/_anchorLinks.styl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
.anchor
color $light-gray2
background none
padding 0 .25em
padding 0 0.25em

&:link
&:active
Expand Down
12 changes: 6 additions & 6 deletions layouts/css/page-modules/_download.styl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
.download-header::after
display block
clear both
content ""
content ''

.download-hero
margin-bottom 1em
Expand Down Expand Up @@ -99,7 +99,7 @@
height 100%
width 100%
text-align center
font-size 0.8em;
font-size 0.8em

a:hover, a:active
background $node-green
Expand Down Expand Up @@ -153,7 +153,7 @@ td.download-table-last
flex-basis 160px

.tag
font-size .6em
font-size 0.6em

.download-matrix
display block
Expand All @@ -168,13 +168,13 @@ td.download-table-last

td
display block
border 0
border none

a
text-align left

.download-table
border 0
border none

> thead
display none
Expand Down Expand Up @@ -217,4 +217,4 @@ td.download-table-last
li
font-size 1em
.tag
font-size .4em
font-size 0.4em
6 changes: 3 additions & 3 deletions layouts/css/page-modules/_header.styl
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,13 @@ header
header
li
$border-width = 14px
padding-bottom 12px;
padding-bottom 12px

&.active:after
top 100%
left 50%
border solid transparent
content " "
content ' '
height 0
width 0
position absolute
Expand Down Expand Up @@ -138,7 +138,7 @@ header

img
display block
margin .5em auto 0 auto
margin 0.5em auto 0
border none
max-height 75px
max-width 180px
4 changes: 2 additions & 2 deletions layouts/css/page-modules/_home.styl
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

.home-banner
opacity 1
transition opacity .2s ease-in-out
transition opacity 0.2s ease-in-out

&:hover
opacity 0.85
Expand All @@ -65,7 +65,7 @@
font-size 30px
font-weight 400

transition background-color .2s ease-in-out
transition background-color 0.2s ease-in-out

&:hover
background-color $node-green
Expand Down
2 changes: 1 addition & 1 deletion layouts/css/page-modules/_prev-next-navigation.styl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.btn-navigation
padding .1em .5em
padding 0.1em 0.5em

&.btn-prev
float left
Expand Down
2 changes: 2 additions & 0 deletions layouts/css/page-modules/_scrollToTop.styl
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// For smooth scroll behavior
html
// @stylint off
scroll-behavior smooth
// @stylint on

#scroll-to-top
font-size 1rem
Expand Down
4 changes: 3 additions & 1 deletion layouts/css/styles.styl
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,12 @@ a:hover .color-lightgray
border-radius 2px
margin-top 1em

// @stylint off
& *:first-child
// @stylint on
margin-top 0.5rem

html[dir="rtl"]
html[dir='rtl']
.has-side-nav
aside
float right
Expand Down