@voerkai18n/utils
Version:
utils for voerkai18n
32 lines (31 loc) • 657 B
YAML
utils: !include utils.yaml
rule:
any:
-
kind: string
pattern: $MESSAGE
inside:
matches: is-message-attr
stopBy: neighbor
-
any:
- kind: jsx_expression
- kind: string
pattern: $VARS
inside:
matches: is-vars-attr
stopBy: end
-
any:
- kind: jsx_expression
- kind: string
pattern: $OPTIONS
inside:
matches: is-options-attr
stopBy: end
- pattern: t($MESSAGE)
- pattern: t($MESSAGE,$VARS)
- pattern: t($MESSAGE,$VARS,$OPTIONS)
constraints:
MESSAGE:
kind: string