File tree Expand file tree Collapse file tree 3 files changed +18
-4
lines changed Expand file tree Collapse file tree 3 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -358,10 +358,10 @@ module.exports = {
358
358
}
359
359
```
360
360
361
- #### Compiler macros such as ` defineProps ` and ` defineEmits ` generate ` no-undef ` warnings
361
+ #### Compiler macros such as ` defineProps ` and ` $ref ` generate ` no-undef ` warnings
362
362
363
363
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.
365
365
366
366
Example ** .eslintrc.js** :
367
367
Original file line number Diff line number Diff line change @@ -233,9 +233,16 @@ module.exports = {
233
233
environments : {
234
234
'setup-compiler-macros' : {
235
235
globals : {
236
- defineProps : 'readonly' ,
236
+ $$ : 'readonly' ,
237
+ $ : 'readonly' ,
238
+ $computed : 'readonly' ,
239
+ $customRef : 'readonly' ,
240
+ $ref : 'readonly' ,
241
+ $shallowRef : 'readonly' ,
242
+ $toRef : 'readonly' ,
237
243
defineEmits : 'readonly' ,
238
244
defineExpose : 'readonly' ,
245
+ defineProps : 'readonly' ,
239
246
withDefaults : 'readonly'
240
247
}
241
248
}
Original file line number Diff line number Diff line change @@ -41,9 +41,16 @@ module.exports = {
41
41
environments: {
42
42
'setup-compiler-macros': {
43
43
globals: {
44
- defineProps: 'readonly',
44
+ $$: 'readonly',
45
+ $: 'readonly',
46
+ $computed: 'readonly',
47
+ $customRef: 'readonly',
48
+ $ref: 'readonly',
49
+ $shallowRef: 'readonly',
50
+ $toRef: 'readonly',
45
51
defineEmits: 'readonly',
46
52
defineExpose: 'readonly',
53
+ defineProps: 'readonly',
47
54
withDefaults: 'readonly'
48
55
}
49
56
}
You can’t perform that action at this time.
0 commit comments