@primer/stylelint-config 12.7.1-rc.bf11919 → 12.7.1-rc.d8a889b

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
@@ -12,6 +12,8 @@
12
12
 
13
13
  - [#322](https://github.com/primer/stylelint-config/pull/322) [`726d7d1`](https://github.com/primer/stylelint-config/commit/726d7d1bf4eac82a032c448cb0be32d5bf66b29a) Thanks [@jonrohan](https://github.com/jonrohan)! - Updating no-deprecated-colors for primitives v8
14
14
 
15
+ - [#334](https://github.com/primer/stylelint-config/pull/334) [`b14c154`](https://github.com/primer/stylelint-config/commit/b14c154174ddd7190e62fe1d26698fc9cfe75c17) Thanks [@langermank](https://github.com/langermank)! - More tests for `no-deprecated-colors`
16
+
15
17
  ## 12.7.0
16
18
 
17
19
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primer/stylelint-config",
3
- "version": "12.7.1-rc.bf11919",
3
+ "version": "12.7.1-rc.d8a889b",
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,7 +44,7 @@
44
44
  "@primer/css": "^20.0.0",
45
45
  "@primer/primitives": "^7.8.3",
46
46
  "dedent": "0.7.0",
47
- "eslint": "8.22.0",
47
+ "eslint": "8.39.0",
48
48
  "eslint-plugin-github": "4.3.5",
49
49
  "eslint-plugin-jest": "27.0.1",
50
50
  "eslint-plugin-prettier": "4.2.1",
@@ -727,7 +727,12 @@
727
727
  "replacement": "--control-checked-fgColor-disabled"
728
728
  }
729
729
  ],
730
- "--color-switch-track-checked-border": [],
730
+ "--color-switch-track-checked-border": [
731
+ {
732
+ "props": ["border"],
733
+ "replacement": "transparent"
734
+ }
735
+ ],
731
736
  "--color-switch-knob-bg": [
732
737
  {
733
738
  "props": ["background"],
@@ -806,7 +811,12 @@
806
811
  "replacement": "--treeViewItem-leadingVisual-bgColor-rest"
807
812
  }
808
813
  ],
809
- "--color-canvas-default-transparent": [],
814
+ "--color-canvas-default-transparent": [
815
+ {
816
+ "props": ["background"],
817
+ "replacement": "transparent"
818
+ }
819
+ ],
810
820
  "--color-fg-default": [
811
821
  {
812
822
  "props": ["color", "fill"],
@@ -821,17 +831,25 @@
821
831
  {
822
832
  "props": ["color", "fill"],
823
833
  "replacement": "--fgColor-muted"
834
+ },
835
+ {
836
+ "props": ["background"],
837
+ "replacement": "--bgColor-neutral-emphasis"
824
838
  }
825
839
  ],
826
840
  "--color-fg-subtle": [
827
841
  {
828
842
  "props": ["color", "fill"],
829
843
  "replacement": "--fgColor-muted"
844
+ },
845
+ {
846
+ "props": ["border"],
847
+ "replacement": "--borderColor-neutral-emphasis"
830
848
  }
831
849
  ],
832
850
  "--color-fg-on-emphasis": [
833
851
  {
834
- "props": ["color", "fill"],
852
+ "props": ["color", "fill", "border"],
835
853
  "replacement": "--fgColor-onEmphasis"
836
854
  }
837
855
  ],
@@ -44,14 +44,11 @@ module.exports = stylelint.createPlugin(ruleName, (enabled, options = {}, contex
44
44
  }
45
45
 
46
46
  // walk these nodes
47
- if (!(node.type === 'decl' || node.type === 'atrule')) {
47
+ if (node.type !== 'decl') {
48
48
  return
49
49
  }
50
50
 
51
- for (const [, variableName] of matchAll(
52
- node.type === 'atrule' ? node.params : node.value,
53
- variableReferenceRegex
54
- )) {
51
+ for (const [, variableName] of matchAll(node.value, variableReferenceRegex)) {
55
52
  if (variableName in variableChecks) {
56
53
  let replacement = variableChecks[variableName]
57
54
  if (typeof replacement === 'object') {