You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+83Lines changed: 83 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,89 @@ All notable changes to this project will be documented in this file.
4
4
5
5
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
- Update stylelint to v16.23.1 and up ([#41](https://github.com/torchbox/stylelint-config-torchbox/pull/41)).
12
+
- Update all config dependencies to their latest releases, compatible with stylelint v16 ([#41](https://github.com/torchbox/stylelint-config-torchbox/pull/41)).
13
+
- Change enforced rules from Stylelint and `stylelint-config-standard-scss` (see list below) ([#41](https://github.com/torchbox/stylelint-config-torchbox/pull/41)).
14
+
15
+
### BREAKING CHANGES
16
+
17
+
The configuration now mandates stylelint v16. Stylelint has stopped enforcing formatting-related rules, which are no longer relevant with the majority of projects now using Prettier for formatting. See Stylelint’s official [Migrating to 16.0.0](https://stylelint.io/migration-guide/to-16) documentation.
- Disallow leading underscore in partial names in `@import`, `@use`, `@forward`, and [`meta.load-css`](https://sass-lang.com/documentation/modules/meta/#load-css)`$url` parameter.
- Require or disallow extension in `@import`, `@use`, `@forward`, and [`meta.load-css`](https://sass-lang.com/documentation/modules/meta/#load-css) commands.
Then [configure stylelint to use this config](https://stylelint.io/user-guide/configuration/#extends). As a `stylelint.config.js` in the root of your project:
13
+
Then [configure stylelint to use this config](https://stylelint.io/user-guide/configuration/#extends). As a `stylelint.config.js`or `stylelint.config.mjs`in the root of your project:
14
14
15
15
```js
16
-
module.exports= {
16
+
/**@type{import('stylelint').Config}*/
17
+
exportdefault {
17
18
// See https://github.com/torchbox/stylelint-config-torchbox for rules.
18
19
extends:'stylelint-config-torchbox',
19
20
};
@@ -34,7 +35,8 @@ const legacyRules = {
34
35
'selector-max-specificity':null,
35
36
};
36
37
37
-
module.exports= {
38
+
/**@type{import('stylelint').Config}*/
39
+
exportdefault {
38
40
// See https://github.com/torchbox/stylelint-config-torchbox for rules.
39
41
extends:'stylelint-config-torchbox',
40
42
rules: {
@@ -48,11 +50,12 @@ module.exports = {
48
50
We recommend the following `run` script to add to your `package.json`:
- Use [`--report-needless-disables`](https://stylelint.io/user-guide/node-api/#reportneedlessdisables) flag to ensure you do not use more `stylelint-disable` comments than needed.
55
-
- Target specific folders so Stylelint doesn’t attempt to lint e.g. JS or HTML files.
56
+
- Use [`--report-needless-disables`](https://stylelint.io/user-guide/cli#--report-needless-disables---rd) to ensure you do not use more `stylelint-disable` comments than needed.
57
+
- Use [`--report-unscoped-disables`](https://stylelint.io/user-guide/cli#--report-unscoped-disables---rud) to prevent fully disabling linting.
58
+
- Target specific folders so Stylelint doesn’t attempt to lint other file types, say JS or HTML files.
Stylelint supports Vue, and our configuration is usable in `.vue` single-file components with no changes. Do make sure linting is configured to check `.vue` files:
90
93
91
-
- Wherever `stylelint` is manually invoked, make sure to point it both at stylesheets, and Vue components: `stylelint --report-needless-disables './src/sass' './src/vue_components'`.
94
+
- Wherever `stylelint` is manually invoked, make sure to point it both at stylesheets, and Vue components: `stylelint --report-needless-disables --report-unscoped-disables './src/sass' './src/vue_components'`.
92
95
- With [`stylelint-webpack-plugin`](https://webpack.js.org/plugins/stylelint-webpack-plugin/), use `extensions: ['scss', 'vue'],`.
93
96
- With [`pre-commit`](https://github.com/awebdeveloper/pre-commit-stylelint), use `files: \.(scss|vue)$`.
94
97
@@ -141,16 +144,21 @@ To get the most out of this config, it is assumed that projects have the followi
0 commit comments