Skip to content

Commit

Permalink
chore: add repro (#603)
Browse files Browse the repository at this point in the history
* chore: add repro

* update
  • Loading branch information
ota-meshi authored Jan 27, 2025
1 parent a121136 commit 5a0d3d0
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
</p>
<p align="center">ESLint plugin for Vue I18n</p>

<div align="center">
[Online Playground](https://eslint-online-playground.netlify.app/#eslint-plugin-vue-i18n)
[Documentation](https://eslint-plugin-vue-i18n.intlify.dev/)
</div>

<h2 align="center">Supporting Intlify Project</h2>

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:
Expand Down
3 changes: 3 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ hero:
- theme: alt
text: Get started
link: /started
- theme: alt
text: Online Playground
link: https://eslint-online-playground.netlify.app/#eslint-plugin-vue-i18n
# features:
# - title: Feature A
# details: Lorem ipsum dolor sit amet, consectetur adipiscing elit
Expand Down
26 changes: 26 additions & 0 deletions repro/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import vueI18n from '@intlify/eslint-plugin-vue-i18n'
import js from '@eslint/js'
import pluginVue from 'eslint-plugin-vue'

export default [
js.configs.recommended,
...pluginVue.configs['flat/recommended'],
...vueI18n.configs.recommended,
{
rules: {
// override rules
'@intlify/vue-i18n/no-duplicate-keys-in-locale': 'error',
'@intlify/vue-i18n/no-dynamic-keys': 'error',
'@intlify/vue-i18n/no-missing-keys-in-other-locales': 'error',
'@intlify/vue-i18n/no-unknown-locale': 'error',
'@intlify/vue-i18n/no-unused-keys': 'error',
'@intlify/vue-i18n/prefer-sfc-lang-attr': 'error'
},
settings: {
'vue-i18n': {
localeDir: './src/resources/*.json',
messageSyntaxVersion: '^11.0.0'
}
}
}
]
11 changes: 11 additions & 0 deletions repro/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "@intlify/eslint-plugin-vue-i18n-repro",
"type": "module",
"private": true,
"devDependencies": {
"@eslint/js": "latest",
"@intlify/eslint-plugin-vue-i18n": "latest",
"eslint": "latest",
"eslint-plugin-vue": "latest"
}
}
3 changes: 3 additions & 0 deletions repro/src/components/MyComponent.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<template>
<p>{{ $t('hello') }}</p>
</template>
4 changes: 4 additions & 0 deletions repro/src/resources/en.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"hello": "Hello! <span>DIO!</span>",
"hi": "Hi! DIO!"
}

0 comments on commit 5a0d3d0

Please sign in to comment.