@primer/stylelint-config 12.7.1-rc.3de7c40 → 12.7.1-rc.7ed22ed

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
@@ -6,12 +6,16 @@
6
6
 
7
7
  - [#328](https://github.com/primer/stylelint-config/pull/328) [`5ae7400`](https://github.com/primer/stylelint-config/commit/5ae7400340afc2cd21006093ce7b33206a00372e) Thanks [@langermank](https://github.com/langermank)! - Fix failing tests in no-deprecated-colors
8
8
 
9
+ - [#337](https://github.com/primer/stylelint-config/pull/337) [`6bf0fd6`](https://github.com/primer/stylelint-config/commit/6bf0fd624a69b21e48803ba62a5b2b9dc21b8d8c) Thanks [@langermank](https://github.com/langermank)! - Remove inline fallback var for no-deprecated-colors
10
+
9
11
  - [#332](https://github.com/primer/stylelint-config/pull/332) [`6485cf0`](https://github.com/primer/stylelint-config/commit/6485cf053f502d71a8ce8c407ad01a939038959c) Thanks [@langermank](https://github.com/langermank)! - Updated deprecated json color file
10
12
 
11
13
  - [#333](https://github.com/primer/stylelint-config/pull/333) [`485ce04`](https://github.com/primer/stylelint-config/commit/485ce047d75a635134919678a776ea808604cf4a) Thanks [@langermank](https://github.com/langermank)! - Adding more color replacements for deprecated colors
12
14
 
13
15
  - [#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
16
 
17
+ - [#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`
18
+
15
19
  ## 12.7.0
16
20
 
17
21
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primer/stylelint-config",
3
- "version": "12.7.1-rc.3de7c40",
3
+ "version": "12.7.1-rc.7ed22ed",
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.",
@@ -42,9 +42,9 @@
42
42
  "@changesets/cli": "2.26.1",
43
43
  "@github/prettier-config": "0.0.4",
44
44
  "@primer/css": "^20.0.0",
45
- "@primer/primitives": "^7.8.3",
45
+ "@primer/primitives": "^7.11.11",
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": "--borderColor-transparent"
734
+ }
735
+ ],
731
736
  "--color-switch-knob-bg": [
732
737
  {
733
738
  "props": ["background"],
@@ -806,7 +811,16 @@
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": "--bgColor-transparent"
818
+ },
819
+ {
820
+ "props": ["border"],
821
+ "replacement": "--borderColor-transparent"
822
+ }
823
+ ],
810
824
  "--color-fg-default": [
811
825
  {
812
826
  "props": ["color", "fill"],
@@ -821,17 +835,25 @@
821
835
  {
822
836
  "props": ["color", "fill"],
823
837
  "replacement": "--fgColor-muted"
838
+ },
839
+ {
840
+ "props": ["background"],
841
+ "replacement": "--bgColor-neutral-emphasis"
824
842
  }
825
843
  ],
826
844
  "--color-fg-subtle": [
827
845
  {
828
846
  "props": ["color", "fill"],
829
847
  "replacement": "--fgColor-muted"
848
+ },
849
+ {
850
+ "props": ["border"],
851
+ "replacement": "--borderColor-neutral-emphasis"
830
852
  }
831
853
  ],
832
854
  "--color-fg-on-emphasis": [
833
855
  {
834
- "props": ["color", "fill"],
856
+ "props": ["color", "fill", "border"],
835
857
  "replacement": "--fgColor-onEmphasis"
836
858
  }
837
859
  ],
@@ -871,7 +893,7 @@
871
893
  ],
872
894
  "--color-border-muted": [
873
895
  {
874
- "props": ["border", "background", "outline"],
896
+ "props": ["border", "background", "outline", "box-shadow"],
875
897
  "replacement": "--borderColor-muted"
876
898
  }
877
899
  ],
@@ -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') {
@@ -70,7 +67,7 @@ module.exports = stylelint.createPlugin(ruleName, (enabled, options = {}, contex
70
67
  }
71
68
 
72
69
  if (context.fix && replacement !== null) {
73
- replacement = `${replacement}, var(${variableName})`
70
+ replacement = `${replacement}`
74
71
  replacedVars[variableName] = true
75
72
  newVars[replacement] = true
76
73
  if (node.type === 'atrule') {