Skip to content

Commit

Permalink
update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
ota-meshi committed Jul 5, 2021
1 parent 27677ad commit 7b7c525
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/user-guide/README.md
Expand Up @@ -354,6 +354,26 @@ module.exports = {
}
```

#### Compiler macros such as `defineProps` and `defineEmits` are warned by `no-undef` rule

You need to define [global variables](https://eslint.org/docs/user-guide/configuring/language-options#using-configuration-files-1) in your ESLint configuration file.
If you don't want to define global variables, use `import { defineProps, defineEmits } from 'vue'`.

Example **.eslintrc.js**:

```js
module.exports = {
globals: {
defineProps: "readonly",
defineEmits: "readonly",
defineExpose: "readonly",
withDefaults: "readonly"
}
}
```

See also [ESLint - Specifying Globals > Using configuration files](https://eslint.org/docs/user-guide/configuring/language-options#using-configuration-files-1).

#### Parsing error with Top Level `await`

##### Using ESLint <= v7.x
Expand Down

0 comments on commit 7b7c525

Please sign in to comment.