Skip to content

Commit dbc54cf

Browse files
committed
docs(key-format-style.md): add lowercase to docs
1 parent 148d683 commit dbc54cf

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

docs/rules/key-format-style.md

+28-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ This rule aims to enforces specific casing for localization key names.
1313
```yaml
1414
camelCaseKey: The key for this value is camel case.
1515
kebab-case-key: The key for this value is kebab case.
16+
lowercase: The key for this value is lower case.
1617
snake_case_key: The key for this value is snake case.
1718
mixed_Case-key: Perhaps you don't want to use this casing.
1819
```
@@ -47,7 +48,7 @@ Also, the following localization key definitions are reported as errors, because
4748
{
4849
"@intlify/vue-i18n/key-format-style": [
4950
"error",
50-
"camelCase" | "kebab-case" | "snake_case",
51+
"camelCase" | "kebab-case" | "lowercase" | "snake_case",
5152
{
5253
"allowArray": false,
5354
"splitByDots": false
@@ -112,6 +113,32 @@ appTitle: I18N Management System
112113
app_title: I18N Management System
113114
```
114115
116+
:+1: Examples of **correct** code for this rule with `"lowercase"`:
117+
118+
<eslint-code-block language="yaml">
119+
120+
```yaml
121+
# eslint @intlify/vue-i18n/key-format-style: ['error', 'lowercase']
122+
123+
# ✓ GOOD
124+
apptitle: I18N Management System
125+
```
126+
127+
</eslint-code-block>
128+
129+
:-1: Examples of **incorrect** code for this rule with `"lowercase"`:
130+
131+
<eslint-code-block language="yaml">
132+
133+
```yaml
134+
# eslint @intlify/vue-i18n/key-format-style: ['error', 'lowercase']
135+
136+
# ✗ BAD
137+
appTitle: I18N Management System
138+
app_title: I18N Management System
139+
APP_TITLE: I18N Management System
140+
```
141+
115142
</eslint-code-block>
116143
117144
:+1: Examples of **correct** code for this rule with `"snake_case"`:

0 commit comments

Comments
 (0)