@@ -7,7 +7,6 @@ const RuleTester = require('eslint').RuleTester
7
7
const rule = require ( '../../../lib/rules/no-missing-keys' )
8
8
9
9
const baseDir = './tests/fixtures/no-missing-keys/locales'
10
- const resolve = file => `${ baseDir } /${ file } `
11
10
12
11
const settings = {
13
12
'vue-i18n' : {
@@ -68,8 +67,8 @@ tester.run('no-missing-keys', rule, {
68
67
settings,
69
68
code : `$t('missing')` ,
70
69
errors : [
71
- `'missing' does not exist in ' ${ resolve ( 'en.json' ) } ' ` ,
72
- `'missing' does not exist in ' ${ resolve ( 'ja.json' ) } ' `
70
+ `'missing' does not exist` ,
71
+ `'missing' does not exist`
73
72
]
74
73
} , {
75
74
// using mustaches in template block
@@ -78,8 +77,8 @@ tester.run('no-missing-keys', rule, {
78
77
<p>{{ $t('missing') }}</p>
79
78
</template>` ,
80
79
errors : [
81
- `'missing' does not exist in ' ${ resolve ( 'en.json' ) } ' ` ,
82
- `'missing' does not exist in ' ${ resolve ( 'ja.json' ) } ' `
80
+ `'missing' does not exist` ,
81
+ `'missing' does not exist`
83
82
]
84
83
} , {
85
84
// using custom directive in template block
@@ -88,8 +87,8 @@ tester.run('no-missing-keys', rule, {
88
87
<p v-t="'missing'"></p>
89
88
</template>` ,
90
89
errors : [
91
- `'missing' does not exist in ' ${ resolve ( 'en.json' ) } ' ` ,
92
- `'missing' does not exist in ' ${ resolve ( 'ja.json' ) } ' `
90
+ `'missing' does not exist` ,
91
+ `'missing' does not exist`
93
92
]
94
93
} , {
95
94
// using <i18n> functional component in template block
@@ -100,8 +99,8 @@ tester.run('no-missing-keys', rule, {
100
99
</div>
101
100
</template>` ,
102
101
errors : [
103
- `'missing' does not exist in ' ${ resolve ( 'en.json' ) } ' ` ,
104
- `'missing' does not exist in ' ${ resolve ( 'ja.json' ) } ' `
102
+ `'missing' does not exist` ,
103
+ `'missing' does not exist`
105
104
]
106
105
} , {
107
106
// settings.vue-i18n.localeDir' error
0 commit comments