Skip to content

feat(no-v-text-v-html-on-component): add ignore namespace option #2610

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Nov 27, 2024
Merged
Changes from 3 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
6 changes: 3 additions & 3 deletions docs/rules/no-v-text-v-html-on-component.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ If you use v-text / v-html on a component, it will overwrite the component's con
```

- `allow` (`string[]`) ... Specify a list of custom components for which the rule should not apply.
- `ignoreElementNamespaces` (`boolean`) ... Specify whether to ignore the namespace restrictions for SVG and MathML elements, so that the rule should not apply. Default is `false`.
- `ignoreElementNamespaces` (`boolean`) ... If `true`, always treat SVG and MathML tag names as HTML elements, even if they are not used inside a SVG/MathML root element. Default is `false`.

### `{ "allow": ["router-link", "nuxt-link"] }`

Expand All @@ -77,8 +77,8 @@ If you use v-text / v-html on a component, it will overwrite the component's con
```vue
<template>
<!-- ✓ GOOD -->
<g v-text="content" /> <!-- <svg> -->
<mi v-text="content" /> <!-- <math> -->
<g v-text="content" /> <!-- SVG element not inside of <svg> -->
<mi v-text="content" /> <!-- MathML element not inside of <math> -->
</template>
```

Expand Down
Loading