@nkzw/eslint-plugin-fbtee 1.7.4 → 1.7.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.mjs CHANGED
@@ -230,7 +230,7 @@ const shouldIgnoreParent = (node) => {
230
230
  };
231
231
  var no_untranslated_strings_default = createRule({
232
232
  create(context, options) {
233
- const ignoredWords = new Set(options[0].ignoredWords.map((value) => value.trim().toLowerCase()));
233
+ const ignoredWords = new Set(options[0].ignoredWords.map((value) => value.toLowerCase()));
234
234
  const isIgnoredWord = (value) => ignoredWords.has(value.replaceAll(/\s+/g, " ").toLowerCase());
235
235
  return {
236
236
  JSXAttribute(node) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nkzw/eslint-plugin-fbtee",
3
- "version": "1.7.4",
3
+ "version": "1.7.5",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "repository": {
@@ -247,6 +247,26 @@ ruleTester.run('no-untranslated-strings', rule, {
247
247
  },
248
248
  ],
249
249
  },
250
+ {
251
+ code: `
252
+ <input placeholder=" " />
253
+ `,
254
+ options: [
255
+ {
256
+ ignoredWords: [' '],
257
+ },
258
+ ],
259
+ },
260
+ {
261
+ code: `
262
+ <span>{' '}</span>
263
+ `,
264
+ options: [
265
+ {
266
+ ignoredWords: [' '],
267
+ },
268
+ ],
269
+ },
250
270
  {
251
271
  code: `
252
272
  <textarea rows={2}></textarea>
@@ -32,7 +32,7 @@ const shouldIgnoreParent = (node: TSESTree.Node) => {
32
32
  export default createRule<Options, 'unwrappedString'>({
33
33
  create(context, options) {
34
34
  const ignoredWords = new Set(
35
- options[0].ignoredWords.map((value) => value.trim().toLowerCase()),
35
+ options[0].ignoredWords.map((value) => value.toLowerCase()),
36
36
  );
37
37
 
38
38
  const isIgnoredWord = (value: string) =>