Skip to content

Commit 64b00b5

Browse files
authoredJun 13, 2022
feat: enable env for vue script setup (#49)
1 parent 68b8f87 commit 64b00b5

File tree

3 files changed

+27
-1
lines changed

3 files changed

+27
-1
lines changed
 

‎test/ScriptSetup.vue

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<template>
2+
<span>{{ foo }}</span>
3+
</template>
4+
5+
<script setup lang="ts">
6+
const foo = 'bar';
7+
8+
defineProps<{
9+
count: number;
10+
}>();
11+
12+
defineEmits<{
13+
(e: 'close'): void;
14+
}>();
15+
</script>

‎test/eslint-output.snap

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
error: 'count' of property found, but never used (vue/no-unused-properties) at ScriptSetup.vue:9:3:
2+
7 |
3+
8 | defineProps<{
4+
> 9 | count: number;
5+
| ^
6+
10 | }>();
7+
11 |
8+
12 | defineEmits<{
9+
10+
111
error: raw text 'test' is used (@intlify/vue-i18n/no-raw-text) at Test.vue:3:9:
212
1 | <template>
313
2 | <span>{{ foo }}</span>
@@ -42,5 +52,5 @@ warning: Unexpected console statement (no-console) at index.ts:3:1:
4252
4 |
4353

4454

45-
3 errors and 2 warnings found.
55+
4 errors and 2 warnings found.
4656
1 warning potentially fixable with the `--fix` option.

‎vue.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
const eslintConfig = {
44
env: {
55
browser: true,
6+
'vue/setup-compiler-macros': true,
67
},
78

89
parser: 'vue-eslint-parser',

0 commit comments

Comments
 (0)
Failed to load comments.