Skip to content

Latest commit

Β 

History

History
413 lines (231 loc) Β· 25.1 KB

CHANGELOG.md

File metadata and controls

413 lines (231 loc) Β· 25.1 KB

Changelog

13.2.2

Patch Changes

13.2.1

Patch Changes

13.2.0

Minor Changes

Patch Changes

13.1.1

Patch Changes

  • #500 e0d5847 Thanks @jonrohan! - Removing no-unsupported-browser-features and replacing with browser-compat

13.1.0

Minor Changes

  • #491 a615645 Thanks @jonrohan! - Refactor the primer/colors variable to use primitives values match up props

Patch Changes

  • #482 b4c3fb0 Thanks @dependabot! - Bump stylelint-scss from 6.6.0 to 6.7.0 in the production-dependencies group

13.0.1

Patch Changes

13.0.0

Major Changes

  • #397 255a3c4 Thanks @jonrohan! - Removing primer/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

Minor Changes

12.9.2

Patch Changes

12.9.1

Patch Changes

12.9.0

Minor Changes

  • #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.

12.8.0

Minor Changes

Patch Changes

12.7.2

Patch Changes

12.7.1

Patch Changes

12.7.0

Minor Changes

  • #294 8bdb1d0 Thanks @keithamus! - allow for vars defined in scope, or within :root/:host selectors in file

12.6.1

Patch Changes

12.6.0

Minor Changes

12.5.0

Minor Changes

  • #262 28a4086 Thanks @jonrohan! - Writing a primer/utilities plugin to look for code that duplicates utilities

12.4.2

Patch Changes

12.4.1

Patch Changes

12.4.0

Minor Changes

  • #232 27ddfc9 Thanks @jonrohan! - Creating a responsive-widths plugin to keep fixed widths smaller than the minimum viewport size

12.3.3

Patch Changes

12.3.2

Patch Changes

12.3.1

Patch Changes

  • #213 2a27f86 Thanks @jonrohan! - Fixing an issue where the new spacing plugin isn't traversing child sectors.

12.3.0

Minor Changes

12.2.0

Minor Changes

Patch Changes

12.1.1

Patch Changes

12.1.0

Minor Changes

Patch Changes

12.0.1

Patch Changes

12.0.0

Major Changes

  • #129 653d596 Thanks @jonrohan! - Renaming the package to use org scope. This is a breaking change, you'll need to uninstall stylelint-config-primer and reinstall @primer/stylelint-config.

Patch Changes

11.1.1

Patch Changes

11.1.0

Minor Changes

  • e83f61c #99 Thanks @jonrohan! - Create a no-deprecated-colors rule that looks for deprecated css color variables from primer/primitives.

Patch Changes

  • 581f40a #105 Thanks @jonrohan! - Adding reporting to the linter to know how many variables are replaced

10.0.1

Patch Changes

  • aa76171 #90 Thanks @jonrohan! - Updating the no-undefined-variables lint for the new color-variables mixin.

10.0.0

Major Changes

Patch Changes

9.3.3

Patch Changes

9.3.2

Patch Changes

9.3.1

Patch Changes

9.2.1

πŸ› Bug fixes

  • Fix slow runtime by caching variable definitions in primer/no-undefined-vars rule
  • Fix duplicate errors in primer/no-undefined-vars rule

9.2.0

πŸš€ Enhancements

  • New primer/no-undefined-vars to prohibit usages of undefined CSS variables

9.1.0

πŸš€ Enhancements

  • The primer/colors, primer/borders, and primer/box-shadow rules now allow CSS color variables with the correct functional names (e.g. var(--color-text-primary)). #62

9.0.0

πŸ’₯ Breaking Change

  • primer/variables is no longer supported; please use the primer/colors, primer/borders, primer/box-shadow, primer/spacing, and primer/typography rules instead. #50

πŸš€ Enhancements

  • The new primer/colors rule enforces color variable usage in color, background-color, and fill 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 in font-family, line-height, and font-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 in primer/box-shadow to prevent multiple warnings for a single value like box-shadow: inset 0 1px $blue (before there would be 4 separate ones!).

πŸ› Bug fixes

  • Use requirePrimerFile() when loading dist/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 in primer/box-shadow to match $btn-active-shadow and $form-control-shadow
  • Allow color: inherit in primer/colors
  • Allow $em-spacer-* in padding and margin properties
  • Allow (and auto-fix!) negative spacer variables in margin properties
  • Make primer/colors smarter re: background property shorthand values (allowing positions and image url(*) values)
  • Remove 100% from allowed values for border-radius, and suggest 50% instead
  • Prohibit negative spacer values in padding properties
  • Allow $h000-size for marketing 😬

2.0.0

πŸ’₯ 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 with selector-max-id: 0
  • Replaced selector-no-type: true with selector-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 deprecated no-unsupported-browser-features rule
  • Removed: media-feature-no-missing-punctuation
  • Updated: replaced rule-nested-empty-line-before and rule-non-nested-empty-line-before with rule-empty-line-before

1.4.0

  • Updated: Development dependencies are any version *
  • Removed: selector-class-pattern from config. #11

1.3.0

  • Added: length-zero-no-unit to disallow zero values with units eg 0px

1.2.0

  • Removed: We don't need scss/at-extend-no-missing-placeholder anymore taken care of by at-rule-blacklist
  • Added: Adding selector-no-type to the rules

1.0.0

  • Creating a sharable config object