Skip to content

chore: add repro #603

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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!"
}
Loading