Skip to content

Commit 5a0d3d0

Browse files
authored
chore: add repro (#603)
* chore: add repro * update
1 parent a121136 commit 5a0d3d0

File tree

6 files changed

+52
-0
lines changed

6 files changed

+52
-0
lines changed

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@
99
</p>
1010
<p align="center">ESLint plugin for Vue I18n</p>
1111

12+
<div align="center">
13+
[Online Playground](https://eslint-online-playground.netlify.app/#eslint-plugin-vue-i18n)
14+
[Documentation](https://eslint-plugin-vue-i18n.intlify.dev/)
15+
</div>
16+
1217
<h2 align="center">Supporting Intlify Project</h2>
1318

1419
Intlify Project is an open source project that is included Vue I18n and i18n tooling and libraries with its ongoing development made possible entirely by the support of Sponsors. If you would like to become a sponsor, please consider:

docs/index.md

+3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ hero:
1616
- theme: alt
1717
text: Get started
1818
link: /started
19+
- theme: alt
20+
text: Online Playground
21+
link: https://eslint-online-playground.netlify.app/#eslint-plugin-vue-i18n
1922
# features:
2023
# - title: Feature A
2124
# details: Lorem ipsum dolor sit amet, consectetur adipiscing elit

repro/eslint.config.js

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import vueI18n from '@intlify/eslint-plugin-vue-i18n'
2+
import js from '@eslint/js'
3+
import pluginVue from 'eslint-plugin-vue'
4+
5+
export default [
6+
js.configs.recommended,
7+
...pluginVue.configs['flat/recommended'],
8+
...vueI18n.configs.recommended,
9+
{
10+
rules: {
11+
// override rules
12+
'@intlify/vue-i18n/no-duplicate-keys-in-locale': 'error',
13+
'@intlify/vue-i18n/no-dynamic-keys': 'error',
14+
'@intlify/vue-i18n/no-missing-keys-in-other-locales': 'error',
15+
'@intlify/vue-i18n/no-unknown-locale': 'error',
16+
'@intlify/vue-i18n/no-unused-keys': 'error',
17+
'@intlify/vue-i18n/prefer-sfc-lang-attr': 'error'
18+
},
19+
settings: {
20+
'vue-i18n': {
21+
localeDir: './src/resources/*.json',
22+
messageSyntaxVersion: '^11.0.0'
23+
}
24+
}
25+
}
26+
]

repro/package.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"name": "@intlify/eslint-plugin-vue-i18n-repro",
3+
"type": "module",
4+
"private": true,
5+
"devDependencies": {
6+
"@eslint/js": "latest",
7+
"@intlify/eslint-plugin-vue-i18n": "latest",
8+
"eslint": "latest",
9+
"eslint-plugin-vue": "latest"
10+
}
11+
}

repro/src/components/MyComponent.vue

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<template>
2+
<p>{{ $t('hello') }}</p>
3+
</template>

repro/src/resources/en.json

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"hello": "Hello! <span>DIO!</span>",
3+
"hi": "Hi! DIO!"
4+
}

0 commit comments

Comments
 (0)