Skip to content

Commit

Permalink
doc: add example for Vue class component (#2561)
Browse files Browse the repository at this point in the history
Co-authored-by: Flo Edelmann <[email protected]>
  • Loading branch information
ylc395 and FloEdelmann authored Sep 18, 2024
1 parent 4c38983 commit e8a09e9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/user-guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,16 @@ Vue.component('AsyncComponent', (resolve, reject) => {
})
```

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

```ts
// @vue/component
@Component({
components: { Foo }
})
export default class Bar extends Vue {}
```

### 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 e8a09e9

Please sign in to comment.