Skip to content

Commit

Permalink
doc: add example for Vue class component
Browse files Browse the repository at this point in the history
  • Loading branch information
ylc395 committed Sep 17, 2024
1 parent 8b877f7 commit 38e6e7f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/user-guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,18 @@ Vue.component('AsyncComponent', (resolve, reject) => {
})
```

You can do this for [Vue class component](https://class-component.vuejs.org/) too:

```vue
<script lang="ts">
// @vue/component
@Component({
components: { Foo }
})
export default class Bar extends Vue {}
</script>
```

### Disabling rules via `<!-- eslint-disable -->`

You can use `<!-- eslint-disable -->`-like HTML comments in the `<template>` and in the block level of `.vue` files to disable a certain rule temporarily.
Expand Down

0 comments on commit 38e6e7f

Please sign in to comment.