mirror of
https://github.com/langgenius/dify.git
synced 2026-04-05 10:25:48 +08:00
chore(web): add ESLint rules for i18n JSON validation (#30491)
This commit is contained in:
@@ -130,15 +130,6 @@ export default antfu(
|
||||
sonarjs: sonar,
|
||||
},
|
||||
},
|
||||
// allow generated i18n files (like i18n/*/workflow.ts) to exceed max-lines
|
||||
{
|
||||
files: ['i18n/**'],
|
||||
rules: {
|
||||
'sonarjs/max-lines': 'off',
|
||||
'max-lines': 'off',
|
||||
'jsonc/sort-keys': 'error',
|
||||
},
|
||||
},
|
||||
tailwind.configs['flat/recommended'],
|
||||
{
|
||||
settings: {
|
||||
@@ -191,4 +182,19 @@ export default antfu(
|
||||
'dify-i18n/require-ns-option': 'error',
|
||||
},
|
||||
},
|
||||
// i18n JSON validation rules
|
||||
{
|
||||
files: ['i18n/**/*.json'],
|
||||
plugins: {
|
||||
'dify-i18n': difyI18n,
|
||||
},
|
||||
rules: {
|
||||
'sonarjs/max-lines': 'off',
|
||||
'max-lines': 'off',
|
||||
'jsonc/sort-keys': 'error',
|
||||
|
||||
'dify-i18n/valid-i18n-keys': 'error',
|
||||
'dify-i18n/no-extra-keys': 'error',
|
||||
},
|
||||
},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user