@primer/stylelint-config 12.3.0-rc.7ade257 → 12.3.1-rc.cb3fa53

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 12.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#213](https://github.com/primer/stylelint-config/pull/213) [`2a27f86`](https://github.com/primer/stylelint-config/commit/2a27f86868b1f4717100a1f0897cdaefb1dd6be7) Thanks [@jonrohan](https://github.com/jonrohan)! - Fixing an issue where the new spacing plugin isn't traversing child sectors.
8
+
3
9
  ## 12.3.0
4
10
 
5
11
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primer/stylelint-config",
3
- "version": "12.3.0-rc.7ade257",
3
+ "version": "12.3.1-rc.cb3fa53",
4
4
  "description": "Sharable stylelint config used by GitHub's CSS",
5
5
  "homepage": "http://primer.style/css/tools/linting",
6
6
  "author": "GitHub, Inc.",
@@ -44,19 +44,19 @@
44
44
  },
45
45
  "devDependencies": {
46
46
  "@changesets/changelog-github": "0.4.2",
47
- "@changesets/cli": "2.19.0",
47
+ "@changesets/cli": "2.20.0",
48
48
  "@github/prettier-config": "0.0.4",
49
49
  "@primer/css": "^19.0.0",
50
50
  "@primer/primitives": "^7.0.1",
51
51
  "dedent": "0.7.0",
52
- "eslint": "8.6.0",
52
+ "eslint": "8.8.0",
53
53
  "eslint-plugin-github": "4.3.5",
54
- "eslint-plugin-jest": "25.3.0",
54
+ "eslint-plugin-jest": "26.0.0",
55
55
  "eslint-plugin-prettier": "4.0.0",
56
- "jest": "27.4.5",
56
+ "jest": "27.4.7",
57
57
  "jest-preset-stylelint": "4.2.0",
58
58
  "prettier": "2.5.1",
59
- "stylelint": "14.2.0"
59
+ "stylelint": "14.3.0"
60
60
  },
61
61
  "jest": {
62
62
  "preset": "jest-preset-stylelint",
@@ -41,7 +41,11 @@ module.exports = stylelint.createPlugin(ruleName, (enabled, options = {}, contex
41
41
  }
42
42
 
43
43
  const lintResult = (root, result) => {
44
- root.walkDecls(/^(padding|margin)/, decl => {
44
+ root.walk(decl => {
45
+ if (decl.type !== 'decl' || !decl.prop.match(/^(padding|margin)/)) {
46
+ return noop
47
+ }
48
+
45
49
  const problems = []
46
50
  let containsMath = false
47
51
  let conatinsVariable = false
@@ -53,7 +57,7 @@ module.exports = stylelint.createPlugin(ruleName, (enabled, options = {}, contex
53
57
 
54
58
  // Ignore values that are not numbers.
55
59
  if (['0', 'auto', 'inherit', 'initial'].includes(declValue.value)) {
56
- return false
60
+ return noop
57
61
  }
58
62
  // Remove leading negative sign, if any.
59
63
  const cleanDeclValue = declValue.value.replace(/^-/g, '')
@@ -65,13 +69,13 @@ module.exports = stylelint.createPlugin(ruleName, (enabled, options = {}, contex
65
69
  )
66
70
  ) {
67
71
  conatinsVariable = true
68
- return false
72
+ return noop
69
73
  }
70
74
 
71
75
  // For now we're going to ignore math.
72
76
  if (['*', '+', '-', '/'].includes(declValue.value)) {
73
77
  containsMath = true
74
- return false
78
+ return noop
75
79
  }
76
80
 
77
81
  let valueMatch = null
@@ -97,7 +101,7 @@ module.exports = stylelint.createPlugin(ruleName, (enabled, options = {}, contex
97
101
  }
98
102
 
99
103
  if (containsMath && conatinsVariable) {
100
- return false
104
+ return noop
101
105
  }
102
106
 
103
107
  if (problems.length) {