Skip to content

Commit 81c480f

Browse files
committed
Add inElement message ids
1 parent 4c5dbb8 commit 81c480f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/rules/jsx-no-literals.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,17 @@ function trimIfString(val) {
2323

2424
const messages = {
2525
invalidPropValue: 'Invalid prop value: "{{text}}"',
26+
invalidPropValueInElement: 'Invalid prop value: "{{text}}" in {{element}}',
2627
noStringsInAttributes: 'Strings not allowed in attributes: "{{text}}"',
28+
noStringsInAttributesInElement:
29+
'Strings not allowed in attributes: "{{text}}" in {{element}}',
2730
noStringsInJSX: 'Strings not allowed in JSX files: "{{text}}"',
31+
noStringsInJSXInElement:
32+
'Strings not allowed in JSX files: "{{text}}" in {{element}}',
2833
literalNotInJSXExpression:
2934
'Missing JSX expression container around literal string: "{{text}}"',
35+
literalNotInJSXExpressionInElement:
36+
'Missing JSX expression container around literal string: "{{text}}" in {{element}}',
3037
};
3138

3239
/** @type {import('json-schema').JSONSchema4['properties']} */

0 commit comments

Comments
 (0)