Releases: primer/stylelint-config
Releases · primer/stylelint-config
v9.1.0
v9.0.0 (October 29, 2019)
💥 Breaking Change
primer/variablesis no longer supported; please use theprimer/colors,primer/borders,primer/box-shadow,primer/spacing, andprimer/typographyrules instead. #50
🚀 Enhancements
- 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: 'stylelint-config-primer', 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!).
🐛 Bug fixes
- 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
v8.2.1
v8.2.0
🚀 Features
- The new
primer/no-unused-varsrule helps catch unused Sass variables in your project #46 - The new
primer/variablesrule helps enforce the use of specific Primer SCSS variables in a variety of known CSS properties, and can fix common problems automatically! #28
📝 Documentation
- All plugins (rules) now have public docs in plugins/README.md (as of #46)
🏠 Internal
- Resolve a security vulnerability with
npm audit fix
v8.1.0
🚀 New features
- The
primer/no-overriderule now has anignoreSelectorsoption, which takes an array of strings and/or regular expressions or a function to ignore (pass) matched selectors.
🐛 Bug fixes
primer/no-overridenow really only counts class selectors as violations!
v8.0.0 (September 9, 2019)
v7.0.1 (June 20, 2019)
🐛 This patch release fixes #32 by loosening the peer dependency version specifier for @primer/css so that the config works with any version of Primer CSS after primer/css#666.
📦 We've also upgraded to jest@24.8.0 to resolve some dependency vulnerabilities.
v7.0.0
💥 Breaking changes
- The config now uses
primer/no-overrideinstead ofprimer/selector-no-utility. See #25 for more info. @primer/cssis now a required peer dependency, because we want this to work with different versions of Primer.
🚀 Features
primer/no-overrideis a new rule that replacesprimer/selector-no-utilityand makes it possible to configure files or directories with options that allow or prevent overrides of selectors from different Primer CSS "bundles". See #25 for more info.
🏠 Internal
- There are more extensive tests, additional
expect()matchers, and test utilities that make it easy to set rule options in each test.
v6.0.0 (2019-03-18)
TL;DR: this release requires @primer/css as a peer dependency. If you really don't want that, you -should be able to disable primer/selector-no-utility in your config and prevent it from being loaded.
💥 Breaking changes
- This release includes stylelint-selector-no-utility@4.0.0, which is a breaking change because it (and now, this module) requires
@primer/cssas a peer dependency so that we can pull the list of immutable utility classes from the module at runtime rather than building them at publish time.
4.0.1 - publish action
This is a maintenance release that adds the primer/publish action to automatically publish to npm when we merge to master. 🌈 🦄 🚀