Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions docs/guide/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down Expand Up @@ -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
Expand Down
7 changes: 1 addition & 6 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', {
Expand Down
9 changes: 5 additions & 4 deletions src/rules/bem/no-block-properties/no-block-properties.docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -791,6 +792,6 @@ export type MessagesOption = {

:::

[`presets`]: #presets

<!-- @include: @/docs/_parts/custom-messages.md#formatting -->

[`presets`]: #presets
16 changes: 11 additions & 5 deletions src/rules/bem/selector-pattern/selector-pattern.docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 -
Expand Down Expand Up @@ -353,9 +353,10 @@ import {
SNAKE_CASE_NUMERIC_REGEXP,
} from '@morev/stylelint-plugin/constants';
```

:::

::::

::: details `array`

A list of any combination of the above.
Expand Down Expand Up @@ -453,7 +454,7 @@ and validated against `pattern.modifierName`.

#### Configuration examples

::: details `Two Dashes` style (default)
:::: details `Two Dashes` style (default)

::: code-group

Expand Down Expand Up @@ -484,7 +485,9 @@ export default {

:::

::: details `Traditional` style
::::

:::: details `Traditional` style

::: code-group

Expand Down Expand Up @@ -515,8 +518,9 @@ export default {

:::

::::

::: details `React` style
:::: details `React` style

::: code-group

Expand Down Expand Up @@ -547,6 +551,8 @@ export default {

:::

::::

<!-- @include: @/docs/_parts/separators.md#footer -->

---
Expand Down
Loading