Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 84d8998

Browse files
author
Andreas Näsman
committedFeb 12, 2022
1 parent 1d1be85 commit 84d8998

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed
 

‎docs/user-guide/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,10 +358,10 @@ module.exports = {
358358
}
359359
```
360360

361-
#### Compiler macros such as `defineProps` and `defineEmits` generate `no-undef` warnings
361+
#### Compiler macros such as `defineProps` and `$ref` generate `no-undef` warnings
362362

363363
You need to enable the compiler macros environment in your ESLint configuration file.
364-
If you don't want to expose these variables globally, you can use `/* global defineProps, defineEmits */` instead.
364+
If you don't want to expose these variables globally, you can use `/* global defineProps, $ref */` instead.
365365

366366
Example **.eslintrc.js**:
367367

‎lib/index.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,16 @@ module.exports = {
233233
environments: {
234234
'setup-compiler-macros': {
235235
globals: {
236-
defineProps: 'readonly',
236+
$$: 'readonly',
237+
$: 'readonly',
238+
$computed: 'readonly',
239+
$customRef: 'readonly',
240+
$ref: 'readonly',
241+
$shallowRef: 'readonly',
242+
$toRef: 'readonly',
237243
defineEmits: 'readonly',
238244
defineExpose: 'readonly',
245+
defineProps: 'readonly',
239246
withDefaults: 'readonly'
240247
}
241248
}

‎tools/update-lib-index.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,16 @@ module.exports = {
4141
environments: {
4242
'setup-compiler-macros': {
4343
globals: {
44-
defineProps: 'readonly',
44+
$$: 'readonly',
45+
$: 'readonly',
46+
$computed: 'readonly',
47+
$customRef: 'readonly',
48+
$ref: 'readonly',
49+
$shallowRef: 'readonly',
50+
$toRef: 'readonly',
4551
defineEmits: 'readonly',
4652
defineExpose: 'readonly',
53+
defineProps: 'readonly',
4754
withDefaults: 'readonly'
4855
}
4956
}

0 commit comments

Comments
 (0)
Please sign in to comment.