@icebreakers/stylelint-config 1.2.2 → 1.2.4
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 +1 -0
- package/README.zh.md +1 -0
- package/dist/index.cjs +11 -2
- package/dist/index.js +9 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -79,6 +79,7 @@ export default createStylelintConfig({
|
|
|
79
79
|
|
|
80
80
|
Defaults include:
|
|
81
81
|
|
|
82
|
+
- Allowing BEM/OOCSS class selectors (e.g. `block__element--modifier`, `object--state`)
|
|
82
83
|
- Allowing the `rpx` unit for mini-program compatibility
|
|
83
84
|
- Ignoring Tailwind/UnoCSS style at-rules (`apply`, `screen`, etc.)
|
|
84
85
|
- Ignoring the `page` selector used by various platforms
|
package/README.zh.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -25,8 +25,8 @@ __export(index_exports, {
|
|
|
25
25
|
});
|
|
26
26
|
module.exports = __toCommonJS(index_exports);
|
|
27
27
|
|
|
28
|
-
// ../../node_modules/.pnpm/tsup@8.5.
|
|
29
|
-
var getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.src
|
|
28
|
+
// ../../node_modules/.pnpm/tsup@8.5.1_jiti@2.6.1_postcss@8.5.6_tsx@4.21.0_typescript@5.9.3_yaml@2.8.2/node_modules/tsup/assets/cjs_shims.js
|
|
29
|
+
var getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.tagName.toUpperCase() === "SCRIPT" ? document.currentScript.src : new URL("main.js", document.baseURI).href;
|
|
30
30
|
var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
|
|
31
31
|
|
|
32
32
|
// src/config.ts
|
|
@@ -113,6 +113,7 @@ function normalizeExtends(base) {
|
|
|
113
113
|
|
|
114
114
|
// src/config.ts
|
|
115
115
|
var requireFromConfig = (0, import_node_module.createRequire)(importMetaUrl);
|
|
116
|
+
var BEM_OOCSS_CLASS_NAME_PATTERN = /^[a-z][a-z0-9]*(?:-[a-z0-9]+)*(?:__[a-z0-9]+(?:-[a-z0-9]+)*)*(?:--[a-z0-9]+(?:-[a-z0-9]+)*)*$/;
|
|
116
117
|
var PRESET_PATH_STANDARD_SCSS = requireFromConfig.resolve(PRESET_STANDARD_SCSS);
|
|
117
118
|
var PRESET_PATH_VUE_SCSS = requireFromConfig.resolve(PRESET_VUE_SCSS);
|
|
118
119
|
var PRESET_PATH_RECESS_ORDER = requireFromConfig.resolve(PRESET_RECESS_ORDER);
|
|
@@ -147,6 +148,14 @@ function resolveRules(options) {
|
|
|
147
148
|
const ignoreTypes = resolveIgnoreList("types", options?.ignores);
|
|
148
149
|
const ignoreAtRules = resolveIgnoreList("atRules", options?.ignores);
|
|
149
150
|
const rules = {
|
|
151
|
+
"function-name-case": null,
|
|
152
|
+
"selector-class-pattern": [
|
|
153
|
+
new RegExp(BEM_OOCSS_CLASS_NAME_PATTERN),
|
|
154
|
+
{
|
|
155
|
+
message: "Use BEM/OOCSS-friendly class names",
|
|
156
|
+
resolveNestedSelectors: true
|
|
157
|
+
}
|
|
158
|
+
],
|
|
150
159
|
"unit-no-unknown": [
|
|
151
160
|
true,
|
|
152
161
|
{
|
package/dist/index.js
CHANGED
|
@@ -82,6 +82,7 @@ function normalizeExtends(base) {
|
|
|
82
82
|
|
|
83
83
|
// src/config.ts
|
|
84
84
|
var requireFromConfig = createRequire(import.meta.url);
|
|
85
|
+
var BEM_OOCSS_CLASS_NAME_PATTERN = /^[a-z][a-z0-9]*(?:-[a-z0-9]+)*(?:__[a-z0-9]+(?:-[a-z0-9]+)*)*(?:--[a-z0-9]+(?:-[a-z0-9]+)*)*$/;
|
|
85
86
|
var PRESET_PATH_STANDARD_SCSS = requireFromConfig.resolve(PRESET_STANDARD_SCSS);
|
|
86
87
|
var PRESET_PATH_VUE_SCSS = requireFromConfig.resolve(PRESET_VUE_SCSS);
|
|
87
88
|
var PRESET_PATH_RECESS_ORDER = requireFromConfig.resolve(PRESET_RECESS_ORDER);
|
|
@@ -116,6 +117,14 @@ function resolveRules(options) {
|
|
|
116
117
|
const ignoreTypes = resolveIgnoreList("types", options?.ignores);
|
|
117
118
|
const ignoreAtRules = resolveIgnoreList("atRules", options?.ignores);
|
|
118
119
|
const rules = {
|
|
120
|
+
"function-name-case": null,
|
|
121
|
+
"selector-class-pattern": [
|
|
122
|
+
new RegExp(BEM_OOCSS_CLASS_NAME_PATTERN),
|
|
123
|
+
{
|
|
124
|
+
message: "Use BEM/OOCSS-friendly class names",
|
|
125
|
+
resolveNestedSelectors: true
|
|
126
|
+
}
|
|
127
|
+
],
|
|
119
128
|
"unit-no-unknown": [
|
|
120
129
|
true,
|
|
121
130
|
{
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@icebreakers/stylelint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.4",
|
|
5
5
|
"description": "Stylelint preset from Icebreaker's dev-configs",
|
|
6
6
|
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"dist"
|
|
42
42
|
],
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"comment-json": "^4.
|
|
44
|
+
"comment-json": "^4.5.0",
|
|
45
45
|
"postcss-html": "^1.8.0",
|
|
46
46
|
"stylelint-config-recess-order": "^7.4.0",
|
|
47
47
|
"stylelint-config-recommended-scss": "^16.0.2",
|