- #680
b370a89Thanks @lukasoppermann! - Allow functional size tokens (e.g.--control-medium-paddingInline-condensed) in theprimer/spacingrule. Also addunsetto the list of ignored keyword values.
- #669
0f51988Thanks @lukasoppermann! - Update@primer/primitivesto v11.5.0- Add warning when using
--borderRadius-default, recommending--borderRadius-medium - Add warning when using
--borderWidth-default, recommending--borderWidth-thin - Fix box-shadow matching to normalize
0pxto0for token comparison 2.5remfont-size now auto-fixes tovar(--base-text-size-2xl)
- Add warning when using
- #656
6ea7735Thanks @copilot-swe-agent! - Update @primer/primitives to version 11.4.0
- #647
14b173dThanks @copilot-swe-agent! - Update primer/primitives to version 11.3.0
- #640
b352a6dThanks @jonrohan! - Add support for composite border variables and update variable sources
- #634
f5c6775Thanks @lukasoppermann! - Update primitives dep
- #621
125cf8cThanks @copilot-swe-agent! - The declarationValueIndex function moved from lib/utils/declarationValueIndex to lib/utils/nodeFieldIndices
- #610
baf4786Thanks @langermank! - - Remove unused motion token file- Bump
primer/primitives10.4.0
- Bump
- #600
c172b55Thanks @dependabot! - Bump the production-dependencies group across 1 directory with 2 updates
-
#580
56c028fThanks @dependabot! - Bump the production-dependencies group across 1 directory with 4 updates -
#583
2cab731Thanks @jonrohan! - Upgrade to stylelint@16.11.0 to avoid import change errors
- #526
8672c88Thanks @dependabot! - Bump the production-dependencies group across 1 directory with 2 updates
- #510
79f2330Thanks @langermank! - Updateprimer/primitivesdependency
- #520
ad6fafdThanks @iansan5653! - Remove comment-empty-line-before and order/properties-order rules
- #500
e0d5847Thanks @jonrohan! - Removing no-unsupported-browser-features and replacing with browser-compat
- #491
a615645Thanks @jonrohan! - Refactor the primer/colors variable to use primitives values match up props
- #482
b4c3fb0Thanks @dependabot! - Bump stylelint-scss from 6.6.0 to 6.7.0 in the production-dependencies group
- #479
930e5f2Thanks @jonrohan! - Stylelint fixes based on feedback:font-styleshould allow keywords,italic, normal- border should allow
nonehttps://stylelint.io/user-guide/rules/declaration-property-value-disallowed-list - Update autofix in typography to always replace with the first suggestion
-
#397
255a3c4Thanks @jonrohan! - Removingprimer/no-experimental-varsplugin from config. -
#415
86cf24fThanks @jonrohan! - Deleting primer/utilities plugin -
#401
0a7bc7eThanks @jonrohan! - BREAKING CHANGE: Removing plugins from the config.- primer/new-color-vars-have-fallback
- primer/no-deprecated-colors
- primer/no-override
- primer/no-scale-colors
- primer/no-undefined-vars
- primer/no-unused-vars
-
#397
255a3c4Thanks @jonrohan! - Upgrade to latest stylelint and make esm the default module format
-
#429
6d80a4dThanks @mperrotti! - Rewrite box-shadow lint plugin for css vars. -
#403
2c9e2deThanks @mattcosta7! - Update config to alloy nesting in css modules -
#417
3318d25Thanks @jonrohan! - Upgrade to @primer/primitives@8.2.0 -
#368
0ed9a47Thanks @jonrohan! - Change config to accept multiple file types.css, .scss, .modules.css, .tsx, .pcss -
#400
e708ed2Thanks @jonrohan! - Update primer/spacing for CSS properties -
4c22d43Thanks @jonrohan! - Updatingprimer/bordersplugin to work for new primitives and CSS vars
- #388
43b1066Thanks @langermank! - New rule: safegaurd alphadisplaycolor tokens
- #382
2cbe3beThanks @langermank! - Updatenew-color-css-varsto exclude scale colors
- #376
a31e0d3Thanks @langermank! - Adds new plugin:new-color-vars-have-fallbackto check that if new Primitive v8 colors are used, they have a fallback value.
- #353
cdb7ca9Thanks @langermank! - AddbgColor-insetfallback for Primitives v8
- #343
5b975fcThanks @langermank! - Add missing counter btn tokens to no-deprecated-colors
-
#338
7cc4c08Thanks @langermank! - Add more tests tono-deprecated-colors -
#328
5ae7400Thanks @langermank! - Fix failing tests in no-deprecated-colors -
#337
6bf0fd6Thanks @langermank! - Remove inline fallback var for no-deprecated-colors -
#332
6485cf0Thanks @langermank! - Updated deprecated json color file -
#333
485ce04Thanks @langermank! - Adding more color replacements for deprecated colors -
#340
4688bb4Thanks @langermank! - add inlineFallback prop to no-deprecated-colors -
#322
726d7d1Thanks @jonrohan! - Updating no-deprecated-colors for primitives v8 -
#334
b14c154Thanks @langermank! - More tests forno-deprecated-colors -
#339
36fade4Thanks @langermank! - Update plugins to support Primitives v8
- #294
8bdb1d0Thanks @keithamus! - allow for vars defined in scope, or within :root/:host selectors in file
- #272
9104062Thanks @langermank! - Add no-experimental-vars plugin
- #262
28a4086Thanks @jonrohan! - Writing a primer/utilities plugin to look for code that duplicates utilities
- #232
27ddfc9Thanks @jonrohan! - Creating a responsive-widths plugin to keep fixed widths smaller than the minimum viewport size
- #213
2a27f86Thanks @jonrohan! - Fixing an issue where the new spacing plugin isn't traversing child sectors.
- #170
b56fcd1Thanks @jonrohan! - Moving config from primer/css's stylelint.config.cjs file to this package.
- #170
b56fcd1Thanks @jonrohan! - Adding config from the stylelint-scss recommended config.
- #161
48c4afcThanks @dependabot! - Bump @primer/primitives from 6.1.0 to 7.0.1
- #151
d7c8b2bThanks @jonrohan! - Adding string-quotes rule to config
- #146
214362cThanks @dependabot! - Bump @primer/css from 13.2.0 to 16.3.0
- #129
653d596Thanks @jonrohan! - Renaming the package to use org scope. This is a breaking change, you'll need to uninstallstylelint-config-primerand reinstall@primer/stylelint-config.
e83f61c#99 Thanks @jonrohan! - Create ano-deprecated-colorsrule that looks for deprecated css color variables from primer/primitives.
581f40a#105 Thanks @jonrohan! - Adding reporting to the linter to know how many variables are replaced
aa76171#90 Thanks @jonrohan! - Updating the no-undefined-variables lint for the new color-variables mixin.
-
23a1f15#85 Thanks @koddsson! - Replace deprecated "blacklist" rules for "disallow list" rules.See https://stylelint.io/user-guide/rules/at-rule-blacklist and http://stylelint.io/user-guide/rules/declaration-property-value-disallowed-list/
a339c69#81 Thanks @BinaryMuse! - Update globby to v11
d18cfbf#79 Thanks @BinaryMuse! - Add additional verbose logging tono-undefined-vars
d18cfbf#79 Thanks @BinaryMuse! - Fix handling of edge-cases inno-undefined-vars
bb07673#76 Thanks @BinaryMuse! - Set the default verbose option forno-scale-colorsto false
df11e2d#74 Thanks @BinaryMuse! - Add primer/no-scale-colors to the list of exported plugins
- Fix slow runtime by caching variable definitions in
primer/no-undefined-varsrule - Fix duplicate errors in
primer/no-undefined-varsrule
- New
primer/no-undefined-varsto prohibit usages of undefined CSS variables
- The
primer/colors,primer/borders, andprimer/box-shadowrules now allow CSS color variables with the correct functional names (e.g.var(--color-text-primary)). #62
primer/variablesis no longer supported; please use theprimer/colors,primer/borders,primer/box-shadow,primer/spacing, andprimer/typographyrules instead. #50
- The new
primer/colorsrule enforces color variable usage incolor,background-color, andfillproperties - The new
primer/bordersrule enforces border variable usage in border CSS props - The new
primer/box-shadowrule enforces$box-shadow*variables - The new
primer/spacingrule enforces$spacer-*variables in margin and padding props - The new
primer/typographyrule enforces typography variable use infont-family,line-height, andfont-weightprops - Variable replacements for autofixing are automatically detected in variable data from Primer CSS (see: primer/css#949) #52
- It is now possible to define variable rules using functions that take the variables, as in:
module.exports = createVariableRule('primer/whatever', ({variables}) => { /* do something with variables here */ })
- It's also now possible to provide rule overrides in local stylelint configs as functions:
module.exports = { extends: '@primer/stylelint-config', rules: { 'primer/colors': [true, { rules: ({variables, rules}) => { /* do something with variables and/or rules here */ return rules }] } })
- This release adds support for an optional
singular: trueflag to rule configs, which skips the parsing of individual values in the matched properties. We use this inprimer/box-shadowto prevent multiple warnings for a single value likebox-shadow: inset 0 1px $blue(before there would be 4 separate ones!).
- Use
requirePrimerFile()when loadingdist/variables.jsonso that we can access the right file when running within the@primer/cssrepo. - Walk only declarations (
prop: value) in rules (blocks with selectors, not@rules), and skip linting for declarations nested in@each,@for,@function, and@mixinblocks, since those can define their own variables and we can't reliably assert their values. - Allow
$*-shadowvariable patterns inprimer/box-shadowto match$btn-active-shadowand$form-control-shadow - Allow
color: inheritinprimer/colors - Allow
$em-spacer-*inpaddingandmarginproperties - Allow (and auto-fix!) negative spacer variables in
marginproperties - Make
primer/colorssmarter re:backgroundproperty shorthand values (allowing positions and imageurl(*)values) - Remove
100%from allowed values forborder-radius, and suggest50%instead - Prohibit negative spacer values in
paddingproperties - Allow
$h000-sizefor marketing π¬
π₯ The following updates are breaking changes, since code that disables the deprecated rule will now produce linting errors. Please update your stylelint-disable statements accordingly.
- Replaced
selector-no-id: truewithselector-max-id: 0 - Replaced
selector-no-type: truewithselector-max-type: 0
The rest of the changes should not introduce new linting errors:
- Updated: moved browserslist spec to
package.json - Updated: using the
no-unsupported-browser-featuresplugin instead of the deprecatedno-unsupported-browser-featuresrule - Removed:
media-feature-no-missing-punctuation - Updated: replaced
rule-nested-empty-line-beforeandrule-non-nested-empty-line-beforewithrule-empty-line-before
- Updated: Development dependencies are any version
* - Removed:
selector-class-patternfrom config. #11
- Added:
length-zero-no-unitto disallow zero values with units eg0px
- Removed: We don't need
scss/at-extend-no-missing-placeholderanymore taken care of byat-rule-blacklist - Added: Adding
selector-no-typeto the rules
- Creating a sharable config object