stylelint-plugin-defensive-css 0.7.0 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -244,6 +244,14 @@ div {
244
244
  flex-direction: row-reverse;
245
245
  flex-wrap: wrap-reverse;
246
246
  }
247
+ div {
248
+ display: flex;
249
+ flex-flow: row wrap;
250
+ }
251
+ div {
252
+ display: flex;
253
+ flex-flow: row-reverse nowrap;
254
+ }
247
255
  ```
248
256
 
249
257
  #### ❌ Failing Examples
@@ -256,6 +264,10 @@ div {
256
264
  display: flex;
257
265
  flex-direction: row;
258
266
  }
267
+ div {
268
+ display: flex;
269
+ flex-flow: row;
270
+ }
259
271
  ```
260
272
 
261
273
  ### Scroll Chaining
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stylelint-plugin-defensive-css",
3
- "version": "0.7.0",
3
+ "version": "0.8.1",
4
4
  "description": "A Stylelint plugin to enforce defensive CSS best practices.",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -154,11 +154,19 @@ const ruleFunction = (_, options) => {
154
154
  flexWrappingProps.nodeToReport = decl;
155
155
  }
156
156
 
157
+ if (decl.prop === 'flex-flow' && decl.value.includes('column')) {
158
+ flexWrappingProps.isFlexRow = false;
159
+ flexWrappingProps.isMissingFlexWrap = false;
160
+ }
161
+
157
162
  if (decl.prop === 'flex-direction' && decl.value.includes('column')) {
158
163
  flexWrappingProps.isFlexRow = false;
159
164
  }
160
165
 
161
- if (decl.prop === 'flex-wrap') {
166
+ if (
167
+ decl.prop === 'flex-wrap' ||
168
+ (decl.prop === 'flex-flow' && decl.value.includes('wrap'))
169
+ ) {
162
170
  flexWrappingProps.isMissingFlexWrap = false;
163
171
  }
164
172