Help us prepare for the next major release of stylelint
See original GitHub issueWe’ve been working on a new major release of stylelint. There are quite a few changes (and a lot of refactoring). One of the biggest changes we’ve made is removing the syntax
option and no longer bundling syntaxes in stylelint itself. Users will need to extend stylelint (via shared-configs, plugins and custom syntaxes) to lint something other than vanilla CSS.
To make this easier for users to do, we’ve added two properties to the configuration object:
customSyntax
- which accepts an PostCSS syntax likepostcss-scss
overrides
- which allows users to configure stylelint to lint two or more languages, e.g. CSS and SCSS
We intend to improve the migration experience by updating our docs and by adding helpful error messages to stylelint when a user, for example, tries to lint an *.scss
file but hasn’t specified a custom syntax in their configuration object.
This last part is why we’re reaching out to you. We want to encourage users to extend a shared-config for the language they are linting, rather than add custom syntaxes and plugins themselves. We think that’ll be easier for them.
We also think emphasising the standard
configs over the recommended
ones will help users, especially new ones. Including those who use stylelint and a pretty-printer like Prettier together, as there are a number of stylistic rules in stylelint and this plugin that are complementary to Prettier, e.g. the *-empty-line-before
ones.
To help us do this, will you (or any of the other contributors to this package) be willing to?:
- Update
stylelint-config-recommended-scss
to bundlepostcss-scss
- Create and publish
stylelint-config-standard-scss
that would:- extend both
stylelint-config-standard
andstylelint-config-recommended-scss
- configure stylelint’s stylistic rules for SCSS
- turn on and configure all the stylistic rules in this plugin
- extend both
// stylelint-config-recommended-scss
module.exports = {
extends: ["stylelint-config-recommended"],
plugins: ["stylelint-scss"],
customSyntax: "postcss-scss",
rules: {
"at-rule-no-unknown": null,
"scss/at-rule-no-unknown": true,
"no-invalid-position-at-import-rule": null
}
};
// stylelint-config-standard-scss
module.exports = {
extends: [
"stylelint-config-standard",
"stylelint-config-recommended-scss"
],
rules: {
"block-closing-brace-newline-after": ["always", { "ignoreAtRules": ["else"] } ],
"scss/at-else-closing-brace-newline-after": "always-last-in-chain"
..
}
};
We’ll then update our Getting started guide and add errors messages to stylelint to encourage users to install stylelint-config-standard-scss
when linting SCSS.
We’ve seen users linting SCSS with stylelint who are unaware of this plugin and all the amazing rules within it. We hope these changes will allow more users to benefit from this plugin.
Lastly, many thanks to you (and the other contributors) for maintaining this package! It’s been fantastic to see the number of rules grow over the years.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:6
- Comments:16 (4 by maintainers)
@Moeriki Fantastic, thank you!
Yes, please. If you can add me (“jeddy3” on npm) as a maintainer on NPM, then I can grant access to @niksy and @kristerkari.
That works.
Many thanks again! There are quite a few moving pieces involved in the next release of stylelint and this will help us out a lot.
I have little memory of this 😀 I can share things.
Never done this so not sure. I see I can invite a maintainer on the npm package. Is that what you would need?
The repo itself I think I’ll archive with a link at the top of the README to a repo of yours.