- #526
8672c88
Thanks @dependabot! - Bump the production-dependencies group across 1 directory with 2 updates
- #510
79f2330
Thanks @langermank! - Updateprimer/primitives
dependency
- #520
ad6fafd
Thanks @iansan5653! - Remove comment-empty-line-before and order/properties-order rules
- #500
e0d5847
Thanks @jonrohan! - Removing no-unsupported-browser-features and replacing with browser-compat
- #491
a615645
Thanks @jonrohan! - Refactor the primer/colors variable to use primitives values match up props
- #482
b4c3fb0
Thanks @dependabot! - Bump stylelint-scss from 6.6.0 to 6.7.0 in the production-dependencies group
-
#479
930e5f2
Thanks @jonrohan! - Stylelint fixes based on feedback:font-style
should allow keywords,italic, normal
- border should allow
none
https://stylelint.io/user-guide/rules/declaration-property-value-disallowed-list - Update autofix in typography to always replace with the first suggestion
-
#397
255a3c4
Thanks @jonrohan! - Removingprimer/no-experimental-vars
plugin from config. -
#415
86cf24f
Thanks @jonrohan! - Deleting primer/utilities plugin -
#401
0a7bc7e
Thanks @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
255a3c4
Thanks @jonrohan! - Upgrade to latest stylelint and make esm the default module format
-
#429
6d80a4d
Thanks @mperrotti! - Rewrite box-shadow lint plugin for css vars. -
#403
2c9e2de
Thanks @mattcosta7! - Update config to alloy nesting in css modules -
#417
3318d25
Thanks @jonrohan! - Upgrade to @primer/[email protected] -
#368
0ed9a47
Thanks @jonrohan! - Change config to accept multiple file types.css, .scss, .modules.css, .tsx, .pcss
-
#400
e708ed2
Thanks @jonrohan! - Update primer/spacing for CSS properties -
4c22d43
Thanks @jonrohan! - Updatingprimer/borders
plugin to work for new primitives and CSS vars
- #388
43b1066
Thanks @langermank! - New rule: safegaurd alphadisplay
color tokens
- #382
2cbe3be
Thanks @langermank! - Updatenew-color-css-vars
to exclude scale colors
- #376
a31e0d3
Thanks @langermank! - Adds new plugin:new-color-vars-have-fallback
to check that if new Primitive v8 colors are used, they have a fallback value.
- #353
cdb7ca9
Thanks @langermank! - AddbgColor-inset
fallback for Primitives v8
- #343
5b975fc
Thanks @langermank! - Add missing counter btn tokens to no-deprecated-colors
-
#338
7cc4c08
Thanks @langermank! - Add more tests tono-deprecated-colors
-
#328
5ae7400
Thanks @langermank! - Fix failing tests in no-deprecated-colors -
#337
6bf0fd6
Thanks @langermank! - Remove inline fallback var for no-deprecated-colors -
#332
6485cf0
Thanks @langermank! - Updated deprecated json color file -
#333
485ce04
Thanks @langermank! - Adding more color replacements for deprecated colors -
#340
4688bb4
Thanks @langermank! - add inlineFallback prop to no-deprecated-colors -
#322
726d7d1
Thanks @jonrohan! - Updating no-deprecated-colors for primitives v8 -
#334
b14c154
Thanks @langermank! - More tests forno-deprecated-colors
-
#339
36fade4
Thanks @langermank! - Update plugins to support Primitives v8
- #294
8bdb1d0
Thanks @keithamus! - allow for vars defined in scope, or within :root/:host selectors in file
- #272
9104062
Thanks @langermank! - Add no-experimental-vars plugin
- #262
28a4086
Thanks @jonrohan! - Writing a primer/utilities plugin to look for code that duplicates utilities
- #232
27ddfc9
Thanks @jonrohan! - Creating a responsive-widths plugin to keep fixed widths smaller than the minimum viewport size
- #213
2a27f86
Thanks @jonrohan! - Fixing an issue where the new spacing plugin isn't traversing child sectors.
- #170
b56fcd1
Thanks @jonrohan! - Moving config from primer/css's stylelint.config.cjs file to this package.
- #170
b56fcd1
Thanks @jonrohan! - Adding config from the stylelint-scss recommended config.
- #161
48c4afc
Thanks @dependabot! - Bump @primer/primitives from 6.1.0 to 7.0.1
- #151
d7c8b2b
Thanks @jonrohan! - Adding string-quotes rule to config
- #146
214362c
Thanks @dependabot! - Bump @primer/css from 13.2.0 to 16.3.0
- #129
653d596
Thanks @jonrohan! - Renaming the package to use org scope. This is a breaking change, you'll need to uninstallstylelint-config-primer
and reinstall@primer/stylelint-config
.
e83f61c
#99 Thanks @jonrohan! - Create ano-deprecated-colors
rule 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-colors
to 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-vars
rule - Fix duplicate errors in
primer/no-undefined-vars
rule
- New
primer/no-undefined-vars
to prohibit usages of undefined CSS variables
- The
primer/colors
,primer/borders
, andprimer/box-shadow
rules now allow CSS color variables with the correct functional names (e.g.var(--color-text-primary)
). #62
primer/variables
is no longer supported; please use theprimer/colors
,primer/borders
,primer/box-shadow
,primer/spacing
, andprimer/typography
rules instead. #50
- The new
primer/colors
rule enforces color variable usage incolor
,background-color
, andfill
properties - The new
primer/borders
rule enforces border variable usage in border CSS props - The new
primer/box-shadow
rule enforces$box-shadow*
variables - The new
primer/spacing
rule enforces$spacer-*
variables in margin and padding props - The new
primer/typography
rule enforces typography variable use infont-family
,line-height
, andfont-weight
props - 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: true
flag to rule configs, which skips the parsing of individual values in the matched properties. We use this inprimer/box-shadow
to 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.json
so that we can access the right file when running within the@primer/css
repo. - Walk only declarations (
prop: value
) in rules (blocks with selectors, not@rules
), and skip linting for declarations nested in@each
,@for
,@function
, and@mixin
blocks, since those can define their own variables and we can't reliably assert their values. - Allow
$*-shadow
variable patterns inprimer/box-shadow
to match$btn-active-shadow
and$form-control-shadow
- Allow
color: inherit
inprimer/colors
- Allow
$em-spacer-*
inpadding
andmargin
properties - Allow (and auto-fix!) negative spacer variables in
margin
properties - Make
primer/colors
smarter re:background
property shorthand values (allowing positions and imageurl(*)
values) - Remove
100%
from allowed values forborder-radius
, and suggest50%
instead - Prohibit negative spacer values in
padding
properties - Allow
$h000-size
for 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: true
withselector-max-id: 0
- Replaced
selector-no-type: true
withselector-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-features
plugin instead of the deprecatedno-unsupported-browser-features
rule - Removed:
media-feature-no-missing-punctuation
- Updated: replaced
rule-nested-empty-line-before
andrule-non-nested-empty-line-before
withrule-empty-line-before
- Updated: Development dependencies are any version
*
- Removed:
selector-class-pattern
from config. #11
- Added:
length-zero-no-unit
to disallow zero values with units eg0px
- Removed: We don't need
scss/at-extend-no-missing-placeholder
anymore taken care of byat-rule-blacklist
- Added: Adding
selector-no-type
to the rules
- Creating a sharable config object