Skip to content

Commit

Permalink
fix: fixes #94
Browse files Browse the repository at this point in the history
  • Loading branch information
edvardchen committed Mar 19, 2023
1 parent 97604c7 commit 995aa78
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rules/no-literal-string.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function isValidLiteral(options, { value }) {
const trimed = value.trim();
if (!trimed) return true;

if (shouldSkip(options.words, value)) return true;
if (shouldSkip(options.words, trimed)) return true;
}

//------------------------------------------------------------------------------
Expand Down
4 changes: 4 additions & 0 deletions tests/lib/fixtures/valid-jsx-text-only.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
a + 'b';

<div className="alert alert-danger" role="alert">
{t("No user details were found")}!
</div>;

<>
<div>{import('abc')}</div>
<div>{[].map(item => 'cat')}</div>
Expand Down

0 comments on commit 995aa78

Please sign in to comment.