stylelint-config-nick2bad4u 3.0.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -1
- package/dist/stylelint.config.js +32 -0
- package/package.json +24 -23
package/README.md
CHANGED
|
@@ -50,6 +50,7 @@ export default {
|
|
|
50
50
|
## What this config includes
|
|
51
51
|
|
|
52
52
|
- Standard modern Stylelint presets
|
|
53
|
+
- Unmatchable CSS selector detection via `selector-no-unmatchable`
|
|
53
54
|
- SCSS support
|
|
54
55
|
- File progress and a process-shutdown summary via
|
|
55
56
|
`stylelint-plugin-file-progress/configs/recommended`
|
|
@@ -83,9 +84,20 @@ The shared config includes overrides and parsers for:
|
|
|
83
84
|
- Package entrypoint: `dist/stylelint.config.js`
|
|
84
85
|
- Build command: `npm run build`
|
|
85
86
|
- Export style: ESM only
|
|
86
|
-
- Peer dependency: `stylelint@^17.
|
|
87
|
+
- Peer dependency: `stylelint@^17.15.0`
|
|
87
88
|
- Node.js: `>=22.12.0`
|
|
88
89
|
|
|
90
|
+
## Migrating to version 4
|
|
91
|
+
|
|
92
|
+
Version 4 enables [`selector-no-unmatchable`](https://stylelint.io/user-guide/rules/selector-no-unmatchable/)
|
|
93
|
+
and requires Stylelint 17.15.0 or newer within major 17. Upgrade Stylelint when
|
|
94
|
+
moving from version 3; the Node.js minimum remains 22.12.0.
|
|
95
|
+
|
|
96
|
+
The rule reports valid CSS selectors that cannot match anything, such as
|
|
97
|
+
`label:checked` or `::before:first-child`. Existing stylesheets may produce new
|
|
98
|
+
diagnostics. It is disabled for SCSS files because SCSS nesting behaves
|
|
99
|
+
differently from the CSS nesting semantics used by this rule.
|
|
100
|
+
|
|
89
101
|
## File progress
|
|
90
102
|
|
|
91
103
|
Version 3 enables file progress by default and requires Stylelint 17.14.0 or
|
|
@@ -98,6 +110,14 @@ The Stylelint CLI also writes diagnostics to `stderr`. For a separate JSON repor
|
|
|
98
110
|
use `stylelint "**/*.css" --formatter json --output-file stylelint-report.json`;
|
|
99
111
|
read the report file instead of combining progress and diagnostics into one pipe.
|
|
100
112
|
Progress also appears in CI and other non-interactive terminals.
|
|
113
|
+
The display matches `eslint-config-nick2bad4u`: dim activity text, a dots spinner,
|
|
114
|
+
colored relative directories, and an emphasized green filename on the next line.
|
|
115
|
+
The success message is `Linting complete!`; detailed metrics are disabled by
|
|
116
|
+
default. The shared rule explicitly sets all current display options, using
|
|
117
|
+
`pathFormat: "relative"` for the ESLint config's legacy
|
|
118
|
+
`hideDirectoryNames: false` setting. Version 3.0.1 requires progress-plugin 1.0.2
|
|
119
|
+
or newer within major 1 to include the matching terminal colors and formatting.
|
|
120
|
+
|
|
101
121
|
Counts cover observed file-processing events across the process; cached files
|
|
102
122
|
and files that fail to parse before rules execute may not appear. The summary
|
|
103
123
|
runs when the process exits, including in applications that call Stylelint
|
package/dist/stylelint.config.js
CHANGED
|
@@ -322,6 +322,8 @@ const config = {
|
|
|
322
322
|
// Selector-no-invalid is CSS-only; SCSS placeholder selectors
|
|
323
323
|
// (%name) and other SCSS-specific syntax would trigger false positives.
|
|
324
324
|
"selector-no-invalid": null,
|
|
325
|
+
// SCSS nesting can represent pseudo-elements unlike CSS nesting.
|
|
326
|
+
"selector-no-unmatchable": null,
|
|
325
327
|
},
|
|
326
328
|
},
|
|
327
329
|
],
|
|
@@ -728,6 +730,29 @@ const config = {
|
|
|
728
730
|
"defensive-css/require-scrollbar-gutter": null,
|
|
729
731
|
"defensive-css/require-system-font-fallback": null,
|
|
730
732
|
"display-notation": "short",
|
|
733
|
+
// Match the effective progress settings from eslint-config-nick2bad4u.
|
|
734
|
+
"file-progress/activate": [
|
|
735
|
+
true,
|
|
736
|
+
{
|
|
737
|
+
detailedSuccess: false,
|
|
738
|
+
failureMark: "✖",
|
|
739
|
+
fileNameOnNewLine: true,
|
|
740
|
+
hide: false,
|
|
741
|
+
hideFileName: false,
|
|
742
|
+
hidePrefix: false,
|
|
743
|
+
minFilesBeforeShow: 0,
|
|
744
|
+
mode: "file",
|
|
745
|
+
outputStream: "stderr",
|
|
746
|
+
pathFormat: "relative",
|
|
747
|
+
prefixMark: "•",
|
|
748
|
+
showSummaryWhenHidden: false,
|
|
749
|
+
spinnerStyle: "dots",
|
|
750
|
+
successMark: "✔",
|
|
751
|
+
successMessage: "Linting complete!",
|
|
752
|
+
throttleMs: 0,
|
|
753
|
+
ttyOnly: false,
|
|
754
|
+
},
|
|
755
|
+
],
|
|
731
756
|
"font-family-name-quotes": "always-where-recommended",
|
|
732
757
|
"font-family-no-duplicate-names": true,
|
|
733
758
|
"font-family-no-missing-generic-family-keyword": true,
|
|
@@ -1096,6 +1121,13 @@ const config = {
|
|
|
1096
1121
|
*/
|
|
1097
1122
|
"selector-no-invalid": true,
|
|
1098
1123
|
"selector-no-qualifying-type": null,
|
|
1124
|
+
/*
|
|
1125
|
+
* Disallow valid CSS selectors that can never match an element.
|
|
1126
|
+
* Disabled for SCSS because this rule uses CSS nesting semantics.
|
|
1127
|
+
*
|
|
1128
|
+
* @see {@link https://stylelint.io/user-guide/rules/selector-no-unmatchable | selector-no-unmatchable}
|
|
1129
|
+
*/
|
|
1130
|
+
"selector-no-unmatchable": true,
|
|
1099
1131
|
"selector-not-notation": "complex",
|
|
1100
1132
|
"selector-pseudo-class-allowed-list": null,
|
|
1101
1133
|
"selector-pseudo-class-disallowed-list": null,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://www.schemastore.org/package.json",
|
|
3
3
|
"name": "stylelint-config-nick2bad4u",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "4.0.0",
|
|
5
5
|
"private": false,
|
|
6
6
|
"description": "Shared Stylelint config for Nick2bad4u projects.",
|
|
7
7
|
"keywords": [
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
"changelog:release-notes": "git cliff --config node_modules/gitcliff-config-nick2bad4u/cliff.toml --github-repo Nick2bad4u/stylelint-config-nick2bad4u --current",
|
|
52
52
|
"clean:dist": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\"",
|
|
53
53
|
"coverage": "npx vitest run --coverage",
|
|
54
|
+
"inspector": "npx stylelint-config-inspector@latest",
|
|
54
55
|
"lint": "npx cross-env NODE_OPTIONS=--max_old_space_size=8192 npx eslint . --cache --cache-strategy content --cache-location .cache/.eslintcache",
|
|
55
56
|
"lint:all": "npm run lint && npm run typecheck && npm run test && npm run lint:remark && npm run test:stylelint-config && npm run lint:prettier && npm run lint:package-manager-version && npm run lint:package && npm run lint:yaml && npm run lint:gitleaks && npm run lint:yamllint && npm run lint:secretlint",
|
|
56
57
|
"lint:all:fix": "npm run lint:fix && npm run lint:remark:fix && npm run lint:prettier:fix && npm run sync:package-manager-version && npm run lint:package:fix && npm run typecheck && npm run test && npm run test:stylelint-config && npm run lint:yaml:fix && npm run lint:secretlint",
|
|
@@ -97,7 +98,7 @@
|
|
|
97
98
|
"verify": "npm run release:verify"
|
|
98
99
|
},
|
|
99
100
|
"dependencies": {
|
|
100
|
-
"@double-great/stylelint-a11y": "^3.5.
|
|
101
|
+
"@double-great/stylelint-a11y": "^3.5.3",
|
|
101
102
|
"@stylistic/stylelint-plugin": "^5.3.0",
|
|
102
103
|
"postcss-html": "^2.0.0",
|
|
103
104
|
"postcss-scss": "^4.0.9",
|
|
@@ -108,7 +109,7 @@
|
|
|
108
109
|
"stylelint-config-standard-scss": "^17.0.0",
|
|
109
110
|
"stylelint-config-tailwindcss": "^1.0.1",
|
|
110
111
|
"stylelint-declaration-block-no-ignored-properties": "^3.0.0",
|
|
111
|
-
"stylelint-declaration-strict-value": "^1.
|
|
112
|
+
"stylelint-declaration-strict-value": "^1.12.1",
|
|
112
113
|
"stylelint-gamut": "^2.0.1",
|
|
113
114
|
"stylelint-group-selectors": "^1.0.10",
|
|
114
115
|
"stylelint-high-performance-animation": "^2.0.0",
|
|
@@ -118,12 +119,12 @@
|
|
|
118
119
|
"stylelint-order": "^8.1.1",
|
|
119
120
|
"stylelint-plugin-container-query-sanity": "^0.1.4",
|
|
120
121
|
"stylelint-plugin-css-performance-budget": "^2.0.7",
|
|
121
|
-
"stylelint-plugin-defensive-css": "^2.9.
|
|
122
|
+
"stylelint-plugin-defensive-css": "^2.9.7",
|
|
122
123
|
"stylelint-plugin-docusaurus": "^2.0.5",
|
|
123
|
-
"stylelint-plugin-file-progress": "^1.0.
|
|
124
|
+
"stylelint-plugin-file-progress": "^1.0.2",
|
|
124
125
|
"stylelint-plugin-font": "^1.1.7",
|
|
125
126
|
"stylelint-plugin-grid": "^1.0.6",
|
|
126
|
-
"stylelint-plugin-use-baseline": "^1.4.
|
|
127
|
+
"stylelint-plugin-use-baseline": "^1.4.6",
|
|
127
128
|
"stylelint-prettier": "^5.0.3",
|
|
128
129
|
"stylelint-scales": "^5.0.0",
|
|
129
130
|
"stylelint-scss": "^7.2.0",
|
|
@@ -133,41 +134,41 @@
|
|
|
133
134
|
"devDependencies": {
|
|
134
135
|
"@arethetypeswrong/cli": "^0.18.5",
|
|
135
136
|
"@microsoft/tsdoc-config": "^0.18.1",
|
|
136
|
-
"@types/node": "^26.
|
|
137
|
-
"@vitest/coverage-v8": "^
|
|
137
|
+
"@types/node": "^26.5.0",
|
|
138
|
+
"@vitest/coverage-v8": "^5.0.0",
|
|
138
139
|
"cross-env": "^10.1.0",
|
|
139
|
-
"eslint": "^10.
|
|
140
|
-
"eslint-config-nick2bad4u": "^14.1
|
|
140
|
+
"eslint": "^10.10.0",
|
|
141
|
+
"eslint-config-nick2bad4u": "^14.2.1",
|
|
141
142
|
"git-cliff": "^2.13.1",
|
|
142
143
|
"gitcliff-config-nick2bad4u": "^1.5.0",
|
|
143
144
|
"gitleaks-config-nick2bad4u": "^1.0.5",
|
|
144
|
-
"jscpd": "^5.0
|
|
145
|
+
"jscpd": "^5.2.0",
|
|
145
146
|
"jscpd-config-nick2bad4u": "^1.1.1",
|
|
146
|
-
"lychee-config-nick2bad4u": "^3.0.
|
|
147
|
+
"lychee-config-nick2bad4u": "^3.0.2",
|
|
147
148
|
"ncu-config-nick2bad4u": "^0.2.1",
|
|
148
|
-
"npm-check-updates": "^23.0
|
|
149
|
+
"npm-check-updates": "^23.1.0",
|
|
149
150
|
"npm-package-json-lint": "^11.0.0",
|
|
150
151
|
"npm-package-json-lint-config-nick2bad4u": "^1.0.4",
|
|
151
152
|
"picocolors": "^1.1.1",
|
|
152
153
|
"prettier": "^3.9.6",
|
|
153
|
-
"prettier-config-nick2bad4u": "^2.0.
|
|
154
|
+
"prettier-config-nick2bad4u": "^2.0.4",
|
|
154
155
|
"publint": "^0.3.24",
|
|
155
156
|
"remark": "^15.0.1",
|
|
156
157
|
"remark-cli": "^12.0.1",
|
|
157
|
-
"remark-config-nick2bad4u": "^1.1.
|
|
158
|
-
"secretlint": "^13.0.
|
|
158
|
+
"remark-config-nick2bad4u": "^1.1.4",
|
|
159
|
+
"secretlint": "^13.0.5",
|
|
159
160
|
"secretlint-config-nick2bad4u": "^1.1.2",
|
|
160
161
|
"sort-package-json": "^4.0.0",
|
|
161
|
-
"stylelint": "^17.
|
|
162
|
-
"stylelint-config-inspector": "^2.3.
|
|
162
|
+
"stylelint": "^17.15.0",
|
|
163
|
+
"stylelint-config-inspector": "^2.3.7",
|
|
163
164
|
"tsdoc-config-nick2bad4u": "^1.0.6",
|
|
164
165
|
"typescript": "^6.0.3",
|
|
165
166
|
"vite": "^8.2.2",
|
|
166
|
-
"vitest": "^
|
|
167
|
+
"vitest": "^5.0.0",
|
|
167
168
|
"yamllint-config-nick2bad4u": "^1.1.1"
|
|
168
169
|
},
|
|
169
170
|
"peerDependencies": {
|
|
170
|
-
"stylelint": "^17.
|
|
171
|
+
"stylelint": "^17.15.0"
|
|
171
172
|
},
|
|
172
173
|
"peerDependenciesMeta": {
|
|
173
174
|
"stylelint": {
|
|
@@ -195,10 +196,10 @@
|
|
|
195
196
|
"registry": "https://registry.npmjs.org/"
|
|
196
197
|
},
|
|
197
198
|
"allowScripts": {
|
|
198
|
-
"fsevents@2.3.3": true,
|
|
199
|
-
"unrs-resolver@1.12.2": true,
|
|
200
199
|
"core-js": false,
|
|
201
|
-
"esbuild@0.28.2": true
|
|
200
|
+
"esbuild@0.28.2": true,
|
|
201
|
+
"fsevents@2.3.3": true,
|
|
202
|
+
"unrs-resolver@1.12.2": true
|
|
202
203
|
},
|
|
203
204
|
"readme": "README.md"
|
|
204
205
|
}
|