From 5f6d19fd352a93ffb781cfc7f8dd282e8111607f Mon Sep 17 00:00:00 2001 From: MorevM Date: Mon, 22 Jun 2026 20:42:30 +0300 Subject: [PATCH] chore: Proper usage of nested custom containers --- docs/guide/usage.md | 8 ++++++-- eslint.config.js | 7 +------ .../no-block-properties.docs.md | 9 +++++---- .../selector-pattern/selector-pattern.docs.md | 16 +++++++++++----- 4 files changed, 23 insertions(+), 17 deletions(-) diff --git a/docs/guide/usage.md b/docs/guide/usage.md index 378ca0f..240dd37 100644 --- a/docs/guide/usage.md +++ b/docs/guide/usage.md @@ -28,7 +28,7 @@ for consistency with the BEM-specific rules. - Create the [`.stylelintrc` config file](https://stylelint.io/user-guide/configure/) *(or open the existing one)*; - Add `@morev/stylelint-plugin` to the [`plugins`](https://stylelint.io/user-guide/configure/#plugins) array; -::: details Show example +:::: details Show example ::: code-group @@ -43,10 +43,12 @@ export default { ::: +:::: + - Add the general rules from the `base` and `sass` categories to the [`overrides`] array (or directly to the `rules` object - it's safe to do so); -::: details Show example +:::: details Show example ::: code-group @@ -86,6 +88,8 @@ export default { ::: +:::: + - Add the rules from the `bem` category under `overrides`, using the `files` field to restrict them to the exact paths of BEM components ::: details Show example diff --git a/eslint.config.js b/eslint.config.js index 2306520..adfd944 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -5,12 +5,7 @@ export default combine([ defineConfiguration('javascript'), defineConfiguration('node'), defineConfiguration('json'), - defineConfiguration('markdown', { - overrides: { - // https://github.com/ota-meshi/eslint-plugin-markdown-preferences/issues/256 - 'markdown-preferences/no-implicit-block-closing': 'off', - }, - }), + defineConfiguration('markdown'), defineConfiguration('yaml'), defineConfiguration('html'), defineConfiguration('vitest', { diff --git a/src/rules/bem/no-block-properties/no-block-properties.docs.md b/src/rules/bem/no-block-properties/no-block-properties.docs.md index 27539f4..9b64974 100644 --- a/src/rules/bem/no-block-properties/no-block-properties.docs.md +++ b/src/rules/bem/no-block-properties/no-block-properties.docs.md @@ -288,7 +288,7 @@ using [`customPresets`](#custompresets) option if needed. | `CONTEXT` | Properties that influence layout behavior within a parent container. | | `POSITIONING` | Properties related to absolute or relative positioning of the block itself. | -::: details Show properties list +:::: details Show properties list ```ts const BUILTIN_PRESETS = { @@ -327,9 +327,10 @@ const BUILTIN_PRESETS = { ::: info Note The exact property lists are defined by the plugin and may be expanded in future versions following [Semantic Versioning](https://semver.org/) specification. - ::: +:::: + #### Behavior @@ -791,6 +792,6 @@ export type MessagesOption = { ::: -[`presets`]: #presets - + +[`presets`]: #presets diff --git a/src/rules/bem/selector-pattern/selector-pattern.docs.md b/src/rules/bem/selector-pattern/selector-pattern.docs.md index e2d4f0f..1e90ec2 100644 --- a/src/rules/bem/selector-pattern/selector-pattern.docs.md +++ b/src/rules/bem/selector-pattern/selector-pattern.docs.md @@ -305,7 +305,7 @@ import { ::: -::: details `RegExp` +:::: details `RegExp` A regular expression for advanced matching, if the configuration format allows it. \ For example, `yaml` and `json` configurations do not support direct `RegExp` usage - @@ -353,9 +353,10 @@ import { SNAKE_CASE_NUMERIC_REGEXP, } from '@morev/stylelint-plugin/constants'; ``` - ::: +:::: + ::: details `array` A list of any combination of the above. @@ -453,7 +454,7 @@ and validated against `pattern.modifierName`. #### Configuration examples -::: details `Two Dashes` style (default) +:::: details `Two Dashes` style (default) ::: code-group @@ -484,7 +485,9 @@ export default { ::: -::: details `Traditional` style +:::: + +:::: details `Traditional` style ::: code-group @@ -515,8 +518,9 @@ export default { ::: +:::: -::: details `React` style +:::: details `React` style ::: code-group @@ -547,6 +551,8 @@ export default { ::: +:::: + ---