monday-ui-style
Advanced tools
Comparing version
{ | ||
"name": "monday-ui-style", | ||
"version": "0.21.1", | ||
"version": "0.22.0", | ||
"description": "Monday UI CSS Foundations", | ||
@@ -60,3 +60,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "f69cffddf25066f2d771ecc7679767869afb863a" | ||
"gitHead": "a920e7b58706f18e8e0182ef9fa6dea62104f6c8" | ||
} |
@@ -64,3 +64,6 @@ const { lint } = require("stylelint"); | ||
expect(firstWarning.text).toBe( | ||
`Expected \"16px\" to be \"var(--spacing-medium)\" (monday-ui-style/use-defined-css-var-when-available)` | ||
`Expected \"16px\" to be one of vars: | ||
--space-16 | ||
--spacing-medium | ||
(monday-ui-style/use-defined-css-var-when-available)` | ||
); | ||
@@ -80,3 +83,3 @@ expect(firstWarning.line).toBe(3); | ||
files: path.resolve(__dirname, "./fixtures/contains-values-with-single-replacement.scss"), | ||
config, | ||
config: configWithUseRecommendation, | ||
fix: true | ||
@@ -88,3 +91,3 @@ }); | ||
width: 16px; | ||
margin-top: var(--spacing-medium); | ||
margin-top: var(--space-16); | ||
} | ||
@@ -91,0 +94,0 @@ |
const SPACINGS = [ | ||
"--space-2", | ||
"--space-4", | ||
"--space-8", | ||
"--space-12", | ||
"--space-16", | ||
"--space-20", | ||
"--space-24", | ||
"--space-32", | ||
"--space-40", | ||
"--space-48", | ||
"--space-64", | ||
"--space-80", | ||
"--spacing-xs", | ||
@@ -145,4 +157,12 @@ "--spacing-small", | ||
const PROPS_TO_ALLOWED_VARS = { | ||
...mapPropsToAllowedVars(SPACING_PROPS, SPACINGS), | ||
...mapPropsToAllowedVars(BORDER_RADIUSES_PROPS, BORDER_RADIUSES), | ||
...mapPropsToAllowedVars(SPACING_PROPS, SPACINGS, [ | ||
"--space-4", | ||
"--space-8", | ||
"--space-16", | ||
"--space-24", | ||
"--space-32", | ||
"--space-48", | ||
"--space-64" | ||
]), | ||
...mapPropsToAllowedVars(BORDER_RADIUSES_PROPS, BORDER_RADIUSES), | ||
...mapPropsToAllowedVars(BORDER_WIDTHS_PROPS, BORDER_WIDTHS), | ||
@@ -149,0 +169,0 @@ ...mapPropsToAllowedVars(BORDER_STYLES_PROPS, BORDER_STYLES), |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
270976
0.49%2911
1.22%