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

Various stylelint updates #255

Merged
merged 5 commits into from
Dec 27, 2023
Merged
Show file tree
Hide file tree
Changes from 4 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
10 changes: 8 additions & 2 deletions library/.stylelintrc
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@
],
"string-no-newline": true,
"unit-case": "lower",
"unit-no-unknown": true,
"unit-no-unknown": null,
"unit-whitelist": [
"em",
"rem",
Expand All @@ -210,7 +210,13 @@
"vmax",
"deg",
"turn",
"fr"
"fr",
"dvh",

Choose a reason for hiding this comment

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

nice!

"dvw",
"svh",
"svw",
"lvh",
"lvw"
],
"value-list-comma-newline-after": "always-multi-line",
"value-list-comma-space-after": "always-single-line",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const {
} = require('../../machinery/ast')
const { flexChildProps, gridChildProps, flexOrGridChildProps } = require('../../machinery/css')

const intrinsicUnits = ['px', 'em', 'rem', 'vw', 'vh']
const intrinsicUnits = ['px', 'em', 'rem', 'vw', 'vh', 'dvw', 'dvh', 'svh', 'svw', 'lvh', 'lvw']
const intrinsicProps = ['width', 'height', 'max-width', 'min-width', 'max-height', 'min-height']

const allowedInRootAndChild = [
Expand All @@ -22,7 +22,7 @@ const layoutRelatedProps = [ // only allowed in child
'top', 'right', 'bottom', 'left', 'inset',
'margin', 'margin-top', 'margin-right', 'margin-bottom', 'margin-left',
'max-width', 'min-width', 'max-height', 'min-height',
'justify-self', 'align-self',
'justify-self', 'align-self', 'place-self',
...flexChildProps,
...gridChildProps,
...flexOrGridChildProps,
Expand All @@ -41,7 +41,7 @@ const messages = {
`one of \`${intrinsicUnits.join('`, `')}\` and add \`!important\``
: ''
),
'nested - only layout related props in nested': prop =>
'nested - only layout related props in nested': prop =>
`illegal non-layout related prop\n` +
`\`${prop}\` can only be used by root rules - ` +
`move to another root rule`,
Expand Down