@culur/config-stylelint 1.7.2 → 2.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/CHANGELOG.md +35 -0
- package/README.md +12 -1
- package/dist/{factory-B33e_UAZ.mjs → factory-CtV8XN1h.mjs} +11 -21
- package/dist/{factory-B33e_UAZ.mjs.map → factory-CtV8XN1h.mjs.map} +1 -1
- package/dist/{factory-BNS_YTTh.cjs → factory-DdLX4Vgi.cjs} +11 -21
- package/dist/{factory-BNS_YTTh.cjs.map → factory-DdLX4Vgi.cjs.map} +1 -1
- package/dist/factory.cjs +1 -1
- package/dist/factory.d.cts +1 -3
- package/dist/factory.d.mts +1 -5
- package/dist/factory.mjs +1 -2
- package/dist/shareable-configs/auto.cjs +2 -3
- package/dist/shareable-configs/auto.cjs.map +1 -1
- package/dist/shareable-configs/auto.d.cts +1 -3
- package/dist/shareable-configs/auto.d.mts +1 -4
- package/dist/shareable-configs/auto.mjs +2 -3
- package/dist/shareable-configs/none.cjs +2 -3
- package/dist/shareable-configs/none.cjs.map +1 -1
- package/dist/shareable-configs/none.d.cts +1 -3
- package/dist/shareable-configs/none.d.mts +1 -4
- package/dist/shareable-configs/none.mjs +2 -3
- package/dist/shareable-configs/sass-vue.cjs +2 -3
- package/dist/shareable-configs/sass-vue.cjs.map +1 -1
- package/dist/shareable-configs/sass-vue.d.cts +1 -3
- package/dist/shareable-configs/sass-vue.d.mts +1 -4
- package/dist/shareable-configs/sass-vue.mjs +2 -3
- package/dist/shareable-configs/sass.cjs +2 -3
- package/dist/shareable-configs/sass.cjs.map +1 -1
- package/dist/shareable-configs/sass.d.cts +1 -3
- package/dist/shareable-configs/sass.d.mts +1 -4
- package/dist/shareable-configs/sass.mjs +2 -3
- package/dist/shareable-configs/tailwind3-sass-vue.cjs +2 -3
- package/dist/shareable-configs/tailwind3-sass-vue.cjs.map +1 -1
- package/dist/shareable-configs/tailwind3-sass-vue.d.cts +1 -3
- package/dist/shareable-configs/tailwind3-sass-vue.d.mts +1 -4
- package/dist/shareable-configs/tailwind3-sass-vue.mjs +2 -3
- package/dist/shareable-configs/tailwind3-sass.cjs +2 -3
- package/dist/shareable-configs/tailwind3-sass.cjs.map +1 -1
- package/dist/shareable-configs/tailwind3-sass.d.cts +1 -3
- package/dist/shareable-configs/tailwind3-sass.d.mts +1 -4
- package/dist/shareable-configs/tailwind3-sass.mjs +2 -3
- package/dist/shareable-configs/tailwind3.cjs +2 -3
- package/dist/shareable-configs/tailwind3.cjs.map +1 -1
- package/dist/shareable-configs/tailwind3.d.cts +1 -3
- package/dist/shareable-configs/tailwind3.d.mts +1 -4
- package/dist/shareable-configs/tailwind3.mjs +2 -3
- package/dist/shareable-configs/tailwind4-vue.cjs +2 -3
- package/dist/shareable-configs/tailwind4-vue.cjs.map +1 -1
- package/dist/shareable-configs/tailwind4-vue.d.cts +1 -3
- package/dist/shareable-configs/tailwind4-vue.d.mts +1 -4
- package/dist/shareable-configs/tailwind4-vue.mjs +2 -3
- package/dist/shareable-configs/tailwind4.cjs +2 -3
- package/dist/shareable-configs/tailwind4.cjs.map +1 -1
- package/dist/shareable-configs/tailwind4.d.cts +1 -3
- package/dist/shareable-configs/tailwind4.d.mts +1 -4
- package/dist/shareable-configs/tailwind4.mjs +2 -3
- package/dist/shareable-configs/vue.cjs +2 -3
- package/dist/shareable-configs/vue.cjs.map +1 -1
- package/dist/shareable-configs/vue.d.cts +1 -3
- package/dist/shareable-configs/vue.d.mts +1 -4
- package/dist/shareable-configs/vue.mjs +2 -3
- package/package.json +25 -23
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# @culur/config-stylelint
|
|
2
2
|
|
|
3
|
+
## 2.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- 🔨 Move `stylelint-config-standard-scss`, `stylelint-scss` and `stylelint-config-standard-vue` from `dependencies` to optional `peerDependencies` ([#584](https://github.com/culur/culur/pull/584) [`8223f16`](https://github.com/culur/culur/commit/8223f16442a41ae0ae70bf66495b4a74b703ddb2)) ([@phamhongphuc](https://github.com/phamhongphuc)).
|
|
8
|
+
|
|
9
|
+
Projects that do not use SCSS or Vue no longer install these packages, and future `stylelint` majors are no longer blocked by them. SCSS and Vue projects must install them explicitly:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
# SCSS
|
|
13
|
+
pnpm install stylelint-config-standard-scss stylelint-scss --dev
|
|
14
|
+
|
|
15
|
+
# Vue
|
|
16
|
+
pnpm install stylelint-config-standard-vue --dev
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- ⚙️ Update dependencies ([#553](https://github.com/culur/culur/pull/553) [`9dba20d`](https://github.com/culur/culur/commit/9dba20d615db10d5e299c9265afd7e0566594436)) ([@renovate](https://github.com/apps/renovate)):
|
|
22
|
+
|
|
23
|
+
- `dependencies`:
|
|
24
|
+
- `stylelint-order@^8.1.2`
|
|
25
|
+
- `stylelint-scss@^7.4.0`
|
|
26
|
+
- `devDependencies`:
|
|
27
|
+
- `postcss@^8.5.32`
|
|
28
|
+
- `stylelint@^17.16.0`
|
|
29
|
+
|
|
30
|
+
- 📦 Update dependencies ([#561](https://github.com/culur/culur/pull/561) [`28ce795`](https://github.com/culur/culur/commit/28ce795df6665c31ba80b73a676761295aff9551)) ([@renovate](https://github.com/apps/renovate)):
|
|
31
|
+
|
|
32
|
+
- `dependencies`:
|
|
33
|
+
- `stylelint-order@^8.1.3`
|
|
34
|
+
|
|
35
|
+
- 📦 Update workspace dependencies:
|
|
36
|
+
- [`@culur/utils-packages@1.3.2`](https://github.com/culur/culur/tree/main/packages/utils-packages#readme)
|
|
37
|
+
|
|
3
38
|
## 1.7.2
|
|
4
39
|
|
|
5
40
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -38,7 +38,7 @@ The configuration will check if the following packages are installed and their v
|
|
|
38
38
|
- [`stylelint-scss`](https://github.com/kristerkari/stylelint-scss) - A collection of SCSS specific linting rules for stylelint.
|
|
39
39
|
- [`stylelint-selector-bem-pattern`](https://github.com/simonsmith/stylelint-selector-bem-pattern) - Stylelint plugin that incorporates postcss-bem-linter
|
|
40
40
|
- And it also has custom rules for `Tailwind`, `SCSS` and `Vue`.
|
|
41
|
-
- This config bundles the above packages, you don't need to install them yourself.
|
|
41
|
+
- This config bundles the above packages, you don't need to install them yourself, except the SCSS packages (`stylelint-config-standard-scss`, `stylelint-scss`) and the Vue package (`stylelint-config-standard-vue`), which are optional peer dependencies.
|
|
42
42
|
|
|
43
43
|
## 💿 Installation
|
|
44
44
|
|
|
@@ -58,6 +58,17 @@ yarn add @culur/config-stylelint --dev
|
|
|
58
58
|
Other packages:
|
|
59
59
|
|
|
60
60
|
- Use need to install `stylelint` package in devDependencies.
|
|
61
|
+
- For SCSS projects, also install `stylelint-config-standard-scss` and `stylelint-scss` in devDependencies:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
pnpm install stylelint-config-standard-scss stylelint-scss --dev
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
- For Vue projects, also install `stylelint-config-standard-vue` in devDependencies:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
pnpm install stylelint-config-standard-vue --dev
|
|
71
|
+
```
|
|
61
72
|
|
|
62
73
|
## 📖 Usage
|
|
63
74
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/utils/utils.ts
|
|
2
2
|
const defineRule = (rule) => rule;
|
|
3
3
|
const defineRules = (rule) => rule;
|
|
4
4
|
const mergeConfigs = (...configsOrNull) => {
|
|
@@ -18,8 +18,7 @@ const mergeConfigs = (...configsOrNull) => {
|
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
20
|
const isInRange = (version, ...versions) => typeof version === "number" && versions.includes(version);
|
|
21
|
-
|
|
22
|
-
//#region src/rules/at-rule-no-unknown.ts
|
|
21
|
+
// src/rules/at-rule-no-unknown.ts
|
|
23
22
|
const getIgnoreAtRulesByTailwindVersion = (tailwindVersion) => {
|
|
24
23
|
switch (tailwindVersion) {
|
|
25
24
|
case 0: return [
|
|
@@ -66,8 +65,7 @@ const atRuleNoUnknownSCSS = (packages) => defineRules({
|
|
|
66
65
|
"scss/at-rule-no-unknown": atRuleNoUnknownRule(packages)
|
|
67
66
|
});
|
|
68
67
|
const declarationBlockNoRedundantLonghandProperties = defineRules({ "declaration-block-no-redundant-longhand-properties": defineRule([true, { ignoreShorthands: ["grid-template"] }]) });
|
|
69
|
-
|
|
70
|
-
//#region src/rules/function-no-unknown.ts
|
|
68
|
+
// src/rules/function-no-unknown.ts
|
|
71
69
|
const getIgnoreFunctionsByTailwindVersion = (tailwindVersion) => {
|
|
72
70
|
switch (tailwindVersion) {
|
|
73
71
|
case 0: return ["config"];
|
|
@@ -92,11 +90,9 @@ function functionNoUnknownRule(packages) {
|
|
|
92
90
|
return defineRule([true, { ignoreFunctions: getIgnoreFunctions(packages) }]);
|
|
93
91
|
}
|
|
94
92
|
const functionNoUnknown = (packages) => defineRules({ "function-no-unknown": functionNoUnknownRule(packages) });
|
|
95
|
-
|
|
96
|
-
//#region src/rules/import-notation.ts
|
|
93
|
+
// src/rules/import-notation.ts
|
|
97
94
|
const importNotationCSS = (packages) => defineRules(isInRange(packages.tailwind, 4) ? { "import-notation": null } : {});
|
|
98
|
-
|
|
99
|
-
//#region src/rules/order.ts
|
|
95
|
+
// src/rules/order.ts
|
|
100
96
|
const definePrimaryOption = (...options) => options.filter((option) => !!option);
|
|
101
97
|
const blockRuleRegex = /^&::[\w-]+/;
|
|
102
98
|
const orderRule = (packages) => defineRule([definePrimaryOption(
|
|
@@ -221,8 +217,7 @@ const orderRule = (packages) => defineRule([definePrimaryOption(
|
|
|
221
217
|
), { unspecified: "bottom" }]);
|
|
222
218
|
const order = (packages) => defineRules({ "order/order": orderRule(packages) });
|
|
223
219
|
const selectorPseudoClassNoUnknown = defineRules({ "selector-pseudo-class-no-unknown": defineRule([true, { ignorePseudoClasses: ["global", "local"] }]) });
|
|
224
|
-
|
|
225
|
-
//#region src/configs/css.ts
|
|
220
|
+
// src/configs/css.ts
|
|
226
221
|
const configCss = (packages) => ({
|
|
227
222
|
extends: ["stylelint-config-standard", "stylelint-config-clean-order"],
|
|
228
223
|
plugins: ["stylelint-order", "stylelint-selector-bem-pattern"],
|
|
@@ -237,8 +232,7 @@ const configCss = (packages) => ({
|
|
|
237
232
|
}
|
|
238
233
|
});
|
|
239
234
|
const dollarVariablePatternSCSS = defineRules({ "scss/dollar-variable-pattern": defineRule(["^(-{0,2}?[a-z][a-z0-9]*)(-[a-z0-9]+)*$", { message: "Expected variable to be kebab-case" }]) });
|
|
240
|
-
|
|
241
|
-
//#region src/configs/scss.ts
|
|
235
|
+
// src/configs/scss.ts
|
|
242
236
|
const configScss = (packages) => ({
|
|
243
237
|
extends: ["stylelint-config-standard-scss"],
|
|
244
238
|
rules: {
|
|
@@ -246,19 +240,15 @@ const configScss = (packages) => ({
|
|
|
246
240
|
...dollarVariablePatternSCSS
|
|
247
241
|
}
|
|
248
242
|
});
|
|
249
|
-
|
|
250
|
-
//#region src/configs/shared.ts
|
|
243
|
+
// src/configs/shared.ts
|
|
251
244
|
const configShared = () => ({ extends: ["stylelint-config-html"] });
|
|
252
|
-
|
|
253
|
-
//#region src/configs/vue.ts
|
|
245
|
+
// src/configs/vue.ts
|
|
254
246
|
const configVue = (packages) => ({ extends: [packages.sass ? "stylelint-config-standard-vue/scss" : "stylelint-config-standard-vue"] });
|
|
255
|
-
|
|
256
|
-
//#region src/factory.ts
|
|
247
|
+
// src/factory.ts
|
|
257
248
|
function defineConfig(packages, config) {
|
|
258
249
|
const packages_ = packages ?? {};
|
|
259
250
|
return mergeConfigs(configShared(), configCss(packages_), packages_.sass && configScss(packages_), packages_.vue && configVue(packages_), config);
|
|
260
251
|
}
|
|
261
|
-
//#endregion
|
|
262
252
|
export { defineConfig as t };
|
|
263
253
|
|
|
264
|
-
//# sourceMappingURL=factory-
|
|
254
|
+
//# sourceMappingURL=factory-CtV8XN1h.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factory-B33e_UAZ.mjs","names":[],"sources":["../src/utils/utils.ts","../src/rules/at-rule-no-unknown.ts","../src/rules/declaration-block-no-redundant-longhand-properties.ts","../src/rules/function-no-unknown.ts","../src/rules/import-notation.ts","../src/rules/order.ts","../src/rules/selector-pseudo-class-no-unknown.ts","../src/configs/css.ts","../src/rules/dollar-variable-pattern.ts","../src/configs/scss.ts","../src/configs/shared.ts","../src/configs/vue.ts","../src/factory.ts"],"sourcesContent":["import type { Config, ConfigRuleSettings } from 'stylelint';\n\n// import type Primary, Secondary from stylelint\n\ntype StringOrRegex = string | RegExp;\ntype OneOrMany<S> = S | S[];\n\nexport type Primary =\n number | true | OneOrMany<StringOrRegex> | Record<string, any>;\nexport type Secondary = Record<string, any>;\n\nexport const defineRule = <\n PrimaryOption extends Primary,\n SecondaryOptions extends Secondary = object,\n>(\n rule: ConfigRuleSettings<PrimaryOption, SecondaryOptions>,\n) => rule;\n\nexport const defineRules = <TRules extends Config['rules']>(rule: TRules) =>\n rule;\n\n// clone function mergeConfigs from stylelint repository\nexport const mergeConfigs = (\n ...configsOrNull: (Config | undefined | null | false)[]\n) => {\n const configs = configsOrNull.filter((c): c is Config => !!c);\n\n return {\n plugins: [...new Set(configs.flatMap(c => c.plugins ?? []))],\n overrides: [...new Set(configs.flatMap(c => c.overrides ?? []))],\n extends: configs\n .flatMap(c => c.extends ?? [])\n .filter((item, index, arr) => arr.lastIndexOf(item) === index),\n rules: configs.reduce(\n (acc, config) => ({ ...acc, ...config.rules }),\n {} as Config['rules'],\n ),\n ...configs.reduce(\n (\n acc,\n { plugins: _p, overrides: _o, extends: _e, rules: _r, ...config },\n ) => ({ ...acc, ...config }),\n {} as Config,\n ),\n };\n};\n\nexport const isInRange = (\n version: false | number | undefined,\n ...versions: number[]\n) => typeof version === 'number' && versions.includes(version);\n","import type { Packages } from '@culur/utils-packages';\nimport { defineRule, defineRules } from '~/utils';\n\nconst getIgnoreAtRulesByTailwindVersion = (\n tailwindVersion: false | number | undefined,\n) => {\n switch (tailwindVersion) {\n // https://tailwindcss-v0.netlify.app//docs/functions-and-directives\n case 0:\n return [\n // Directives\n 'tailwind',\n 'apply',\n\n 'variants',\n 'responsive',\n 'screen',\n ];\n\n // https://v1.tailwindcss.com/docs/functions-and-directives\n // https://v2.tailwindcss.com/docs/functions-and-directives\n case 1:\n case 2:\n return [\n // Directives\n 'tailwind',\n 'apply',\n 'layer', // new\n\n 'variants',\n 'responsive',\n 'screen',\n ];\n\n // https://v3.tailwindcss.com/docs/functions-and-directives\n case 3:\n return [\n // Directives\n 'tailwind',\n 'layer',\n 'apply',\n 'config', // new\n ];\n\n // https://tailwindcss.com/docs/functions-and-directives\n case 4:\n return [\n // Directives\n 'import',\n 'theme',\n 'source',\n 'utility',\n 'variant',\n 'custom-variant',\n 'apply',\n 'reference',\n\n // Compatibility\n 'config',\n 'plugin',\n ];\n\n default:\n return [];\n }\n};\n\nexport const atRuleNoUnknownRule = (packages: Partial<Packages>) =>\n defineRule<true, { ignoreAtRules: (string | RegExp)[] }>([\n true,\n { ignoreAtRules: getIgnoreAtRulesByTailwindVersion(packages.tailwind) },\n ]);\n\nexport const atRuleNoUnknownCSS = (packages: Partial<Packages>) =>\n defineRules({\n 'at-rule-no-unknown': atRuleNoUnknownRule(packages),\n });\n\nexport const atRuleNoUnknownSCSS = (packages: Partial<Packages>) =>\n defineRules({\n 'at-rule-no-unknown': null,\n 'scss/at-rule-no-unknown': atRuleNoUnknownRule(packages),\n });\n","import { defineRule, defineRules } from '~/utils';\n\nexport const declarationBlockNoRedundantLonghandPropertiesRule = defineRule<\n true,\n { ignoreShorthands?: (string | RegExp)[] }\n>([true, { ignoreShorthands: ['grid-template'] }]);\n\nexport const declarationBlockNoRedundantLonghandProperties = defineRules({\n 'declaration-block-no-redundant-longhand-properties':\n declarationBlockNoRedundantLonghandPropertiesRule,\n});\n","import type { Packages } from '@culur/utils-packages';\nimport { defineRule, defineRules } from '~/utils';\n\nconst getIgnoreFunctionsByTailwindVersion = (\n tailwindVersion: false | number | undefined,\n) => {\n switch (tailwindVersion) {\n // https://tailwindcss-v0.netlify.app//docs/functions-and-directives\n case 0:\n return ['config'];\n\n // https://v1.tailwindcss.com/docs/functions-and-directives\n case 1:\n return ['theme'];\n\n // https://v2.tailwindcss.com/docs/functions-and-directives\n case 2:\n return ['screen', 'theme'];\n\n // https://v3.tailwindcss.com/docs/functions-and-directives\n case 3:\n return ['theme', 'screen'];\n\n // https://tailwindcss.com/docs/functions-and-directives\n case 4:\n return ['--alpha', '--spacing', 'theme'];\n\n default:\n return [];\n }\n};\n\nconst sassFunctionRegex = /^(list|math|color)\\..+/;\nconst getIgnoreFunctions = (packages: Partial<Packages>) => [\n // https://tailwindcss.com\n ...getIgnoreFunctionsByTailwindVersion(packages.tailwind),\n\n // https://sass-lang.com/documentation/modules/list\n // https://sass-lang.com/documentation/modules/math\n // https://sass-lang.com/documentation/modules/color\n ...(packages.sass //\n ? [sassFunctionRegex]\n : []),\n\n // https://vuejs.org/api/sfc-css-features.html#v-bind-in-css\n ...(packages.vue //\n ? ['v-bind']\n : []),\n];\n\nexport function functionNoUnknownRule(packages: Partial<Packages>) {\n return defineRule<true, { ignoreFunctions: (string | RegExp)[] }>([\n true,\n { ignoreFunctions: getIgnoreFunctions(packages) },\n ]);\n}\n\nexport const functionNoUnknown = (packages: Partial<Packages>) =>\n defineRules({\n 'function-no-unknown': functionNoUnknownRule(packages),\n });\n","import type { Packages } from '@culur/utils-packages';\nimport { defineRules, isInRange } from '~/utils';\n\nexport const importNotationCSS = (packages: Partial<Packages>) =>\n defineRules(\n isInRange(packages.tailwind, 4) //\n ? { 'import-notation': null }\n : {},\n );\n","import type { Packages } from '@culur/utils-packages';\nimport { defineRule, defineRules, isInRange } from '~/utils';\n\n// https://github.com/hudochenkov/stylelint-order/blob/master/rules/order/README.md#options\n\ntype Keyword =\n | 'custom-properties' /**/ // Custom properties (e.g. --property: 10px;)\n | 'dollar-variables' /***/ // Dollar variables (e.g. $variable)\n | 'at-variables' /*******/ // At-variables (e.g. @variable available in Less syntax)\n | 'declarations' /*******/ // CSS declarations (e.g. display: block)\n | 'rules' /**************/ // Nested rules (e.g. a { span {} })\n | 'at-rules' /***********/ // Nested at-rules (e.g. div { @media () {} })\n | 'less-mixins'; /*******/ // Mixins in Less syntax (e.g. .mixin();)\n\ninterface AtRule {\n type: 'at-rule';\n name?: string;\n parameter?: string | RegExp;\n hasBlock?: boolean;\n}\n\ninterface Rule {\n type: 'rule';\n selector?: string | RegExp;\n name?: string;\n}\n\ntype PrimaryOption = Array<Keyword | AtRule | Rule>;\ninterface SecondaryOptions {\n unspecified?: 'top' | 'bottom' | 'ignore';\n}\n\nconst definePrimaryOption = (...options: (PrimaryOption[number] | false | undefined)[]) =>\n options.filter((option): option is PrimaryOption[number] => !!option);\n\nconst blockRuleRegex = /^&::[\\w-]+/;\n\nexport const orderRule = (packages: Partial<Packages>) =>\n defineRule<PrimaryOption, SecondaryOptions>([\n definePrimaryOption(\n //! import\n packages.sass /**********************************/ && { type: 'at-rule', name: 'use' }, // scss: @use 'path/path';\n packages.sass /**********************************/ && { type: 'at-rule', name: 'forward' }, // scss: @forward 'path/path';\n packages.sass /**********************************/ && { type: 'at-rule', name: 'import' }, // scss: @import 'path/path';\n isInRange(packages.tailwind, 4) /****************/ && { type: 'at-rule', name: 'import' }, // tailwind 4: @import \"tailwindcss\";\n isInRange(packages.tailwind, 4) /****************/ && { type: 'at-rule', name: 'source' }, // tailwind 4: @source \"../node_modules/@culur/ui-lib\";\n isInRange(packages.tailwind, 4) /****************/ && { type: 'at-rule', name: 'reference' }, // tailwind 4: @reference \"../../app.css\";\n\n //! root\n isInRange(packages.tailwind, 0, 1, 2, 3) /*******/ && { type: 'at-rule', name: 'tailwind' }, // tailwind 0,1,2,3 : @tailwind base;\n isInRange(packages.tailwind, 3, 4) /*************/ && { type: 'at-rule', name: 'config' }, // tailwind 3,4: @config 'tailwind.custom.config.js'\n isInRange(packages.tailwind, 4) /****************/ && { type: 'at-rule', name: 'plugin' }, // tailwind 4: @plugin '@tailwindcss/typography'\n isInRange(packages.tailwind, 1, 2, 3) /**********/ && { type: 'at-rule', name: 'layer' }, // tailwind 1,2,3 : @layer base {}\n\n //! variables\n 'dollar-variables', // css: $variable: 10px;\n 'at-variables', // css: @variable: 10px;\n { type: 'at-rule', hasBlock: false }, // css: @variable: 10px;\n 'custom-properties', // css: --property: 10px;\n\n //! tailwind\n isInRange(packages.tailwind, 4) /****************/ && { type: 'at-rule', name: 'theme' }, // tailwind 4: @theme {}\n isInRange(packages.tailwind, 4) /****************/ && { type: 'at-rule', name: 'custom-variant' }, // tailwind 4: @custom-variant pointer-coarse (@media (pointer: coarse));\n\n //! functions, methods\n packages.sass /**********************************/ && { type: 'at-rule', name: 'function' }, // scss: @function sum() {}\n packages.sass /**********************************/ && { type: 'at-rule', name: 'mixin' }, // scss: @mixin mixin-name {}\n isInRange(packages.tailwind, 4) /****************/ && { type: 'at-rule', name: 'utility' }, // tailwind 4: @utility tab-4 { tab-size: 4; }\n\n //! declarations\n packages.sass /**********************************/ && { type: 'at-rule', name: 'extend' }, // scss: @extend .class-name;\n packages.sass /**********************************/ && { type: 'at-rule', name: 'include' }, // scss: @include mixin-name;\n isInRange(packages.tailwind, 0, 1, 2, 3, 4) /****/ && { type: 'at-rule', name: 'apply' }, // tailwind 0,1,2,3,4: @apply p-3;\n 'less-mixins', // less: .mixin();\n 'declarations', // css: display: block;\n\n //! block rules\n { type: 'rule', selector: blockRuleRegex }, // css: &::after {}\n 'rules', // css: child-component {}\n\n //! blocks nested\n packages.sass && { type: 'at-rule', name: 'at-root' }, // scss: @at-root selector { /* content */ }\n isInRange(packages.tailwind, 0, 1, 2) /**********/ && { type: 'at-rule', name: 'responsive' }, // tailwind 0,1,2 : @responsive {}\n isInRange(packages.tailwind, 0, 1, 2) /**********/ && { type: 'at-rule', name: 'variants' }, // tailwind 0,1,2 : @variants hover {}\n isInRange(packages.tailwind, 0, 1, 2) /**********/ && { type: 'at-rule', name: 'screen' }, // tailwind 0,1,2 : @screen sm {}\n isInRange(packages.tailwind, 4) /****************/ && { type: 'at-rule', name: 'variants' }, // tailwind 4: @variant dark {}\n { type: 'at-rule', hasBlock: true }, // css: @media () {}\n ),\n {\n unspecified: 'bottom',\n },\n ]);\n\nexport const order = (packages: Partial<Packages>) =>\n defineRules({\n 'order/order': orderRule(packages),\n });\n","import { defineRule, defineRules } from '~/utils';\n\nexport const selectorPseudoClassNoUnknownRule = defineRule<\n true,\n { ignorePseudoClasses?: (string | RegExp)[] }\n>([true, { ignorePseudoClasses: ['global', 'local'] }]);\n\nexport const selectorPseudoClassNoUnknown = defineRules({\n 'selector-pseudo-class-no-unknown': selectorPseudoClassNoUnknownRule,\n});\n","import type { Packages } from '@culur/utils-packages';\nimport type { Config } from 'stylelint';\nimport { atRuleNoUnknownCSS } from '~/rules/at-rule-no-unknown';\nimport { declarationBlockNoRedundantLonghandProperties } from '~/rules/declaration-block-no-redundant-longhand-properties';\nimport { functionNoUnknown } from '~/rules/function-no-unknown';\nimport { importNotationCSS } from '~/rules/import-notation';\nimport { order } from '~/rules/order';\nimport { selectorPseudoClassNoUnknown } from '~/rules/selector-pseudo-class-no-unknown';\n\nexport const configCss = (packages: Partial<Packages>): Config => ({\n extends: ['stylelint-config-standard', 'stylelint-config-clean-order'],\n plugins: ['stylelint-order', 'stylelint-selector-bem-pattern'],\n rules: {\n ...atRuleNoUnknownCSS(packages),\n ...declarationBlockNoRedundantLonghandProperties,\n ...functionNoUnknown(packages),\n ...importNotationCSS(packages),\n ...order(packages),\n ...selectorPseudoClassNoUnknown,\n 'declaration-empty-line-before': null,\n },\n});\n","import { defineRule, defineRules } from '~/utils';\n\ntype PrimaryOption = string;\ninterface SecondaryOptions {\n message: string;\n}\n\nexport const dollarVariablePatternRule = defineRule<\n PrimaryOption,\n SecondaryOptions\n>([\n '^(-{0,2}?[a-z][a-z0-9]*)(-[a-z0-9]+)*$',\n { message: 'Expected variable to be kebab-case' },\n]);\n\nexport const dollarVariablePatternSCSS = defineRules({\n 'scss/dollar-variable-pattern': dollarVariablePatternRule,\n});\n","import type { Packages } from '@culur/utils-packages';\nimport type { Config } from 'stylelint';\nimport { atRuleNoUnknownSCSS } from '~/rules/at-rule-no-unknown';\nimport { dollarVariablePatternSCSS } from '~/rules/dollar-variable-pattern';\n\nexport const configScss = (packages: Partial<Packages>): Config => ({\n extends: ['stylelint-config-standard-scss'],\n rules: {\n ...atRuleNoUnknownSCSS(packages),\n ...dollarVariablePatternSCSS,\n },\n});\n","import type { Config } from 'stylelint';\n\nexport const configShared = (): Config => ({\n extends: ['stylelint-config-html'],\n});\n","import type { Packages } from '@culur/utils-packages';\nimport type { Config } from 'stylelint';\n\nexport const configVue = (packages: Partial<Packages>): Config => ({\n extends: [\n packages.sass\n ? 'stylelint-config-standard-vue/scss'\n : 'stylelint-config-standard-vue',\n ],\n});\n","import type { Packages } from '@culur/utils-packages';\nimport type { Config } from 'stylelint';\nimport { configCss } from './configs/css';\nimport { configScss } from './configs/scss';\nimport { configShared } from './configs/shared';\nimport { configVue } from './configs/vue';\nimport { mergeConfigs } from './utils';\n\nexport default function defineConfig(\n packages?: Partial<Packages>,\n config?: Config,\n): Config {\n const packages_ = packages ?? {};\n\n return mergeConfigs(\n configShared(),\n configCss(packages_),\n packages_.sass && configScss(packages_),\n packages_.vue && configVue(packages_),\n config,\n );\n}\n"],"mappings":";AAWA,MAAa,cAIX,SACG;AAEL,MAAa,eAA+C,SAC1D;AAGF,MAAa,gBACX,GAAG,kBACA;CACH,MAAM,UAAU,cAAc,QAAQ,MAAmB,CAAC,CAAC,CAAC;CAE5D,OAAO;EACL,SAAS,CAAC,GAAG,IAAI,IAAI,QAAQ,SAAQ,MAAK,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;EAC3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;CAAS;CACxF,UAAU,SAAS,UAAU,CAAC,KAAwB;EAAE,MAAM;EAAW,MAAM;CAAW;CAC1F;EAAE,MAAM;EAAW,UAAU;CAAK;AACpC,GACA,EACE,aAAa,SACf,CACF,CAAC;AAEH,MAAa,SAAS,aACpB,YAAY,EACV,eAAe,UAAU,QAAQ,EACnC,CAAC;ACzFH,MAAa,+BAA+B,YAAY,EACtD,oCAN8C,WAG9C,CAAC,MAAM,EAAE,qBAAqB,CAAC,UAAU,OAAO,EAAE,CAAC,CAGf,EACtC,CAAC;;;ACAD,MAAa,aAAa,cAAyC;CACjE,SAAS,CAAC,6BAA6B,8BAA8B;CACrE,SAAS,CAAC,mBAAmB,gCAAgC;CAC7D,OAAO;EACL,GAAG,mBAAmB,QAAQ;EAC9B,GAAG;EACH,GAAG,kBAAkB,QAAQ;EAC7B,GAAG,kBAAkB,QAAQ;EAC7B,GAAG,MAAM,QAAQ;EACjB,GAAG;EACH,iCAAiC;CACnC;AACF;ACNA,MAAa,4BAA4B,YAAY,EACnD,gCATuC,WAGvC,CACA,0CACA,EAAE,SAAS,qCAAqC,CAClD,CAGkC,EAClC,CAAC;;;ACZD,MAAa,cAAc,cAAyC;CAClE,SAAS,CAAC,gCAAgC;CAC1C,OAAO;EACL,GAAG,oBAAoB,QAAQ;EAC/B,GAAG;CACL;AACF;;;ACTA,MAAa,sBAA8B,EACzC,SAAS,CAAC,uBAAuB,EACnC;;;ACDA,MAAa,aAAa,cAAyC,EACjE,SAAS,CACP,SAAS,OACL,uCACA,+BACN,EACF;;;ACDA,SAAwB,aACtB,UACA,QACQ;CACR,MAAM,YAAY,YAAY,CAAC;CAE/B,OAAO,aACL,aAAa,GACb,UAAU,SAAS,GACnB,UAAU,QAAQ,WAAW,SAAS,GACtC,UAAU,OAAO,UAAU,SAAS,GACpC,MACF;AACF"}
|
|
1
|
+
{"version":3,"file":"factory-CtV8XN1h.mjs","names":[],"sources":["../src/utils/utils.ts","../src/rules/at-rule-no-unknown.ts","../src/rules/declaration-block-no-redundant-longhand-properties.ts","../src/rules/function-no-unknown.ts","../src/rules/import-notation.ts","../src/rules/order.ts","../src/rules/selector-pseudo-class-no-unknown.ts","../src/configs/css.ts","../src/rules/dollar-variable-pattern.ts","../src/configs/scss.ts","../src/configs/shared.ts","../src/configs/vue.ts","../src/factory.ts"],"sourcesContent":["import type { Config, ConfigRuleSettings } from 'stylelint';\n\n// import type Primary, Secondary from stylelint\n\ntype StringOrRegex = string | RegExp;\ntype OneOrMany<S> = S | S[];\n\nexport type Primary =\n number | true | OneOrMany<StringOrRegex> | Record<string, any>;\nexport type Secondary = Record<string, any>;\n\nexport const defineRule = <\n PrimaryOption extends Primary,\n SecondaryOptions extends Secondary = object,\n>(\n rule: ConfigRuleSettings<PrimaryOption, SecondaryOptions>,\n) => rule;\n\nexport const defineRules = <TRules extends Config['rules']>(rule: TRules) =>\n rule;\n\n// clone function mergeConfigs from stylelint repository\nexport const mergeConfigs = (\n ...configsOrNull: (Config | undefined | null | false)[]\n) => {\n const configs = configsOrNull.filter((c): c is Config => !!c);\n\n return {\n plugins: [...new Set(configs.flatMap(c => c.plugins ?? []))],\n overrides: [...new Set(configs.flatMap(c => c.overrides ?? []))],\n extends: configs\n .flatMap(c => c.extends ?? [])\n .filter((item, index, arr) => arr.lastIndexOf(item) === index),\n rules: configs.reduce(\n (acc, config) => ({ ...acc, ...config.rules }),\n {} as Config['rules'],\n ),\n ...configs.reduce(\n (\n acc,\n { plugins: _p, overrides: _o, extends: _e, rules: _r, ...config },\n ) => ({ ...acc, ...config }),\n {} as Config,\n ),\n };\n};\n\nexport const isInRange = (\n version: false | number | undefined,\n ...versions: number[]\n) => typeof version === 'number' && versions.includes(version);\n","import type { Packages } from '@culur/utils-packages';\nimport { defineRule, defineRules } from '~/utils';\n\nconst getIgnoreAtRulesByTailwindVersion = (\n tailwindVersion: false | number | undefined,\n) => {\n switch (tailwindVersion) {\n // https://tailwindcss-v0.netlify.app//docs/functions-and-directives\n case 0:\n return [\n // Directives\n 'tailwind',\n 'apply',\n\n 'variants',\n 'responsive',\n 'screen',\n ];\n\n // https://v1.tailwindcss.com/docs/functions-and-directives\n // https://v2.tailwindcss.com/docs/functions-and-directives\n case 1:\n case 2:\n return [\n // Directives\n 'tailwind',\n 'apply',\n 'layer', // new\n\n 'variants',\n 'responsive',\n 'screen',\n ];\n\n // https://v3.tailwindcss.com/docs/functions-and-directives\n case 3:\n return [\n // Directives\n 'tailwind',\n 'layer',\n 'apply',\n 'config', // new\n ];\n\n // https://tailwindcss.com/docs/functions-and-directives\n case 4:\n return [\n // Directives\n 'import',\n 'theme',\n 'source',\n 'utility',\n 'variant',\n 'custom-variant',\n 'apply',\n 'reference',\n\n // Compatibility\n 'config',\n 'plugin',\n ];\n\n default:\n return [];\n }\n};\n\nexport const atRuleNoUnknownRule = (packages: Partial<Packages>) =>\n defineRule<true, { ignoreAtRules: (string | RegExp)[] }>([\n true,\n { ignoreAtRules: getIgnoreAtRulesByTailwindVersion(packages.tailwind) },\n ]);\n\nexport const atRuleNoUnknownCSS = (packages: Partial<Packages>) =>\n defineRules({\n 'at-rule-no-unknown': atRuleNoUnknownRule(packages),\n });\n\nexport const atRuleNoUnknownSCSS = (packages: Partial<Packages>) =>\n defineRules({\n 'at-rule-no-unknown': null,\n 'scss/at-rule-no-unknown': atRuleNoUnknownRule(packages),\n });\n","import { defineRule, defineRules } from '~/utils';\n\nexport const declarationBlockNoRedundantLonghandPropertiesRule = defineRule<\n true,\n { ignoreShorthands?: (string | RegExp)[] }\n>([true, { ignoreShorthands: ['grid-template'] }]);\n\nexport const declarationBlockNoRedundantLonghandProperties = defineRules({\n 'declaration-block-no-redundant-longhand-properties':\n declarationBlockNoRedundantLonghandPropertiesRule,\n});\n","import type { Packages } from '@culur/utils-packages';\nimport { defineRule, defineRules } from '~/utils';\n\nconst getIgnoreFunctionsByTailwindVersion = (\n tailwindVersion: false | number | undefined,\n) => {\n switch (tailwindVersion) {\n // https://tailwindcss-v0.netlify.app//docs/functions-and-directives\n case 0:\n return ['config'];\n\n // https://v1.tailwindcss.com/docs/functions-and-directives\n case 1:\n return ['theme'];\n\n // https://v2.tailwindcss.com/docs/functions-and-directives\n case 2:\n return ['screen', 'theme'];\n\n // https://v3.tailwindcss.com/docs/functions-and-directives\n case 3:\n return ['theme', 'screen'];\n\n // https://tailwindcss.com/docs/functions-and-directives\n case 4:\n return ['--alpha', '--spacing', 'theme'];\n\n default:\n return [];\n }\n};\n\nconst sassFunctionRegex = /^(list|math|color)\\..+/;\nconst getIgnoreFunctions = (packages: Partial<Packages>) => [\n // https://tailwindcss.com\n ...getIgnoreFunctionsByTailwindVersion(packages.tailwind),\n\n // https://sass-lang.com/documentation/modules/list\n // https://sass-lang.com/documentation/modules/math\n // https://sass-lang.com/documentation/modules/color\n ...(packages.sass //\n ? [sassFunctionRegex]\n : []),\n\n // https://vuejs.org/api/sfc-css-features.html#v-bind-in-css\n ...(packages.vue //\n ? ['v-bind']\n : []),\n];\n\nexport function functionNoUnknownRule(packages: Partial<Packages>) {\n return defineRule<true, { ignoreFunctions: (string | RegExp)[] }>([\n true,\n { ignoreFunctions: getIgnoreFunctions(packages) },\n ]);\n}\n\nexport const functionNoUnknown = (packages: Partial<Packages>) =>\n defineRules({\n 'function-no-unknown': functionNoUnknownRule(packages),\n });\n","import type { Packages } from '@culur/utils-packages';\nimport { defineRules, isInRange } from '~/utils';\n\nexport const importNotationCSS = (packages: Partial<Packages>) =>\n defineRules(\n isInRange(packages.tailwind, 4) //\n ? { 'import-notation': null }\n : {},\n );\n","import type { Packages } from '@culur/utils-packages';\nimport { defineRule, defineRules, isInRange } from '~/utils';\n\n// https://github.com/hudochenkov/stylelint-order/blob/master/rules/order/README.md#options\n\ntype Keyword =\n | 'custom-properties' /**/ // Custom properties (e.g. --property: 10px;)\n | 'dollar-variables' /***/ // Dollar variables (e.g. $variable)\n | 'at-variables' /*******/ // At-variables (e.g. @variable available in Less syntax)\n | 'declarations' /*******/ // CSS declarations (e.g. display: block)\n | 'rules' /**************/ // Nested rules (e.g. a { span {} })\n | 'at-rules' /***********/ // Nested at-rules (e.g. div { @media () {} })\n | 'less-mixins'; /*******/ // Mixins in Less syntax (e.g. .mixin();)\n\ninterface AtRule {\n type: 'at-rule';\n name?: string;\n parameter?: string | RegExp;\n hasBlock?: boolean;\n}\n\ninterface Rule {\n type: 'rule';\n selector?: string | RegExp;\n name?: string;\n}\n\ntype PrimaryOption = Array<Keyword | AtRule | Rule>;\ninterface SecondaryOptions {\n unspecified?: 'top' | 'bottom' | 'ignore';\n}\n\nconst definePrimaryOption = (...options: (PrimaryOption[number] | false | undefined)[]) =>\n options.filter((option): option is PrimaryOption[number] => !!option);\n\nconst blockRuleRegex = /^&::[\\w-]+/;\n\nexport const orderRule = (packages: Partial<Packages>) =>\n defineRule<PrimaryOption, SecondaryOptions>([\n definePrimaryOption(\n //! import\n packages.sass /**********************************/ && { type: 'at-rule', name: 'use' }, // scss: @use 'path/path';\n packages.sass /**********************************/ && { type: 'at-rule', name: 'forward' }, // scss: @forward 'path/path';\n packages.sass /**********************************/ && { type: 'at-rule', name: 'import' }, // scss: @import 'path/path';\n isInRange(packages.tailwind, 4) /****************/ && { type: 'at-rule', name: 'import' }, // tailwind 4: @import \"tailwindcss\";\n isInRange(packages.tailwind, 4) /****************/ && { type: 'at-rule', name: 'source' }, // tailwind 4: @source \"../node_modules/@culur/ui-lib\";\n isInRange(packages.tailwind, 4) /****************/ && { type: 'at-rule', name: 'reference' }, // tailwind 4: @reference \"../../app.css\";\n\n //! root\n isInRange(packages.tailwind, 0, 1, 2, 3) /*******/ && { type: 'at-rule', name: 'tailwind' }, // tailwind 0,1,2,3 : @tailwind base;\n isInRange(packages.tailwind, 3, 4) /*************/ && { type: 'at-rule', name: 'config' }, // tailwind 3,4: @config 'tailwind.custom.config.js'\n isInRange(packages.tailwind, 4) /****************/ && { type: 'at-rule', name: 'plugin' }, // tailwind 4: @plugin '@tailwindcss/typography'\n isInRange(packages.tailwind, 1, 2, 3) /**********/ && { type: 'at-rule', name: 'layer' }, // tailwind 1,2,3 : @layer base {}\n\n //! variables\n 'dollar-variables', // css: $variable: 10px;\n 'at-variables', // css: @variable: 10px;\n { type: 'at-rule', hasBlock: false }, // css: @variable: 10px;\n 'custom-properties', // css: --property: 10px;\n\n //! tailwind\n isInRange(packages.tailwind, 4) /****************/ && { type: 'at-rule', name: 'theme' }, // tailwind 4: @theme {}\n isInRange(packages.tailwind, 4) /****************/ && { type: 'at-rule', name: 'custom-variant' }, // tailwind 4: @custom-variant pointer-coarse (@media (pointer: coarse));\n\n //! functions, methods\n packages.sass /**********************************/ && { type: 'at-rule', name: 'function' }, // scss: @function sum() {}\n packages.sass /**********************************/ && { type: 'at-rule', name: 'mixin' }, // scss: @mixin mixin-name {}\n isInRange(packages.tailwind, 4) /****************/ && { type: 'at-rule', name: 'utility' }, // tailwind 4: @utility tab-4 { tab-size: 4; }\n\n //! declarations\n packages.sass /**********************************/ && { type: 'at-rule', name: 'extend' }, // scss: @extend .class-name;\n packages.sass /**********************************/ && { type: 'at-rule', name: 'include' }, // scss: @include mixin-name;\n isInRange(packages.tailwind, 0, 1, 2, 3, 4) /****/ && { type: 'at-rule', name: 'apply' }, // tailwind 0,1,2,3,4: @apply p-3;\n 'less-mixins', // less: .mixin();\n 'declarations', // css: display: block;\n\n //! block rules\n { type: 'rule', selector: blockRuleRegex }, // css: &::after {}\n 'rules', // css: child-component {}\n\n //! blocks nested\n packages.sass && { type: 'at-rule', name: 'at-root' }, // scss: @at-root selector { /* content */ }\n isInRange(packages.tailwind, 0, 1, 2) /**********/ && { type: 'at-rule', name: 'responsive' }, // tailwind 0,1,2 : @responsive {}\n isInRange(packages.tailwind, 0, 1, 2) /**********/ && { type: 'at-rule', name: 'variants' }, // tailwind 0,1,2 : @variants hover {}\n isInRange(packages.tailwind, 0, 1, 2) /**********/ && { type: 'at-rule', name: 'screen' }, // tailwind 0,1,2 : @screen sm {}\n isInRange(packages.tailwind, 4) /****************/ && { type: 'at-rule', name: 'variants' }, // tailwind 4: @variant dark {}\n { type: 'at-rule', hasBlock: true }, // css: @media () {}\n ),\n {\n unspecified: 'bottom',\n },\n ]);\n\nexport const order = (packages: Partial<Packages>) =>\n defineRules({\n 'order/order': orderRule(packages),\n });\n","import { defineRule, defineRules } from '~/utils';\n\nexport const selectorPseudoClassNoUnknownRule = defineRule<\n true,\n { ignorePseudoClasses?: (string | RegExp)[] }\n>([true, { ignorePseudoClasses: ['global', 'local'] }]);\n\nexport const selectorPseudoClassNoUnknown = defineRules({\n 'selector-pseudo-class-no-unknown': selectorPseudoClassNoUnknownRule,\n});\n","import type { Packages } from '@culur/utils-packages';\nimport type { Config } from 'stylelint';\nimport { atRuleNoUnknownCSS } from '~/rules/at-rule-no-unknown';\nimport { declarationBlockNoRedundantLonghandProperties } from '~/rules/declaration-block-no-redundant-longhand-properties';\nimport { functionNoUnknown } from '~/rules/function-no-unknown';\nimport { importNotationCSS } from '~/rules/import-notation';\nimport { order } from '~/rules/order';\nimport { selectorPseudoClassNoUnknown } from '~/rules/selector-pseudo-class-no-unknown';\n\nexport const configCss = (packages: Partial<Packages>): Config => ({\n extends: ['stylelint-config-standard', 'stylelint-config-clean-order'],\n plugins: ['stylelint-order', 'stylelint-selector-bem-pattern'],\n rules: {\n ...atRuleNoUnknownCSS(packages),\n ...declarationBlockNoRedundantLonghandProperties,\n ...functionNoUnknown(packages),\n ...importNotationCSS(packages),\n ...order(packages),\n ...selectorPseudoClassNoUnknown,\n 'declaration-empty-line-before': null,\n },\n});\n","import { defineRule, defineRules } from '~/utils';\n\ntype PrimaryOption = string;\ninterface SecondaryOptions {\n message: string;\n}\n\nexport const dollarVariablePatternRule = defineRule<\n PrimaryOption,\n SecondaryOptions\n>([\n '^(-{0,2}?[a-z][a-z0-9]*)(-[a-z0-9]+)*$',\n { message: 'Expected variable to be kebab-case' },\n]);\n\nexport const dollarVariablePatternSCSS = defineRules({\n 'scss/dollar-variable-pattern': dollarVariablePatternRule,\n});\n","import type { Packages } from '@culur/utils-packages';\nimport type { Config } from 'stylelint';\nimport { atRuleNoUnknownSCSS } from '~/rules/at-rule-no-unknown';\nimport { dollarVariablePatternSCSS } from '~/rules/dollar-variable-pattern';\n\nexport const configScss = (packages: Partial<Packages>): Config => ({\n extends: ['stylelint-config-standard-scss'],\n rules: {\n ...atRuleNoUnknownSCSS(packages),\n ...dollarVariablePatternSCSS,\n },\n});\n","import type { Config } from 'stylelint';\n\nexport const configShared = (): Config => ({\n extends: ['stylelint-config-html'],\n});\n","import type { Packages } from '@culur/utils-packages';\nimport type { Config } from 'stylelint';\n\nexport const configVue = (packages: Partial<Packages>): Config => ({\n extends: [\n packages.sass\n ? 'stylelint-config-standard-vue/scss'\n : 'stylelint-config-standard-vue',\n ],\n});\n","import type { Packages } from '@culur/utils-packages';\nimport type { Config } from 'stylelint';\nimport { configCss } from './configs/css';\nimport { configScss } from './configs/scss';\nimport { configShared } from './configs/shared';\nimport { configVue } from './configs/vue';\nimport { mergeConfigs } from './utils';\n\nexport default function defineConfig(\n packages?: Partial<Packages>,\n config?: Config,\n): Config {\n const packages_ = packages ?? {};\n\n return mergeConfigs(\n configShared(),\n configCss(packages_),\n packages_.sass && configScss(packages_),\n packages_.vue && configVue(packages_),\n config,\n );\n}\n"],"mappings":";AAWA,MAAa,cAIX,SACG;AAEL,MAAa,eAA+C,SAC1D;AAGF,MAAa,gBACX,GAAG,kBACA;CACH,MAAM,UAAU,cAAc,QAAQ,MAAmB,CAAC,CAAC,CAAC;CAE5D,OAAO;EACL,SAAS,CAAC,GAAG,IAAI,IAAI,QAAQ,SAAQ,MAAK,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;EAC3D,WAAW,CAAC,GAAG,IAAI,IAAI,QAAQ,SAAQ,MAAK,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;EAC/D,SAAS,QACN,SAAQ,MAAK,EAAE,WAAW,CAAC,CAAC,CAAC,CAC7B,QAAQ,MAAM,OAAO,QAAQ,IAAI,Y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QAAQ,EACnC,CAAC;ACzFH,MAAa,+BAA+B,YAAY,EACtD,oCAN8C,WAG9C,CAAC,MAAM,EAAE,qBAAqB,CAAC,UAAU,OAAO,EAAE,CAAC,CAGf,EACtC,CAAC;;ACAD,MAAa,aAAa,cAAyC;CACjE,SAAS,CAAC,6BAA6B,8BAA8B;CACrE,SAAS,CAAC,mBAAmB,gCAAgC;CAC7D,OAAO;EACL,GAAG,mBAAmB,QAAQ;EAC9B,GAAG;EACH,GAAG,kBAAkB,QAAQ;EAC7B,GAAG,kBAAkB,QAAQ;EAC7B,GAAG,MAAM,QAAQ;EACjB,GAAG;EACH,iCAAiC;CACnC;AACF;ACNA,MAAa,4BAA4B,YAAY,EACnD,gCATuC,WAGvC,CACA,0CACA,EAAE,SAAS,qCAAqC,CAClD,CAGkC,EAClC,CAAC;;ACZD,MAAa,cAAc,cAAyC;CAClE,SAAS,CAAC,gCAAgC;CAC1C,OAAO;EACL,GAAG,oBAAoB,QAAQ;EAC/B,GAAG;CACL;AACF;;ACTA,MAAa,sBAA8B,EACzC,SAAS,CAAC,uBAAuB,EACnC;;ACDA,MAAa,aAAa,cAAyC,EACjE,SAAS,CACP,SAAS,OACL,uCACA,+BACN,EACF;;ACDA,SAAwB,aACtB,UACA,QACQ;CACR,MAAM,YAAY,YAAY,CAAC;CAE/B,OAAO,aACL,aAAa,GACb,UAAU,SAAS,GACnB,UAAU,QAAQ,WAAW,SAAS,GACtC,UAAU,OAAO,UAAU,SAAS,GACpC,MACF;AACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/utils/utils.ts
|
|
2
2
|
const defineRule = (rule) => rule;
|
|
3
3
|
const defineRules = (rule) => rule;
|
|
4
4
|
const mergeConfigs = (...configsOrNull) => {
|
|
@@ -18,8 +18,7 @@ const mergeConfigs = (...configsOrNull) => {
|
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
20
|
const isInRange = (version, ...versions) => typeof version === "number" && versions.includes(version);
|
|
21
|
-
|
|
22
|
-
//#region src/rules/at-rule-no-unknown.ts
|
|
21
|
+
// src/rules/at-rule-no-unknown.ts
|
|
23
22
|
const getIgnoreAtRulesByTailwindVersion = (tailwindVersion) => {
|
|
24
23
|
switch (tailwindVersion) {
|
|
25
24
|
case 0: return [
|
|
@@ -66,8 +65,7 @@ const atRuleNoUnknownSCSS = (packages) => defineRules({
|
|
|
66
65
|
"scss/at-rule-no-unknown": atRuleNoUnknownRule(packages)
|
|
67
66
|
});
|
|
68
67
|
const declarationBlockNoRedundantLonghandProperties = defineRules({ "declaration-block-no-redundant-longhand-properties": defineRule([true, { ignoreShorthands: ["grid-template"] }]) });
|
|
69
|
-
|
|
70
|
-
//#region src/rules/function-no-unknown.ts
|
|
68
|
+
// src/rules/function-no-unknown.ts
|
|
71
69
|
const getIgnoreFunctionsByTailwindVersion = (tailwindVersion) => {
|
|
72
70
|
switch (tailwindVersion) {
|
|
73
71
|
case 0: return ["config"];
|
|
@@ -92,11 +90,9 @@ function functionNoUnknownRule(packages) {
|
|
|
92
90
|
return defineRule([true, { ignoreFunctions: getIgnoreFunctions(packages) }]);
|
|
93
91
|
}
|
|
94
92
|
const functionNoUnknown = (packages) => defineRules({ "function-no-unknown": functionNoUnknownRule(packages) });
|
|
95
|
-
|
|
96
|
-
//#region src/rules/import-notation.ts
|
|
93
|
+
// src/rules/import-notation.ts
|
|
97
94
|
const importNotationCSS = (packages) => defineRules(isInRange(packages.tailwind, 4) ? { "import-notation": null } : {});
|
|
98
|
-
|
|
99
|
-
//#region src/rules/order.ts
|
|
95
|
+
// src/rules/order.ts
|
|
100
96
|
const definePrimaryOption = (...options) => options.filter((option) => !!option);
|
|
101
97
|
const blockRuleRegex = /^&::[\w-]+/;
|
|
102
98
|
const orderRule = (packages) => defineRule([definePrimaryOption(
|
|
@@ -221,8 +217,7 @@ const orderRule = (packages) => defineRule([definePrimaryOption(
|
|
|
221
217
|
), { unspecified: "bottom" }]);
|
|
222
218
|
const order = (packages) => defineRules({ "order/order": orderRule(packages) });
|
|
223
219
|
const selectorPseudoClassNoUnknown = defineRules({ "selector-pseudo-class-no-unknown": defineRule([true, { ignorePseudoClasses: ["global", "local"] }]) });
|
|
224
|
-
|
|
225
|
-
//#region src/configs/css.ts
|
|
220
|
+
// src/configs/css.ts
|
|
226
221
|
const configCss = (packages) => ({
|
|
227
222
|
extends: ["stylelint-config-standard", "stylelint-config-clean-order"],
|
|
228
223
|
plugins: ["stylelint-order", "stylelint-selector-bem-pattern"],
|
|
@@ -237,8 +232,7 @@ const configCss = (packages) => ({
|
|
|
237
232
|
}
|
|
238
233
|
});
|
|
239
234
|
const dollarVariablePatternSCSS = defineRules({ "scss/dollar-variable-pattern": defineRule(["^(-{0,2}?[a-z][a-z0-9]*)(-[a-z0-9]+)*$", { message: "Expected variable to be kebab-case" }]) });
|
|
240
|
-
|
|
241
|
-
//#region src/configs/scss.ts
|
|
235
|
+
// src/configs/scss.ts
|
|
242
236
|
const configScss = (packages) => ({
|
|
243
237
|
extends: ["stylelint-config-standard-scss"],
|
|
244
238
|
rules: {
|
|
@@ -246,19 +240,15 @@ const configScss = (packages) => ({
|
|
|
246
240
|
...dollarVariablePatternSCSS
|
|
247
241
|
}
|
|
248
242
|
});
|
|
249
|
-
|
|
250
|
-
//#region src/configs/shared.ts
|
|
243
|
+
// src/configs/shared.ts
|
|
251
244
|
const configShared = () => ({ extends: ["stylelint-config-html"] });
|
|
252
|
-
|
|
253
|
-
//#region src/configs/vue.ts
|
|
245
|
+
// src/configs/vue.ts
|
|
254
246
|
const configVue = (packages) => ({ extends: [packages.sass ? "stylelint-config-standard-vue/scss" : "stylelint-config-standard-vue"] });
|
|
255
|
-
|
|
256
|
-
//#region src/factory.ts
|
|
247
|
+
// src/factory.ts
|
|
257
248
|
function defineConfig(packages, config) {
|
|
258
249
|
const packages_ = packages ?? {};
|
|
259
250
|
return mergeConfigs(configShared(), configCss(packages_), packages_.sass && configScss(packages_), packages_.vue && configVue(packages_), config);
|
|
260
251
|
}
|
|
261
|
-
//#endregion
|
|
262
252
|
Object.defineProperty(exports, "defineConfig", {
|
|
263
253
|
enumerable: true,
|
|
264
254
|
get: function() {
|
|
@@ -266,4 +256,4 @@ Object.defineProperty(exports, "defineConfig", {
|
|
|
266
256
|
}
|
|
267
257
|
});
|
|
268
258
|
|
|
269
|
-
//# sourceMappingURL=factory-
|
|
259
|
+
//# sourceMappingURL=factory-DdLX4Vgi.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factory-BNS_YTTh.cjs","names":[],"sources":["../src/utils/utils.ts","../src/rules/at-rule-no-unknown.ts","../src/rules/declaration-block-no-redundant-longhand-properties.ts","../src/rules/function-no-unknown.ts","../src/rules/import-notation.ts","../src/rules/order.ts","../src/rules/selector-pseudo-class-no-unknown.ts","../src/configs/css.ts","../src/rules/dollar-variable-pattern.ts","../src/configs/scss.ts","../src/configs/shared.ts","../src/configs/vue.ts","../src/factory.ts"],"sourcesContent":["import type { Config, ConfigRuleSettings } from 'stylelint';\n\n// import type Primary, Secondary from stylelint\n\ntype StringOrRegex = string | RegExp;\ntype OneOrMany<S> = S | S[];\n\nexport type Primary =\n number | true | OneOrMany<StringOrRegex> | Record<string, any>;\nexport type Secondary = Record<string, any>;\n\nexport const defineRule = <\n PrimaryOption extends Primary,\n SecondaryOptions extends Secondary = object,\n>(\n rule: ConfigRuleSettings<PrimaryOption, SecondaryOptions>,\n) => rule;\n\nexport const defineRules = <TRules extends Config['rules']>(rule: TRules) =>\n rule;\n\n// clone function mergeConfigs from stylelint repository\nexport const mergeConfigs = (\n ...configsOrNull: (Config | undefined | null | false)[]\n) => {\n const configs = configsOrNull.filter((c): c is Config => !!c);\n\n return {\n plugins: [...new Set(configs.flatMap(c => c.plugins ?? []))],\n overrides: [...new Set(configs.flatMap(c => c.overrides ?? []))],\n extends: configs\n .flatMap(c => c.extends ?? [])\n .filter((item, index, arr) => arr.lastIndexOf(item) === index),\n rules: configs.reduce(\n (acc, config) => ({ ...acc, ...config.rules }),\n {} as Config['rules'],\n ),\n ...configs.reduce(\n (\n acc,\n { plugins: _p, overrides: _o, extends: _e, rules: _r, ...config },\n ) => ({ ...acc, ...config }),\n {} as Config,\n ),\n };\n};\n\nexport const isInRange = (\n version: false | number | undefined,\n ...versions: number[]\n) => typeof version === 'number' && versions.includes(version);\n","import type { Packages } from '@culur/utils-packages';\nimport { defineRule, defineRules } from '~/utils';\n\nconst getIgnoreAtRulesByTailwindVersion = (\n tailwindVersion: false | number | undefined,\n) => {\n switch (tailwindVersion) {\n // https://tailwindcss-v0.netlify.app//docs/functions-and-directives\n case 0:\n return [\n // Directives\n 'tailwind',\n 'apply',\n\n 'variants',\n 'responsive',\n 'screen',\n ];\n\n // https://v1.tailwindcss.com/docs/functions-and-directives\n // https://v2.tailwindcss.com/docs/functions-and-directives\n case 1:\n case 2:\n return [\n // Directives\n 'tailwind',\n 'apply',\n 'layer', // new\n\n 'variants',\n 'responsive',\n 'screen',\n ];\n\n // https://v3.tailwindcss.com/docs/functions-and-directives\n case 3:\n return [\n // Directives\n 'tailwind',\n 'layer',\n 'apply',\n 'config', // new\n ];\n\n // https://tailwindcss.com/docs/functions-and-directives\n case 4:\n return [\n // Directives\n 'import',\n 'theme',\n 'source',\n 'utility',\n 'variant',\n 'custom-variant',\n 'apply',\n 'reference',\n\n // Compatibility\n 'config',\n 'plugin',\n ];\n\n default:\n return [];\n }\n};\n\nexport const atRuleNoUnknownRule = (packages: Partial<Packages>) =>\n defineRule<true, { ignoreAtRules: (string | RegExp)[] }>([\n true,\n { ignoreAtRules: getIgnoreAtRulesByTailwindVersion(packages.tailwind) },\n ]);\n\nexport const atRuleNoUnknownCSS = (packages: Partial<Packages>) =>\n defineRules({\n 'at-rule-no-unknown': atRuleNoUnknownRule(packages),\n });\n\nexport const atRuleNoUnknownSCSS = (packages: Partial<Packages>) =>\n defineRules({\n 'at-rule-no-unknown': null,\n 'scss/at-rule-no-unknown': atRuleNoUnknownRule(packages),\n });\n","import { defineRule, defineRules } from '~/utils';\n\nexport const declarationBlockNoRedundantLonghandPropertiesRule = defineRule<\n true,\n { ignoreShorthands?: (string | RegExp)[] }\n>([true, { ignoreShorthands: ['grid-template'] }]);\n\nexport const declarationBlockNoRedundantLonghandProperties = defineRules({\n 'declaration-block-no-redundant-longhand-properties':\n declarationBlockNoRedundantLonghandPropertiesRule,\n});\n","import type { Packages } from '@culur/utils-packages';\nimport { defineRule, defineRules } from '~/utils';\n\nconst getIgnoreFunctionsByTailwindVersion = (\n tailwindVersion: false | number | undefined,\n) => {\n switch (tailwindVersion) {\n // https://tailwindcss-v0.netlify.app//docs/functions-and-directives\n case 0:\n return ['config'];\n\n // https://v1.tailwindcss.com/docs/functions-and-directives\n case 1:\n return ['theme'];\n\n // https://v2.tailwindcss.com/docs/functions-and-directives\n case 2:\n return ['screen', 'theme'];\n\n // https://v3.tailwindcss.com/docs/functions-and-directives\n case 3:\n return ['theme', 'screen'];\n\n // https://tailwindcss.com/docs/functions-and-directives\n case 4:\n return ['--alpha', '--spacing', 'theme'];\n\n default:\n return [];\n }\n};\n\nconst sassFunctionRegex = /^(list|math|color)\\..+/;\nconst getIgnoreFunctions = (packages: Partial<Packages>) => [\n // https://tailwindcss.com\n ...getIgnoreFunctionsByTailwindVersion(packages.tailwind),\n\n // https://sass-lang.com/documentation/modules/list\n // https://sass-lang.com/documentation/modules/math\n // https://sass-lang.com/documentation/modules/color\n ...(packages.sass //\n ? [sassFunctionRegex]\n : []),\n\n // https://vuejs.org/api/sfc-css-features.html#v-bind-in-css\n ...(packages.vue //\n ? ['v-bind']\n : []),\n];\n\nexport function functionNoUnknownRule(packages: Partial<Packages>) {\n return defineRule<true, { ignoreFunctions: (string | RegExp)[] }>([\n true,\n { ignoreFunctions: getIgnoreFunctions(packages) },\n ]);\n}\n\nexport const functionNoUnknown = (packages: Partial<Packages>) =>\n defineRules({\n 'function-no-unknown': functionNoUnknownRule(packages),\n });\n","import type { Packages } from '@culur/utils-packages';\nimport { defineRules, isInRange } from '~/utils';\n\nexport const importNotationCSS = (packages: Partial<Packages>) =>\n defineRules(\n isInRange(packages.tailwind, 4) //\n ? { 'import-notation': null }\n : {},\n );\n","import type { Packages } from '@culur/utils-packages';\nimport { defineRule, defineRules, isInRange } from '~/utils';\n\n// https://github.com/hudochenkov/stylelint-order/blob/master/rules/order/README.md#options\n\ntype Keyword =\n | 'custom-properties' /**/ // Custom properties (e.g. --property: 10px;)\n | 'dollar-variables' /***/ // Dollar variables (e.g. $variable)\n | 'at-variables' /*******/ // At-variables (e.g. @variable available in Less syntax)\n | 'declarations' /*******/ // CSS declarations (e.g. display: block)\n | 'rules' /**************/ // Nested rules (e.g. a { span {} })\n | 'at-rules' /***********/ // Nested at-rules (e.g. div { @media () {} })\n | 'less-mixins'; /*******/ // Mixins in Less syntax (e.g. .mixin();)\n\ninterface AtRule {\n type: 'at-rule';\n name?: string;\n parameter?: string | RegExp;\n hasBlock?: boolean;\n}\n\ninterface Rule {\n type: 'rule';\n selector?: string | RegExp;\n name?: string;\n}\n\ntype PrimaryOption = Array<Keyword | AtRule | Rule>;\ninterface SecondaryOptions {\n unspecified?: 'top' | 'bottom' | 'ignore';\n}\n\nconst definePrimaryOption = (...options: (PrimaryOption[number] | false | undefined)[]) =>\n options.filter((option): option is PrimaryOption[number] => !!option);\n\nconst blockRuleRegex = /^&::[\\w-]+/;\n\nexport const orderRule = (packages: Partial<Packages>) =>\n defineRule<PrimaryOption, SecondaryOptions>([\n definePrimaryOption(\n //! import\n packages.sass /**********************************/ && { type: 'at-rule', name: 'use' }, // scss: @use 'path/path';\n packages.sass /**********************************/ && { type: 'at-rule', name: 'forward' }, // scss: @forward 'path/path';\n packages.sass /**********************************/ && { type: 'at-rule', name: 'import' }, // scss: @import 'path/path';\n isInRange(packages.tailwind, 4) /****************/ && { type: 'at-rule', name: 'import' }, // tailwind 4: @import \"tailwindcss\";\n isInRange(packages.tailwind, 4) /****************/ && { type: 'at-rule', name: 'source' }, // tailwind 4: @source \"../node_modules/@culur/ui-lib\";\n isInRange(packages.tailwind, 4) /****************/ && { type: 'at-rule', name: 'reference' }, // tailwind 4: @reference \"../../app.css\";\n\n //! root\n isInRange(packages.tailwind, 0, 1, 2, 3) /*******/ && { type: 'at-rule', name: 'tailwind' }, // tailwind 0,1,2,3 : @tailwind base;\n isInRange(packages.tailwind, 3, 4) /*************/ && { type: 'at-rule', name: 'config' }, // tailwind 3,4: @config 'tailwind.custom.config.js'\n isInRange(packages.tailwind, 4) /****************/ && { type: 'at-rule', name: 'plugin' }, // tailwind 4: @plugin '@tailwindcss/typography'\n isInRange(packages.tailwind, 1, 2, 3) /**********/ && { type: 'at-rule', name: 'layer' }, // tailwind 1,2,3 : @layer base {}\n\n //! variables\n 'dollar-variables', // css: $variable: 10px;\n 'at-variables', // css: @variable: 10px;\n { type: 'at-rule', hasBlock: false }, // css: @variable: 10px;\n 'custom-properties', // css: --property: 10px;\n\n //! tailwind\n isInRange(packages.tailwind, 4) /****************/ && { type: 'at-rule', name: 'theme' }, // tailwind 4: @theme {}\n isInRange(packages.tailwind, 4) /****************/ && { type: 'at-rule', name: 'custom-variant' }, // tailwind 4: @custom-variant pointer-coarse (@media (pointer: coarse));\n\n //! functions, methods\n packages.sass /**********************************/ && { type: 'at-rule', name: 'function' }, // scss: @function sum() {}\n packages.sass /**********************************/ && { type: 'at-rule', name: 'mixin' }, // scss: @mixin mixin-name {}\n isInRange(packages.tailwind, 4) /****************/ && { type: 'at-rule', name: 'utility' }, // tailwind 4: @utility tab-4 { tab-size: 4; }\n\n //! declarations\n packages.sass /**********************************/ && { type: 'at-rule', name: 'extend' }, // scss: @extend .class-name;\n packages.sass /**********************************/ && { type: 'at-rule', name: 'include' }, // scss: @include mixin-name;\n isInRange(packages.tailwind, 0, 1, 2, 3, 4) /****/ && { type: 'at-rule', name: 'apply' }, // tailwind 0,1,2,3,4: @apply p-3;\n 'less-mixins', // less: .mixin();\n 'declarations', // css: display: block;\n\n //! block rules\n { type: 'rule', selector: blockRuleRegex }, // css: &::after {}\n 'rules', // css: child-component {}\n\n //! blocks nested\n packages.sass && { type: 'at-rule', name: 'at-root' }, // scss: @at-root selector { /* content */ }\n isInRange(packages.tailwind, 0, 1, 2) /**********/ && { type: 'at-rule', name: 'responsive' }, // tailwind 0,1,2 : @responsive {}\n isInRange(packages.tailwind, 0, 1, 2) /**********/ && { type: 'at-rule', name: 'variants' }, // tailwind 0,1,2 : @variants hover {}\n isInRange(packages.tailwind, 0, 1, 2) /**********/ && { type: 'at-rule', name: 'screen' }, // tailwind 0,1,2 : @screen sm {}\n isInRange(packages.tailwind, 4) /****************/ && { type: 'at-rule', name: 'variants' }, // tailwind 4: @variant dark {}\n { type: 'at-rule', hasBlock: true }, // css: @media () {}\n ),\n {\n unspecified: 'bottom',\n },\n ]);\n\nexport const order = (packages: Partial<Packages>) =>\n defineRules({\n 'order/order': orderRule(packages),\n });\n","import { defineRule, defineRules } from '~/utils';\n\nexport const selectorPseudoClassNoUnknownRule = defineRule<\n true,\n { ignorePseudoClasses?: (string | RegExp)[] }\n>([true, { ignorePseudoClasses: ['global', 'local'] }]);\n\nexport const selectorPseudoClassNoUnknown = defineRules({\n 'selector-pseudo-class-no-unknown': selectorPseudoClassNoUnknownRule,\n});\n","import type { Packages } from '@culur/utils-packages';\nimport type { Config } from 'stylelint';\nimport { atRuleNoUnknownCSS } from '~/rules/at-rule-no-unknown';\nimport { declarationBlockNoRedundantLonghandProperties } from '~/rules/declaration-block-no-redundant-longhand-properties';\nimport { functionNoUnknown } from '~/rules/function-no-unknown';\nimport { importNotationCSS } from '~/rules/import-notation';\nimport { order } from '~/rules/order';\nimport { selectorPseudoClassNoUnknown } from '~/rules/selector-pseudo-class-no-unknown';\n\nexport const configCss = (packages: Partial<Packages>): Config => ({\n extends: ['stylelint-config-standard', 'stylelint-config-clean-order'],\n plugins: ['stylelint-order', 'stylelint-selector-bem-pattern'],\n rules: {\n ...atRuleNoUnknownCSS(packages),\n ...declarationBlockNoRedundantLonghandProperties,\n ...functionNoUnknown(packages),\n ...importNotationCSS(packages),\n ...order(packages),\n ...selectorPseudoClassNoUnknown,\n 'declaration-empty-line-before': null,\n },\n});\n","import { defineRule, defineRules } from '~/utils';\n\ntype PrimaryOption = string;\ninterface SecondaryOptions {\n message: string;\n}\n\nexport const dollarVariablePatternRule = defineRule<\n PrimaryOption,\n SecondaryOptions\n>([\n '^(-{0,2}?[a-z][a-z0-9]*)(-[a-z0-9]+)*$',\n { message: 'Expected variable to be kebab-case' },\n]);\n\nexport const dollarVariablePatternSCSS = defineRules({\n 'scss/dollar-variable-pattern': dollarVariablePatternRule,\n});\n","import type { Packages } from '@culur/utils-packages';\nimport type { Config } from 'stylelint';\nimport { atRuleNoUnknownSCSS } from '~/rules/at-rule-no-unknown';\nimport { dollarVariablePatternSCSS } from '~/rules/dollar-variable-pattern';\n\nexport const configScss = (packages: Partial<Packages>): Config => ({\n extends: ['stylelint-config-standard-scss'],\n rules: {\n ...atRuleNoUnknownSCSS(packages),\n ...dollarVariablePatternSCSS,\n },\n});\n","import type { Config } from 'stylelint';\n\nexport const configShared = (): Config => ({\n extends: ['stylelint-config-html'],\n});\n","import type { Packages } from '@culur/utils-packages';\nimport type { Config } from 'stylelint';\n\nexport const configVue = (packages: Partial<Packages>): Config => ({\n extends: [\n packages.sass\n ? 'stylelint-config-standard-vue/scss'\n : 'stylelint-config-standard-vue',\n ],\n});\n","import type { Packages } from '@culur/utils-packages';\nimport type { Config } from 'stylelint';\nimport { configCss } from './configs/css';\nimport { configScss } from './configs/scss';\nimport { configShared } from './configs/shared';\nimport { configVue } from './configs/vue';\nimport { mergeConfigs } from './utils';\n\nexport default function defineConfig(\n packages?: Partial<Packages>,\n config?: Config,\n): Config {\n const packages_ = packages ?? {};\n\n return mergeConfigs(\n configShared(),\n configCss(packages_),\n packages_.sass && configScss(packages_),\n packages_.vue && configVue(packages_),\n config,\n );\n}\n"],"mappings":";AAWA,MAAa,cAIX,SACG;AAEL,MAAa,eAA+C,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aACL,aAAa,GACb,UAAU,SAAS,GACnB,UAAU,QAAQ,WAAW,SAAS,GACtC,UAAU,OAAO,UAAU,SAAS,GACpC,MACF;AACF"}
|
|
1
|
+
{"version":3,"file":"factory-DdLX4Vgi.cjs","names":[],"sources":["../src/utils/utils.ts","../src/rules/at-rule-no-unknown.ts","../src/rules/declaration-block-no-redundant-longhand-properties.ts","../src/rules/function-no-unknown.ts","../src/rules/import-notation.ts","../src/rules/order.ts","../src/rules/selector-pseudo-class-no-unknown.ts","../src/configs/css.ts","../src/rules/dollar-variable-pattern.ts","../src/configs/scss.ts","../src/configs/shared.ts","../src/configs/vue.ts","../src/factory.ts"],"sourcesContent":["import type { Config, ConfigRuleSettings } from 'stylelint';\n\n// import type Primary, Secondary from stylelint\n\ntype StringOrRegex = string | RegExp;\ntype OneOrMany<S> = S | S[];\n\nexport type Primary =\n number | true | OneOrMany<StringOrRegex> | Record<string, any>;\nexport type Secondary = Record<string, any>;\n\nexport const defineRule = <\n PrimaryOption extends Primary,\n SecondaryOptions extends Secondary = object,\n>(\n rule: ConfigRuleSettings<PrimaryOption, SecondaryOptions>,\n) => rule;\n\nexport const defineRules = <TRules extends Config['rules']>(rule: TRules) =>\n rule;\n\n// clone function mergeConfigs from stylelint repository\nexport const mergeConfigs = (\n ...configsOrNull: (Config | undefined | null | false)[]\n) => {\n const configs = configsOrNull.filter((c): c is Config => !!c);\n\n return {\n plugins: [...new Set(configs.flatMap(c => c.plugins ?? []))],\n overrides: [...new Set(configs.flatMap(c => c.overrides ?? []))],\n extends: configs\n .flatMap(c => c.extends ?? [])\n .filter((item, index, arr) => arr.lastIndexOf(item) === index),\n rules: configs.reduce(\n (acc, config) => ({ ...acc, ...config.rules }),\n {} as Config['rules'],\n ),\n ...configs.reduce(\n (\n acc,\n { plugins: _p, overrides: _o, extends: _e, rules: _r, ...config },\n ) => ({ ...acc, ...config }),\n {} as Config,\n ),\n };\n};\n\nexport const isInRange = (\n version: false | number | undefined,\n ...versions: number[]\n) => typeof version === 'number' && versions.includes(version);\n","import type { Packages } from '@culur/utils-packages';\nimport { defineRule, defineRules } from '~/utils';\n\nconst getIgnoreAtRulesByTailwindVersion = (\n tailwindVersion: false | number | undefined,\n) => {\n switch (tailwindVersion) {\n // https://tailwindcss-v0.netlify.app//docs/functions-and-directives\n case 0:\n return [\n // Directives\n 'tailwind',\n 'apply',\n\n 'variants',\n 'responsive',\n 'screen',\n ];\n\n // https://v1.tailwindcss.com/docs/functions-and-directives\n // https://v2.tailwindcss.com/docs/functions-and-directives\n case 1:\n case 2:\n return [\n // Directives\n 'tailwind',\n 'apply',\n 'layer', // new\n\n 'variants',\n 'responsive',\n 'screen',\n ];\n\n // https://v3.tailwindcss.com/docs/functions-and-directives\n case 3:\n return [\n // Directives\n 'tailwind',\n 'layer',\n 'apply',\n 'config', // new\n ];\n\n // https://tailwindcss.com/docs/functions-and-directives\n case 4:\n return [\n // Directives\n 'import',\n 'theme',\n 'source',\n 'utility',\n 'variant',\n 'custom-variant',\n 'apply',\n 'reference',\n\n // Compatibility\n 'config',\n 'plugin',\n ];\n\n default:\n return [];\n }\n};\n\nexport const atRuleNoUnknownRule = (packages: Partial<Packages>) =>\n defineRule<true, { ignoreAtRules: (string | RegExp)[] }>([\n true,\n { ignoreAtRules: getIgnoreAtRulesByTailwindVersion(packages.tailwind) },\n ]);\n\nexport const atRuleNoUnknownCSS = (packages: Partial<Packages>) =>\n defineRules({\n 'at-rule-no-unknown': atRuleNoUnknownRule(packages),\n });\n\nexport const atRuleNoUnknownSCSS = (packages: Partial<Packages>) =>\n defineRules({\n 'at-rule-no-unknown': null,\n 'scss/at-rule-no-unknown': atRuleNoUnknownRule(packages),\n });\n","import { defineRule, defineRules } from '~/utils';\n\nexport const declarationBlockNoRedundantLonghandPropertiesRule = defineRule<\n true,\n { ignoreShorthands?: (string | RegExp)[] }\n>([true, { ignoreShorthands: ['grid-template'] }]);\n\nexport const declarationBlockNoRedundantLonghandProperties = defineRules({\n 'declaration-block-no-redundant-longhand-properties':\n declarationBlockNoRedundantLonghandPropertiesRule,\n});\n","import type { Packages } from '@culur/utils-packages';\nimport { defineRule, defineRules } from '~/utils';\n\nconst getIgnoreFunctionsByTailwindVersion = (\n tailwindVersion: false | number | undefined,\n) => {\n switch (tailwindVersion) {\n // https://tailwindcss-v0.netlify.app//docs/functions-and-directives\n case 0:\n return ['config'];\n\n // https://v1.tailwindcss.com/docs/functions-and-directives\n case 1:\n return ['theme'];\n\n // https://v2.tailwindcss.com/docs/functions-and-directives\n case 2:\n return ['screen', 'theme'];\n\n // https://v3.tailwindcss.com/docs/functions-and-directives\n case 3:\n return ['theme', 'screen'];\n\n // https://tailwindcss.com/docs/functions-and-directives\n case 4:\n return ['--alpha', '--spacing', 'theme'];\n\n default:\n return [];\n }\n};\n\nconst sassFunctionRegex = /^(list|math|color)\\..+/;\nconst getIgnoreFunctions = (packages: Partial<Packages>) => [\n // https://tailwindcss.com\n ...getIgnoreFunctionsByTailwindVersion(packages.tailwind),\n\n // https://sass-lang.com/documentation/modules/list\n // https://sass-lang.com/documentation/modules/math\n // https://sass-lang.com/documentation/modules/color\n ...(packages.sass //\n ? [sassFunctionRegex]\n : []),\n\n // https://vuejs.org/api/sfc-css-features.html#v-bind-in-css\n ...(packages.vue //\n ? ['v-bind']\n : []),\n];\n\nexport function functionNoUnknownRule(packages: Partial<Packages>) {\n return defineRule<true, { ignoreFunctions: (string | RegExp)[] }>([\n true,\n { ignoreFunctions: getIgnoreFunctions(packages) },\n ]);\n}\n\nexport const functionNoUnknown = (packages: Partial<Packages>) =>\n defineRules({\n 'function-no-unknown': functionNoUnknownRule(packages),\n });\n","import type { Packages } from '@culur/utils-packages';\nimport { defineRules, isInRange } from '~/utils';\n\nexport const importNotationCSS = (packages: Partial<Packages>) =>\n defineRules(\n isInRange(packages.tailwind, 4) //\n ? { 'import-notation': null }\n : {},\n );\n","import type { Packages } from '@culur/utils-packages';\nimport { defineRule, defineRules, isInRange } from '~/utils';\n\n// https://github.com/hudochenkov/stylelint-order/blob/master/rules/order/README.md#options\n\ntype Keyword =\n | 'custom-properties' /**/ // Custom properties (e.g. --property: 10px;)\n | 'dollar-variables' /***/ // Dollar variables (e.g. $variable)\n | 'at-variables' /*******/ // At-variables (e.g. @variable available in Less syntax)\n | 'declarations' /*******/ // CSS declarations (e.g. display: block)\n | 'rules' /**************/ // Nested rules (e.g. a { span {} })\n | 'at-rules' /***********/ // Nested at-rules (e.g. div { @media () {} })\n | 'less-mixins'; /*******/ // Mixins in Less syntax (e.g. .mixin();)\n\ninterface AtRule {\n type: 'at-rule';\n name?: string;\n parameter?: string | RegExp;\n hasBlock?: boolean;\n}\n\ninterface Rule {\n type: 'rule';\n selector?: string | RegExp;\n name?: string;\n}\n\ntype PrimaryOption = Array<Keyword | AtRule | Rule>;\ninterface SecondaryOptions {\n unspecified?: 'top' | 'bottom' | 'ignore';\n}\n\nconst definePrimaryOption = (...options: (PrimaryOption[number] | false | undefined)[]) =>\n options.filter((option): option is PrimaryOption[number] => !!option);\n\nconst blockRuleRegex = /^&::[\\w-]+/;\n\nexport const orderRule = (packages: Partial<Packages>) =>\n defineRule<PrimaryOption, SecondaryOptions>([\n definePrimaryOption(\n //! import\n packages.sass /**********************************/ && { type: 'at-rule', name: 'use' }, // scss: @use 'path/path';\n packages.sass /**********************************/ && { type: 'at-rule', name: 'forward' }, // scss: @forward 'path/path';\n packages.sass /**********************************/ && { type: 'at-rule', name: 'import' }, // scss: @import 'path/path';\n isInRange(packages.tailwind, 4) /****************/ && { type: 'at-rule', name: 'import' }, // tailwind 4: @import \"tailwindcss\";\n isInRange(packages.tailwind, 4) /****************/ && { type: 'at-rule', name: 'source' }, // tailwind 4: @source \"../node_modules/@culur/ui-lib\";\n isInRange(packages.tailwind, 4) /****************/ && { type: 'at-rule', name: 'reference' }, // tailwind 4: @reference \"../../app.css\";\n\n //! root\n isInRange(packages.tailwind, 0, 1, 2, 3) /*******/ && { type: 'at-rule', name: 'tailwind' }, // tailwind 0,1,2,3 : @tailwind base;\n isInRange(packages.tailwind, 3, 4) /*************/ && { type: 'at-rule', name: 'config' }, // tailwind 3,4: @config 'tailwind.custom.config.js'\n isInRange(packages.tailwind, 4) /****************/ && { type: 'at-rule', name: 'plugin' }, // tailwind 4: @plugin '@tailwindcss/typography'\n isInRange(packages.tailwind, 1, 2, 3) /**********/ && { type: 'at-rule', name: 'layer' }, // tailwind 1,2,3 : @layer base {}\n\n //! variables\n 'dollar-variables', // css: $variable: 10px;\n 'at-variables', // css: @variable: 10px;\n { type: 'at-rule', hasBlock: false }, // css: @variable: 10px;\n 'custom-properties', // css: --property: 10px;\n\n //! tailwind\n isInRange(packages.tailwind, 4) /****************/ && { type: 'at-rule', name: 'theme' }, // tailwind 4: @theme {}\n isInRange(packages.tailwind, 4) /****************/ && { type: 'at-rule', name: 'custom-variant' }, // tailwind 4: @custom-variant pointer-coarse (@media (pointer: coarse));\n\n //! functions, methods\n packages.sass /**********************************/ && { type: 'at-rule', name: 'function' }, // scss: @function sum() {}\n packages.sass /**********************************/ && { type: 'at-rule', name: 'mixin' }, // scss: @mixin mixin-name {}\n isInRange(packages.tailwind, 4) /****************/ && { type: 'at-rule', name: 'utility' }, // tailwind 4: @utility tab-4 { tab-size: 4; }\n\n //! declarations\n packages.sass /**********************************/ && { type: 'at-rule', name: 'extend' }, // scss: @extend .class-name;\n packages.sass /**********************************/ && { type: 'at-rule', name: 'include' }, // scss: @include mixin-name;\n isInRange(packages.tailwind, 0, 1, 2, 3, 4) /****/ && { type: 'at-rule', name: 'apply' }, // tailwind 0,1,2,3,4: @apply p-3;\n 'less-mixins', // less: .mixin();\n 'declarations', // css: display: block;\n\n //! block rules\n { type: 'rule', selector: blockRuleRegex }, // css: &::after {}\n 'rules', // css: child-component {}\n\n //! blocks nested\n packages.sass && { type: 'at-rule', name: 'at-root' }, // scss: @at-root selector { /* content */ }\n isInRange(packages.tailwind, 0, 1, 2) /**********/ && { type: 'at-rule', name: 'responsive' }, // tailwind 0,1,2 : @responsive {}\n isInRange(packages.tailwind, 0, 1, 2) /**********/ && { type: 'at-rule', name: 'variants' }, // tailwind 0,1,2 : @variants hover {}\n isInRange(packages.tailwind, 0, 1, 2) /**********/ && { type: 'at-rule', name: 'screen' }, // tailwind 0,1,2 : @screen sm {}\n isInRange(packages.tailwind, 4) /****************/ && { type: 'at-rule', name: 'variants' }, // tailwind 4: @variant dark {}\n { type: 'at-rule', hasBlock: true }, // css: @media () {}\n ),\n {\n unspecified: 'bottom',\n },\n ]);\n\nexport const order = (packages: Partial<Packages>) =>\n defineRules({\n 'order/order': orderRule(packages),\n });\n","import { defineRule, defineRules } from '~/utils';\n\nexport const selectorPseudoClassNoUnknownRule = defineRule<\n true,\n { ignorePseudoClasses?: (string | RegExp)[] }\n>([true, { ignorePseudoClasses: ['global', 'local'] }]);\n\nexport const selectorPseudoClassNoUnknown = defineRules({\n 'selector-pseudo-class-no-unknown': selectorPseudoClassNoUnknownRule,\n});\n","import type { Packages } from '@culur/utils-packages';\nimport type { Config } from 'stylelint';\nimport { atRuleNoUnknownCSS } from '~/rules/at-rule-no-unknown';\nimport { declarationBlockNoRedundantLonghandProperties } from '~/rules/declaration-block-no-redundant-longhand-properties';\nimport { functionNoUnknown } from '~/rules/function-no-unknown';\nimport { importNotationCSS } from '~/rules/import-notation';\nimport { order } from '~/rules/order';\nimport { selectorPseudoClassNoUnknown } from '~/rules/selector-pseudo-class-no-unknown';\n\nexport const configCss = (packages: Partial<Packages>): Config => ({\n extends: ['stylelint-config-standard', 'stylelint-config-clean-order'],\n plugins: ['stylelint-order', 'stylelint-selector-bem-pattern'],\n rules: {\n ...atRuleNoUnknownCSS(packages),\n ...declarationBlockNoRedundantLonghandProperties,\n ...functionNoUnknown(packages),\n ...importNotationCSS(packages),\n ...order(packages),\n ...selectorPseudoClassNoUnknown,\n 'declaration-empty-line-before': null,\n },\n});\n","import { defineRule, defineRules } from '~/utils';\n\ntype PrimaryOption = string;\ninterface SecondaryOptions {\n message: string;\n}\n\nexport const dollarVariablePatternRule = defineRule<\n PrimaryOption,\n SecondaryOptions\n>([\n '^(-{0,2}?[a-z][a-z0-9]*)(-[a-z0-9]+)*$',\n { message: 'Expected variable to be kebab-case' },\n]);\n\nexport const dollarVariablePatternSCSS = defineRules({\n 'scss/dollar-variable-pattern': dollarVariablePatternRule,\n});\n","import type { Packages } from '@culur/utils-packages';\nimport type { Config } from 'stylelint';\nimport { atRuleNoUnknownSCSS } from '~/rules/at-rule-no-unknown';\nimport { dollarVariablePatternSCSS } from '~/rules/dollar-variable-pattern';\n\nexport const configScss = (packages: Partial<Packages>): Config => ({\n extends: ['stylelint-config-standard-scss'],\n rules: {\n ...atRuleNoUnknownSCSS(packages),\n ...dollarVariablePatternSCSS,\n },\n});\n","import type { Config } from 'stylelint';\n\nexport const configShared = (): Config => ({\n extends: ['stylelint-config-html'],\n});\n","import type { Packages } from '@culur/utils-packages';\nimport type { Config } from 'stylelint';\n\nexport const configVue = (packages: Partial<Packages>): Config => ({\n extends: [\n packages.sass\n ? 'stylelint-config-standard-vue/scss'\n : 'stylelint-config-standard-vue',\n ],\n});\n","import type { Packages } from '@culur/utils-packages';\nimport type { Config } from 'stylelint';\nimport { configCss } from './configs/css';\nimport { configScss } from './configs/scss';\nimport { configShared } from './configs/shared';\nimport { configVue } from './configs/vue';\nimport { mergeConfigs } from './utils';\n\nexport default function defineConfig(\n packages?: Partial<Packages>,\n config?: Config,\n): Config {\n const packages_ = packages ?? {};\n\n return mergeConfigs(\n configShared(),\n configCss(packages_),\n packages_.sass && configScss(packages_),\n packages_.vue && configVue(packages_),\n config,\n );\n}\n"],"mappings":";AAWA,MAAa,cAIX,SACG;AAEL,MAAa,eAA+C,SAC1D;AAGF,MAAa,gBACX,GAAG,kBACA;CACH,MAAM,UAAU,cAAc,QAAQ,MAAmB,CAAC,CAAC,CAAC;CAE5D,OAAO;EACL,SAAS,CAAC,GAAG,IAAI,IAAI,QAAQ,SAAQ,MAAK,EAAE,WAAW,CAAC,CAAC,CAAC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= require("./factory-DdLX4Vgi.cjs");
|
|
2
2
|
module.exports = require_factory.defineConfig;
|
package/dist/factory.d.cts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { Packages } from "@culur/utils-packages";
|
|
2
2
|
import { Config } from "stylelint";
|
|
3
|
-
//#region src/factory.d.ts
|
|
4
3
|
declare function defineConfig(packages?: Partial<Packages>, config?: Config): Config;
|
|
5
|
-
export = defineConfig;
|
|
6
|
-
//# sourceMappingURL=factory.d.cts.map
|
|
4
|
+
export = defineConfig;
|
package/dist/factory.d.mts
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
1
|
import { Packages } from "@culur/utils-packages";
|
|
2
2
|
import { Config } from "stylelint";
|
|
3
|
-
|
|
4
|
-
declare function defineConfig(packages?: Partial<Packages>, config?: Config): Config;
|
|
5
|
-
//#endregion
|
|
6
|
-
export { defineConfig as default };
|
|
7
|
-
//# sourceMappingURL=factory.d.mts.map
|
|
3
|
+
export default function defineConfig(packages?: Partial<Packages>, config?: Config): Config;
|
package/dist/factory.mjs
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { defineConfig as default };
|
|
1
|
+
export { t as default } from "./factory-CtV8XN1h.mjs";
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
const require_factory = require("../factory-
|
|
2
|
-
|
|
1
|
+
const require_factory = require("../factory-DdLX4Vgi.cjs");
|
|
2
|
+
// src/shareable-configs/auto.ts
|
|
3
3
|
const { tailwindVersion, hasSass, hasVue } = (0, require("@culur/utils-packages").defineHasPackages)();
|
|
4
4
|
var auto_default = require_factory.defineConfig({
|
|
5
5
|
tailwind: tailwindVersion(),
|
|
6
6
|
sass: hasSass(),
|
|
7
7
|
vue: hasVue()
|
|
8
8
|
});
|
|
9
|
-
//#endregion
|
|
10
9
|
module.exports = auto_default;
|
|
11
10
|
|
|
12
11
|
//# sourceMappingURL=auto.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auto.cjs","names":["defineConfig"],"sources":["../../src/shareable-configs/auto.ts"],"sourcesContent":["import { defineHasPackages } from '@culur/utils-packages';\nimport defineConfig from '~/factory';\n\nconst { tailwindVersion, hasSass, hasVue } = defineHasPackages();\n\nexport default defineConfig({\n tailwind: tailwindVersion(),\n sass: hasSass(),\n vue: hasVue(),\n});\n"],"mappings":";;AAGA,MAAM,EAAE,iBAAiB,SAAS,YAAA,
|
|
1
|
+
{"version":3,"file":"auto.cjs","names":["defineHasPackages","defineConfig"],"sources":["../../src/shareable-configs/auto.ts"],"sourcesContent":["import { defineHasPackages } from '@culur/utils-packages';\nimport defineConfig from '~/factory';\n\nconst { tailwindVersion, hasSass, hasVue } = defineHasPackages();\n\nexport default defineConfig({\n tailwind: tailwindVersion(),\n sass: hasSass(),\n vue: hasVue(),\n});\n"],"mappings":";;AAGA,MAAM,EAAE,iBAAiB,SAAS,YAAA,G,+BAAWA,CAAAA,CAAAA,kBAAAA,CAAkB;AAE/D,IAAA,eAAeC,gBAAAA,aAAa;CAC1B,UAAU,gBAAgB;CAC1B,MAAM,QAAQ;CACd,KAAK,OAAO;AACd,CAAC"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { t as defineConfig } from "../factory-
|
|
1
|
+
import { t as defineConfig } from "../factory-CtV8XN1h.mjs";
|
|
2
2
|
import { defineHasPackages } from "@culur/utils-packages";
|
|
3
|
-
|
|
3
|
+
// src/shareable-configs/auto.ts
|
|
4
4
|
const { tailwindVersion, hasSass, hasVue } = defineHasPackages();
|
|
5
5
|
var auto_default = defineConfig({
|
|
6
6
|
tailwind: tailwindVersion(),
|
|
7
7
|
sass: hasSass(),
|
|
8
8
|
vue: hasVue()
|
|
9
9
|
});
|
|
10
|
-
//#endregion
|
|
11
10
|
export { auto_default as default };
|
|
12
11
|
|
|
13
12
|
//# sourceMappingURL=auto.mjs.map
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
var none_default = require("../factory-
|
|
1
|
+
// src/shareable-configs/none.ts
|
|
2
|
+
var none_default = require("../factory-DdLX4Vgi.cjs").defineConfig({
|
|
3
3
|
tailwind: false,
|
|
4
4
|
sass: false,
|
|
5
5
|
vue: false
|
|
6
6
|
});
|
|
7
|
-
//#endregion
|
|
8
7
|
module.exports = none_default;
|
|
9
8
|
|
|
10
9
|
//# sourceMappingURL=none.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"none.cjs","names":["defineConfig"],"sources":["../../src/shareable-configs/none.ts"],"sourcesContent":["import defineConfig from '~/factory';\n\nexport default defineConfig({\n tailwind: false,\n sass: false,\n vue: false,\n});\n"],"mappings":";AAEA,IAAA,
|
|
1
|
+
{"version":3,"file":"none.cjs","names":["defineConfig"],"sources":["../../src/shareable-configs/none.ts"],"sourcesContent":["import defineConfig from '~/factory';\n\nexport default defineConfig({\n tailwind: false,\n sass: false,\n vue: false,\n});\n"],"mappings":";AAEA,IAAA,e,iCAAeA,CAAAA,CAAAA,aAAa;CAC1B,UAAU;CACV,MAAM;CACN,KAAK;AACP,CAAC"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { t as defineConfig } from "../factory-
|
|
2
|
-
|
|
1
|
+
import { t as defineConfig } from "../factory-CtV8XN1h.mjs";
|
|
2
|
+
// src/shareable-configs/none.ts
|
|
3
3
|
var none_default = defineConfig({
|
|
4
4
|
tailwind: false,
|
|
5
5
|
sass: false,
|
|
6
6
|
vue: false
|
|
7
7
|
});
|
|
8
|
-
//#endregion
|
|
9
8
|
export { none_default as default };
|
|
10
9
|
|
|
11
10
|
//# sourceMappingURL=none.mjs.map
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
var sass_vue_default = require("../factory-
|
|
1
|
+
// src/shareable-configs/sass-vue.ts
|
|
2
|
+
var sass_vue_default = require("../factory-DdLX4Vgi.cjs").defineConfig({
|
|
3
3
|
tailwind: false,
|
|
4
4
|
sass: true,
|
|
5
5
|
vue: true
|
|
6
6
|
});
|
|
7
|
-
//#endregion
|
|
8
7
|
module.exports = sass_vue_default;
|
|
9
8
|
|
|
10
9
|
//# sourceMappingURL=sass-vue.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sass-vue.cjs","names":["defineConfig"],"sources":["../../src/shareable-configs/sass-vue.ts"],"sourcesContent":["import defineConfig from '~/factory';\n\nexport default defineConfig({\n tailwind: false,\n sass: true,\n vue: true,\n});\n"],"mappings":";AAEA,IAAA,
|
|
1
|
+
{"version":3,"file":"sass-vue.cjs","names":["defineConfig"],"sources":["../../src/shareable-configs/sass-vue.ts"],"sourcesContent":["import defineConfig from '~/factory';\n\nexport default defineConfig({\n tailwind: false,\n sass: true,\n vue: true,\n});\n"],"mappings":";AAEA,IAAA,mB,iCAAeA,CAAAA,CAAAA,aAAa;CAC1B,UAAU;CACV,MAAM;CACN,KAAK;AACP,CAAC"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { t as defineConfig } from "../factory-
|
|
2
|
-
|
|
1
|
+
import { t as defineConfig } from "../factory-CtV8XN1h.mjs";
|
|
2
|
+
// src/shareable-configs/sass-vue.ts
|
|
3
3
|
var sass_vue_default = defineConfig({
|
|
4
4
|
tailwind: false,
|
|
5
5
|
sass: true,
|
|
6
6
|
vue: true
|
|
7
7
|
});
|
|
8
|
-
//#endregion
|
|
9
8
|
export { sass_vue_default as default };
|
|
10
9
|
|
|
11
10
|
//# sourceMappingURL=sass-vue.mjs.map
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
var sass_default = require("../factory-
|
|
1
|
+
// src/shareable-configs/sass.ts
|
|
2
|
+
var sass_default = require("../factory-DdLX4Vgi.cjs").defineConfig({
|
|
3
3
|
tailwind: false,
|
|
4
4
|
sass: true,
|
|
5
5
|
vue: false
|
|
6
6
|
});
|
|
7
|
-
//#endregion
|
|
8
7
|
module.exports = sass_default;
|
|
9
8
|
|
|
10
9
|
//# sourceMappingURL=sass.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sass.cjs","names":["defineConfig"],"sources":["../../src/shareable-configs/sass.ts"],"sourcesContent":["import defineConfig from '~/factory';\n\nexport default defineConfig({\n tailwind: false,\n sass: true,\n vue: false,\n});\n"],"mappings":";AAEA,IAAA,
|
|
1
|
+
{"version":3,"file":"sass.cjs","names":["defineConfig"],"sources":["../../src/shareable-configs/sass.ts"],"sourcesContent":["import defineConfig from '~/factory';\n\nexport default defineConfig({\n tailwind: false,\n sass: true,\n vue: false,\n});\n"],"mappings":";AAEA,IAAA,e,iCAAeA,CAAAA,CAAAA,aAAa;CAC1B,UAAU;CACV,MAAM;CACN,KAAK;AACP,CAAC"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { t as defineConfig } from "../factory-
|
|
2
|
-
|
|
1
|
+
import { t as defineConfig } from "../factory-CtV8XN1h.mjs";
|
|
2
|
+
// src/shareable-configs/sass.ts
|
|
3
3
|
var sass_default = defineConfig({
|
|
4
4
|
tailwind: false,
|
|
5
5
|
sass: true,
|
|
6
6
|
vue: false
|
|
7
7
|
});
|
|
8
|
-
//#endregion
|
|
9
8
|
export { sass_default as default };
|
|
10
9
|
|
|
11
10
|
//# sourceMappingURL=sass.mjs.map
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
var tailwind3_sass_vue_default = require("../factory-
|
|
1
|
+
// src/shareable-configs/tailwind3-sass-vue.ts
|
|
2
|
+
var tailwind3_sass_vue_default = require("../factory-DdLX4Vgi.cjs").defineConfig({
|
|
3
3
|
tailwind: 3,
|
|
4
4
|
sass: true,
|
|
5
5
|
vue: true
|
|
6
6
|
});
|
|
7
|
-
//#endregion
|
|
8
7
|
module.exports = tailwind3_sass_vue_default;
|
|
9
8
|
|
|
10
9
|
//# sourceMappingURL=tailwind3-sass-vue.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tailwind3-sass-vue.cjs","names":["defineConfig"],"sources":["../../src/shareable-configs/tailwind3-sass-vue.ts"],"sourcesContent":["import defineConfig from '~/factory';\n\nexport default defineConfig({\n tailwind: 3,\n sass: true,\n vue: true,\n});\n"],"mappings":";AAEA,IAAA,
|
|
1
|
+
{"version":3,"file":"tailwind3-sass-vue.cjs","names":["defineConfig"],"sources":["../../src/shareable-configs/tailwind3-sass-vue.ts"],"sourcesContent":["import defineConfig from '~/factory';\n\nexport default defineConfig({\n tailwind: 3,\n sass: true,\n vue: true,\n});\n"],"mappings":";AAEA,IAAA,6B,iCAAeA,CAAAA,CAAAA,aAAa;CAC1B,UAAU;CACV,MAAM;CACN,KAAK;AACP,CAAC"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { t as defineConfig } from "../factory-
|
|
2
|
-
|
|
1
|
+
import { t as defineConfig } from "../factory-CtV8XN1h.mjs";
|
|
2
|
+
// src/shareable-configs/tailwind3-sass-vue.ts
|
|
3
3
|
var tailwind3_sass_vue_default = defineConfig({
|
|
4
4
|
tailwind: 3,
|
|
5
5
|
sass: true,
|
|
6
6
|
vue: true
|
|
7
7
|
});
|
|
8
|
-
//#endregion
|
|
9
8
|
export { tailwind3_sass_vue_default as default };
|
|
10
9
|
|
|
11
10
|
//# sourceMappingURL=tailwind3-sass-vue.mjs.map
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
var tailwind3_sass_default = require("../factory-
|
|
1
|
+
// src/shareable-configs/tailwind3-sass.ts
|
|
2
|
+
var tailwind3_sass_default = require("../factory-DdLX4Vgi.cjs").defineConfig({
|
|
3
3
|
tailwind: 3,
|
|
4
4
|
sass: true,
|
|
5
5
|
vue: false
|
|
6
6
|
});
|
|
7
|
-
//#endregion
|
|
8
7
|
module.exports = tailwind3_sass_default;
|
|
9
8
|
|
|
10
9
|
//# sourceMappingURL=tailwind3-sass.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tailwind3-sass.cjs","names":["defineConfig"],"sources":["../../src/shareable-configs/tailwind3-sass.ts"],"sourcesContent":["import defineConfig from '~/factory';\n\nexport default defineConfig({\n tailwind: 3,\n sass: true,\n vue: false,\n});\n"],"mappings":";AAEA,IAAA,
|
|
1
|
+
{"version":3,"file":"tailwind3-sass.cjs","names":["defineConfig"],"sources":["../../src/shareable-configs/tailwind3-sass.ts"],"sourcesContent":["import defineConfig from '~/factory';\n\nexport default defineConfig({\n tailwind: 3,\n sass: true,\n vue: false,\n});\n"],"mappings":";AAEA,IAAA,yB,iCAAeA,CAAAA,CAAAA,aAAa;CAC1B,UAAU;CACV,MAAM;CACN,KAAK;AACP,CAAC"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { t as defineConfig } from "../factory-
|
|
2
|
-
|
|
1
|
+
import { t as defineConfig } from "../factory-CtV8XN1h.mjs";
|
|
2
|
+
// src/shareable-configs/tailwind3-sass.ts
|
|
3
3
|
var tailwind3_sass_default = defineConfig({
|
|
4
4
|
tailwind: 3,
|
|
5
5
|
sass: true,
|
|
6
6
|
vue: false
|
|
7
7
|
});
|
|
8
|
-
//#endregion
|
|
9
8
|
export { tailwind3_sass_default as default };
|
|
10
9
|
|
|
11
10
|
//# sourceMappingURL=tailwind3-sass.mjs.map
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
var tailwind3_default = require("../factory-
|
|
1
|
+
// src/shareable-configs/tailwind3.ts
|
|
2
|
+
var tailwind3_default = require("../factory-DdLX4Vgi.cjs").defineConfig({
|
|
3
3
|
tailwind: 3,
|
|
4
4
|
sass: false,
|
|
5
5
|
vue: false
|
|
6
6
|
});
|
|
7
|
-
//#endregion
|
|
8
7
|
module.exports = tailwind3_default;
|
|
9
8
|
|
|
10
9
|
//# sourceMappingURL=tailwind3.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tailwind3.cjs","names":["defineConfig"],"sources":["../../src/shareable-configs/tailwind3.ts"],"sourcesContent":["import defineConfig from '~/factory';\n\nexport default defineConfig({\n tailwind: 3,\n sass: false,\n vue: false,\n});\n"],"mappings":";AAEA,IAAA,
|
|
1
|
+
{"version":3,"file":"tailwind3.cjs","names":["defineConfig"],"sources":["../../src/shareable-configs/tailwind3.ts"],"sourcesContent":["import defineConfig from '~/factory';\n\nexport default defineConfig({\n tailwind: 3,\n sass: false,\n vue: false,\n});\n"],"mappings":";AAEA,IAAA,oB,iCAAeA,CAAAA,CAAAA,aAAa;CAC1B,UAAU;CACV,MAAM;CACN,KAAK;AACP,CAAC"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { t as defineConfig } from "../factory-
|
|
2
|
-
|
|
1
|
+
import { t as defineConfig } from "../factory-CtV8XN1h.mjs";
|
|
2
|
+
// src/shareable-configs/tailwind3.ts
|
|
3
3
|
var tailwind3_default = defineConfig({
|
|
4
4
|
tailwind: 3,
|
|
5
5
|
sass: false,
|
|
6
6
|
vue: false
|
|
7
7
|
});
|
|
8
|
-
//#endregion
|
|
9
8
|
export { tailwind3_default as default };
|
|
10
9
|
|
|
11
10
|
//# sourceMappingURL=tailwind3.mjs.map
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
var tailwind4_vue_default = require("../factory-
|
|
1
|
+
// src/shareable-configs/tailwind4-vue.ts
|
|
2
|
+
var tailwind4_vue_default = require("../factory-DdLX4Vgi.cjs").defineConfig({
|
|
3
3
|
tailwind: 4,
|
|
4
4
|
sass: false,
|
|
5
5
|
vue: true
|
|
6
6
|
});
|
|
7
|
-
//#endregion
|
|
8
7
|
module.exports = tailwind4_vue_default;
|
|
9
8
|
|
|
10
9
|
//# sourceMappingURL=tailwind4-vue.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tailwind4-vue.cjs","names":["defineConfig"],"sources":["../../src/shareable-configs/tailwind4-vue.ts"],"sourcesContent":["import defineConfig from '~/factory';\n\nexport default defineConfig({\n tailwind: 4,\n sass: false,\n vue: true,\n});\n"],"mappings":";AAEA,IAAA,
|
|
1
|
+
{"version":3,"file":"tailwind4-vue.cjs","names":["defineConfig"],"sources":["../../src/shareable-configs/tailwind4-vue.ts"],"sourcesContent":["import defineConfig from '~/factory';\n\nexport default defineConfig({\n tailwind: 4,\n sass: false,\n vue: true,\n});\n"],"mappings":";AAEA,IAAA,wB,iCAAeA,CAAAA,CAAAA,aAAa;CAC1B,UAAU;CACV,MAAM;CACN,KAAK;AACP,CAAC"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { t as defineConfig } from "../factory-
|
|
2
|
-
|
|
1
|
+
import { t as defineConfig } from "../factory-CtV8XN1h.mjs";
|
|
2
|
+
// src/shareable-configs/tailwind4-vue.ts
|
|
3
3
|
var tailwind4_vue_default = defineConfig({
|
|
4
4
|
tailwind: 4,
|
|
5
5
|
sass: false,
|
|
6
6
|
vue: true
|
|
7
7
|
});
|
|
8
|
-
//#endregion
|
|
9
8
|
export { tailwind4_vue_default as default };
|
|
10
9
|
|
|
11
10
|
//# sourceMappingURL=tailwind4-vue.mjs.map
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
var tailwind4_default = require("../factory-
|
|
1
|
+
// src/shareable-configs/tailwind4.ts
|
|
2
|
+
var tailwind4_default = require("../factory-DdLX4Vgi.cjs").defineConfig({
|
|
3
3
|
tailwind: 4,
|
|
4
4
|
sass: false,
|
|
5
5
|
vue: false
|
|
6
6
|
});
|
|
7
|
-
//#endregion
|
|
8
7
|
module.exports = tailwind4_default;
|
|
9
8
|
|
|
10
9
|
//# sourceMappingURL=tailwind4.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tailwind4.cjs","names":["defineConfig"],"sources":["../../src/shareable-configs/tailwind4.ts"],"sourcesContent":["import defineConfig from '~/factory';\n\nexport default defineConfig({\n tailwind: 4,\n sass: false,\n vue: false,\n});\n"],"mappings":";AAEA,IAAA,
|
|
1
|
+
{"version":3,"file":"tailwind4.cjs","names":["defineConfig"],"sources":["../../src/shareable-configs/tailwind4.ts"],"sourcesContent":["import defineConfig from '~/factory';\n\nexport default defineConfig({\n tailwind: 4,\n sass: false,\n vue: false,\n});\n"],"mappings":";AAEA,IAAA,oB,iCAAeA,CAAAA,CAAAA,aAAa;CAC1B,UAAU;CACV,MAAM;CACN,KAAK;AACP,CAAC"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { t as defineConfig } from "../factory-
|
|
2
|
-
|
|
1
|
+
import { t as defineConfig } from "../factory-CtV8XN1h.mjs";
|
|
2
|
+
// src/shareable-configs/tailwind4.ts
|
|
3
3
|
var tailwind4_default = defineConfig({
|
|
4
4
|
tailwind: 4,
|
|
5
5
|
sass: false,
|
|
6
6
|
vue: false
|
|
7
7
|
});
|
|
8
|
-
//#endregion
|
|
9
8
|
export { tailwind4_default as default };
|
|
10
9
|
|
|
11
10
|
//# sourceMappingURL=tailwind4.mjs.map
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
var vue_default = require("../factory-
|
|
1
|
+
// src/shareable-configs/vue.ts
|
|
2
|
+
var vue_default = require("../factory-DdLX4Vgi.cjs").defineConfig({
|
|
3
3
|
tailwind: false,
|
|
4
4
|
sass: false,
|
|
5
5
|
vue: true
|
|
6
6
|
});
|
|
7
|
-
//#endregion
|
|
8
7
|
module.exports = vue_default;
|
|
9
8
|
|
|
10
9
|
//# sourceMappingURL=vue.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vue.cjs","names":["defineConfig"],"sources":["../../src/shareable-configs/vue.ts"],"sourcesContent":["import defineConfig from '~/factory';\n\nexport default defineConfig({\n tailwind: false,\n sass: false,\n vue: true,\n});\n"],"mappings":";AAEA,IAAA
|
|
1
|
+
{"version":3,"file":"vue.cjs","names":["defineConfig"],"sources":["../../src/shareable-configs/vue.ts"],"sourcesContent":["import defineConfig from '~/factory';\n\nexport default defineConfig({\n tailwind: false,\n sass: false,\n vue: true,\n});\n"],"mappings":";AAEA,IAAA,c,iCAAeA,CAAAA,CAAAA,aAAa;CAC1B,UAAU;CACV,MAAM;CACN,KAAK;AACP,CAAC"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { t as defineConfig } from "../factory-
|
|
2
|
-
|
|
1
|
+
import { t as defineConfig } from "../factory-CtV8XN1h.mjs";
|
|
2
|
+
// src/shareable-configs/vue.ts
|
|
3
3
|
var vue_default = defineConfig({
|
|
4
4
|
tailwind: false,
|
|
5
5
|
sass: false,
|
|
6
6
|
vue: true
|
|
7
7
|
});
|
|
8
|
-
//#endregion
|
|
9
8
|
export { vue_default as default };
|
|
10
9
|
|
|
11
10
|
//# sourceMappingURL=vue.mjs.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@culur/config-stylelint",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Culur's stylelint configuration",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -70,39 +70,41 @@
|
|
|
70
70
|
"node": ">=20"
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
|
+
"@culur/utils-packages": "1.3.2",
|
|
73
74
|
"stylelint-config-clean-order": "^10.0.0",
|
|
74
75
|
"stylelint-config-html": "^1.1.0",
|
|
75
76
|
"stylelint-config-standard": "^40.0.0",
|
|
76
|
-
"stylelint-
|
|
77
|
-
"stylelint-
|
|
78
|
-
"stylelint-order": "^8.1.1",
|
|
79
|
-
"stylelint-scss": "^7.2.0",
|
|
80
|
-
"stylelint-selector-bem-pattern": "^5.0.0",
|
|
81
|
-
"@culur/utils-packages": "1.3.1"
|
|
77
|
+
"stylelint-order": "^8.1.3",
|
|
78
|
+
"stylelint-selector-bem-pattern": "^5.0.0"
|
|
82
79
|
},
|
|
83
80
|
"devDependencies": {
|
|
81
|
+
"@culur/config-tsdown": "1.1.3",
|
|
82
|
+
"@culur/config-typescript": "2.0.1",
|
|
84
83
|
"dedent": "^1.7.2",
|
|
85
|
-
"postcss": "^8.5.
|
|
84
|
+
"postcss": "^8.5.32",
|
|
86
85
|
"postcss-html": "^1.8.1",
|
|
87
86
|
"postcss-sass": "^0.5.0",
|
|
88
87
|
"postcss-scss": "^4.0.9",
|
|
89
|
-
"stylelint": "^17.
|
|
90
|
-
"
|
|
91
|
-
"
|
|
88
|
+
"stylelint": "^17.16.0",
|
|
89
|
+
"stylelint-config-standard-scss": "^17.0.0",
|
|
90
|
+
"stylelint-config-standard-vue": "^1.0.0",
|
|
91
|
+
"stylelint-scss": "^7.4.0"
|
|
92
92
|
},
|
|
93
93
|
"peerDependencies": {
|
|
94
|
-
"stylelint": ">=17.0.0"
|
|
94
|
+
"stylelint": ">=17.0.0",
|
|
95
|
+
"stylelint-config-standard-scss": "^17.0.0",
|
|
96
|
+
"stylelint-config-standard-vue": "^1.0.0",
|
|
97
|
+
"stylelint-scss": "^7.4.0"
|
|
95
98
|
},
|
|
96
|
-
"
|
|
97
|
-
"
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
"
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
"
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
"fix:es": "eslint --fix"
|
|
99
|
+
"peerDependenciesMeta": {
|
|
100
|
+
"stylelint-config-standard-scss": {
|
|
101
|
+
"optional": true
|
|
102
|
+
},
|
|
103
|
+
"stylelint-config-standard-vue": {
|
|
104
|
+
"optional": true
|
|
105
|
+
},
|
|
106
|
+
"stylelint-scss": {
|
|
107
|
+
"optional": true
|
|
108
|
+
}
|
|
107
109
|
}
|
|
108
110
|
}
|