Skip to content
Prev Previous commit
Next Next commit
refactor: set fixable as null and regen docs
  • Loading branch information
Mussin Benarbia committed Dec 4, 2023
commit 9e5fd3aa9f3f5ba6b3bff95a55266acb46ff6f29
7 changes: 3 additions & 4 deletions docs/rules/enforce-style-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,14 @@ description: enforce or forbid the use of the `scoped` and `module` attributes i
> enforce or forbid the use of the `scoped` and `module` attributes in SFC top level style tags

- :exclamation: <badge text="This rule has not been released yet." vertical="middle" type="error"> ***This rule has not been released yet.*** </badge>
- :wrench: The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems) can automatically fix some of the problems reported by this rule.

## :book: Rule Details

This rule allows you to selectively allow attributes on your top level style tags and warns when using an attribute that is not allowed.

### `"scoped"`

<eslint-code-block fix :rules="{'vue/enforce-style-attribute': ['error', { allows: ['scoped'] }]}">
<eslint-code-block :rules="{'vue/enforce-style-attribute': ['error', { allows: ['scoped'] }]}">

```vue
<!-- ✓ GOOD -->
Expand All @@ -35,7 +34,7 @@ This rule allows you to selectively allow attributes on your top level style tag

### `"module"`

<eslint-code-block fix :rules="{'vue/enforce-style-attribute': ['error', { allows: ['module'] }]}">
<eslint-code-block :rules="{'vue/enforce-style-attribute': ['error', { allows: ['module'] }]}">

```vue
<!-- ✓ GOOD -->
Expand All @@ -52,7 +51,7 @@ This rule allows you to selectively allow attributes on your top level style tag

### `"no-attributes"`

<eslint-code-block fix :rules="{'vue/enforce-style-attribute': ['error', { allows: ['no-attributes']}]}">
<eslint-code-block :rules="{'vue/enforce-style-attribute': ['error', { allows: ['no-attributes']}]}">

```vue
<!-- ✓ GOOD -->
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ For example:
| [vue/define-emits-declaration](./define-emits-declaration.md) | enforce declaration style of `defineEmits` | | :hammer: |
| [vue/define-macros-order](./define-macros-order.md) | enforce order of `defineEmits` and `defineProps` compiler macros | :wrench: | :lipstick: |
| [vue/define-props-declaration](./define-props-declaration.md) | enforce declaration style of `defineProps` | | :hammer: |
| [vue/enforce-style-attribute](./enforce-style-attribute.md) | enforce or forbid the use of the `scoped` and `module` attributes in SFC top level style tags | :wrench: | :hammer: |
| [vue/enforce-style-attribute](./enforce-style-attribute.md) | enforce or forbid the use of the `scoped` and `module` attributes in SFC top level style tags | | :hammer: |
| [vue/html-button-has-type](./html-button-has-type.md) | disallow usage of button without an explicit type attribute | | :hammer: |
| [vue/html-comment-content-newline](./html-comment-content-newline.md) | enforce unified line brake in HTML comments | :wrench: | :lipstick: |
| [vue/html-comment-content-spacing](./html-comment-content-spacing.md) | enforce unified spacing in HTML comments | :wrench: | :lipstick: |
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/enforce-style-attribute.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ module.exports = {
categories: undefined,
url: 'https://eslint.vuejs.org/rules/enforce-style-attribute.html'
},
fixable: 'code',
fixable: null,
schema: [
{
type: 'object',
Expand Down