- #400
cbfdb60
Thanks @BPScott! - Upgrade stylelint plugins to support prettier3.x
. Drop support for prettier2.x
.
- #375
7a0dcd1
Thanks @BPScott! - Don't replacetop
/right
/bottom
/left
declarations withinset
shorthand asinset
is only supported in iOS Safari 14.5+
-
#364
2283dfe
Thanks @alexandcote! - Updating our stylelint rules to support stylelint@^15- Removing 76 rules deprecated rules.
- Enable a new
declaration-property-value-no-unknown
rule. - Only support
stylelint
>= 15
-
#364
2283dfe
Thanks @alexandcote! - Updatingstylelint-scss
to version^4.4.0
.This version support new rules:
-
#364
2283dfe
Thanks @alexandcote! - Updatepostcss
to version ^8.4.21 -
#364
2283dfe
Thanks @alexandcote! - Updating stylelint-prettier to^3.0.0
-
#364
2283dfe
Thanks @alexandcote! - Updatestylelint-order
to version^6.0.0
-
#366
33f12e4
Thanks @BPScott! - Remove a layer of indirection by specifying rules inindex.js
instead of having that import content fromconfig/*.js
- Added
postcss
as a dependency, as it is requested bypostcss-scss
. [#311]
- Updated peer dependency on
stylelint
to require at least v14.1.0. [#307] - Added override config block to parse
scss
files withpostcss-scss
. [#307] - Updated the minimum version of several stylelint plugins. [#307]
Package | Old version | New version |
---|---|---|
stylelint-config-prettier |
^8.0.1" |
^9.0.3 |
stylelint-order |
^4.0.0 |
^5.0.0 |
stylelint-prettier |
^1.2.0 |
^2.0.0 |
stylelint-scss |
^3.19.0 |
^4.0.0 |
- Removed dependency on
merge
by replacing usage with object spread. [#308]
- Enabled Stylelint
@forward
and@use
scss rules
- Update
merge
to2.1.1
. [#244]
- Remove
no-invalid-position-at-import-rule
rule as it is not in a currently released version of stylelint. [#237] - Update peer dependency to
>=13.12.0
. [#237]
- Update
stylelint
,stylelint-prettier
, andstylelint-scss
. [#224]
- Update stylelint peer dependency to
>=13.7.0"
- Projects will need to use stylelint v13.7.0 or higher
- Stylelint rules have been renamed.
*-blacklist
,*-requirelist
and*-whitelist
rules have been replaced in favour of the new*-disallowed-list
,*-required-list
and*-allowed-list
ones.
The Shopify stylelint rules have been renamed to follow the @shopify
namespace convention
Before:
module.exports = {
extends: ['@shopify/stylelint-plugin/prettier'],
rules: {
'shopify/content-no-strings': true,
},
};
After:
module.exports = {
extends: ['@shopify/stylelint-plugin/prettier'],
rules: {
'@shopify/content-no-strings': true,
},
};
- Loosen the
selector-class-pattern
rule to allow for hypens in class names. [#153]
- Bump
stylelint-config-prettier@^4.0.0
tostylelint-config-prettier@^8.0.1
- Bump
stylelint-order@^2.2.1
tostylelint-order@^4.0.0
- Bump
stylelint-scss@^3.13.0
tostylelint-scss@^3.16.0
- Bump the
stylelint
peerDependencies tostylelint@>=13.0.0
🚨Package rename
This package has been renamed from stylelint-config-shopify
to @shopify/stylelint-plugin.
. Update any configuration to use this new name.
Before:
"stylelint": {
"extends": ["stylelint-config-shopify/prettier"]
}
After:
"stylelint": {
"extends": ["@shopify/stylelint-plugin/prettier"]
}
- Add jest and bump node to 10.0.0. [[#55](Shopify/stylelint-config-shopify#55]
- Rename "rules" folder - which contains config for existing rules to be "config"; Rename "plugins" folder which contains our custom rule definitions to be "rules". This matches the layout used by eslint-plugin-shopify. [#56]
- New Rules. [#54]:
- Bump stylelint-prettier v1.1.2. [#54]
- Forbid
display: table
for better Safari + VoiceOver + iOS compatibility. [#52]
- Fixed an regression where 7.2.0 introduced the need for stylelint 9.9.0 or above. [#50]
- Allow non-lowercase values in properties such as
font
,font-family
,--anything-with-font-in-its-name
, or Sass variables starting with$polaris
or containingfont
. [#49]
- Raise
peerDependency
onstylelint
to 9.4.0 to accomodate thelinebreaks
rule. [#46] - Bump
stylelint-prettier
to v1.0.6 to fix crashes when reading unparsable files. [#48]
- Bump stylelint-prettier v1.0.3 to avoid a transitive dependency on eslint-plugin-prettier. [#45]
- Redeploy of
7.0.2
to updatelatest
version reference on npm.
- Disable
scss/no-duplicate-dollar-variables
rule by default. It makes no attempt to understand how Sass's variable scoping works which results in lots of false warnings on completely reasonable code. [#44]
- Updated stylelint-prettier to v1.0.1. [#42]
- Breaking: Updated to eslint
v5.4.0
. Consuming projects must be using node supported versions, we recommend^8.10.0
. See details on the v4 to v5 migration guide here. [#40]
- New rules:
- Update dependency: use stylelint-config-prettier v4.0.0. This is identical to v3.3.0 except it moves stylelint to be a peerDependency, which means there is less chance for installing multiple versions of stylelint.
- Changed dependency: Use
stylelint-prettier
for prettier integration instead ofprettier-stylelint-formatter
.stylelint-prettier
is a stylelint plugin that exposes prettier issues as stylelint rule violations. This means you can usestylelint --fix
to fix formatting issues that prettier raises instead of having to use different executables for showing and autofixing issues.
Migration Suggestions:
-
If
stylelint-config-shopify/prettier
is used, please removeprettier-stylelint-formatter
and update any scripts that referenced it to use runstylelint --fix '**/*.scss'
to autofix issues.yarn remove prettier-stylelint-formatter
- Changed dependency: Pull the base prettier config from stylelint-config-prettier instead of prettier-stylelint-formatter. It is provided by the prettier organisation and is more up to date than the one provided by prettier-stylelint-formatter
- Increase stylelint minimum version to 9.1.1 so it aligns with the minumum required by stylelint-config-prettier
- Added a new custom rule
shopify/content-no-strings
that disallows hard-coded strings as values for thecontent
property. This prevents internationalization issues. Keywords are still allowed. The rule is not enabled by default.
The following patterns are considered violations:
.foo::before {
content: 'bar';
}
.foo::before {
content: open-quote 'Section' counter(section_counter) close-quote;
}
The following patterns are not considered violations:
.foo::before {
content: '';
}
.foo::before {
content: open-quote counter(section_counter) close-quote;
}
- Use 5.1.1 instead.
- Updated dependency: stylelint-css (no breaking changes, only fixes)
- Updated devDependencies: eslint, eslint-plugin-shopify
- Dropped support for Node
<8.9
- Require stylelint
>=9.0
as a peerDependency for projects consuming this config #25 and #27) - Updated dependencies
- Replaces
prettier-stylelint
with a forked version addressing an issue #23
Migration Suggestions:
-
If
stylelint-config-shopify/prettier
is used, please replaceprettier-stylelint
withprettier-stylelint-formatter
.yarn remove prettier-stylelint && yarn add prettier-stylelint-formatter
declaration-block-no-redundant-longhand-properties
now allows longhandgrid
properties, see #21
- Removed
position: fixed
from the property value blacklist, see #18 - Allowed digits in class selector names (e.g.
.rotate180
), see #17 - Enforce property grouping, see #10
- Turn off
order/order
#19
tl;dr:
- Put variables & custom properties at the top (unless anyone feels strongly about this)
- Then come weird props, positioning & box model properties
- All other properties come after
- No specific property order is enforced
The following patterns are not considered warnings:
.Foo {
$foo: 'foo';
position: relative;
display: block;
margin: 10px;
color: $foo;
}
.Foo {
$foo: 'foo';
position: relative;
margin: 10px;
display: block;
color: $foo;
}
The following patterns are considered warnings:
.Foo {
position: relative;
display: block;
$foo: 'foo';
color: $foo;
}
.Foo {
$foo: 'foo';
color: $foo;
position: relative;
display: block;
}
media-feature-name-no-unknown
to ignoreprefers-reduced-motion
- stylelint-scss from
1.4.x
to^2.0.1
- Replaced deprecated
scss/at-mixin-no-argumentless-call-parentheses
rule with its equivalentscss/at-mixin-argumentless-call-parentheses
- Updated
eslint-plugin-shopify
to the latest version, and updated ESLint to the appropriate version
- Set
selector-max-type
to 1
- New plugin:
- Added
stylelint-order
which replacesdeclaration-block-properties-order
- Added
- New rules:
rule-empty-line-before
selector-max-universal
at-rule-semicolon-space-before
selector-max-attribute
selector-max-class
selector-max-combinators
selector-max-id
selector-max-type
function-url-scheme-blacklist
(disabled)media-feature-name-whitelist
(disabled)time-min-milliseconds
(disabled)
- Deprecated rules:
block-no-single-line
no-indistinguishable-colors
declaration-block-no-ignored-properties
declaration-block-properties-order
function-url-data-uris
no-browser-hacks
no-unsupported-browser-features
media-feature-no-missing-punctuation
custom-property-no-outside-root
root-no-standard-properties
rule-nested-empty-line-before
rule-non-nested-empty-line-before
- Properties order for shorthand notation with margin, padding, border styles have been updated to follow:
property: <top> <right> <bottom> <left>
- Initial release