useValidLang
Ce contenu n’est pas encore disponible dans votre langue.
Diagnostic Category: lint/a11y/useValidLang
Since: v1.0.0
Sources:
- Same as:
jsx-a11y/lang
Ensure that the attribute passed to the lang
attribute is a correct ISO language and/or country.
Examples
Section titled ExamplesInvalid
Section titled Invalidcode-block.jsx:1:12 lint/a11y/useValidLang ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✖ Provide a valid value for the lang attribute.
> 1 │ <html lang=“lorem” />
│ ^^^^^^^
2 │
ℹ Some of valid languages:
- ab
- aa
- af
- sq
- am
- ar
- an
- hy
- as
- ay
- az
- ba
- eu
- bn
- dz
code-block.jsx:1:12 lint/a11y/useValidLang ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✖ Provide a valid value for the lang attribute.
> 1 │ <html lang=“en-babab” />
│ ^^^^^^^^^^
2 │
ℹ Some of valid countries:
- AF
- AL
- DZ
- AS
- AD
- AO
- AI
- AQ
- AG
- AR
- AM
- AW
- AU
- AT
- AZ
code-block.jsx:1:12 lint/a11y/useValidLang ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✖ Provide a valid value for the lang attribute.
> 1 │ <html lang=“en-GB-typo” />
│ ^^^^^^^^^^^^
2 │