Repository: edvardchen/eslint-plugin-i18next (js)

Issue:
Does not detect "title" attribute on JSX intrinsic elements (ex, button, div)
This was already reported, in a broader way, in https://github.com/edvardchen/eslint-plugin-i18next/issues/107 . That ticket was closed as intended behavior since "since most of dom elements' attributes are invisible to users". `title`, however, is one of the exceptions (since it's visible when the user hovers over the dom node for a couple of seconds). So,  believe
```jsx
<button title="foo" />
```
should be detected as an error. 

If @edvardchen agrees with this, I believe it can be changed just by adding "title" to [this list](https://github.com/edvardchen/eslint-plugin-i18next/blob/main/lib/helper/index.js#L15):
```suggestion
const blacklistAttrs = ['placeholder', 'alt', 'aria-label', 'value']; // add 'title' here
```

Pull request description:
fix: check title attribute in dom elements
This PR fixes #111 

Patch:
diff --git a/lib/helper/index.js b/lib/helper/index.js
index 736dacd..42d789e 100644
--- a/lib/helper/index.js
+++ b/lib/helper/index.js
@@ -12,7 +12,7 @@ function isSvgTag(str) {
   return SVG_TAGS.includes(str);
 }
 
-const blacklistAttrs = ['placeholder', 'alt', 'aria-label', 'value'];
+const blacklistAttrs = ['placeholder', 'alt', 'aria-label', 'value', 'title'];
 function isAllowedDOMAttr(tag, attr) {
   if (isSvgTag(tag)) return true;
   if (isNativeDOMTag(tag)) {


Test patch:
diff --git a/tests/lib/fixtures/invalid.jsx b/tests/lib/fixtures/invalid.jsx
index 5dfdbe0..c6fc5b0 100644
--- a/tests/lib/fixtures/invalid.jsx
+++ b/tests/lib/fixtures/invalid.jsx
@@ -27,4 +27,5 @@ class Form extends Component {
   <DIV foo="bar" />
   <img src="./image.png" alt="some-image" />
   <button aria-label="Close" type="button" />
+  <div title="pink flower">🌸</div>
 </>
diff --git a/tests/lib/rules/no-literal-string/all.js b/tests/lib/rules/no-literal-string/all.js
index b64abc7..37cd634 100644
--- a/tests/lib/rules/no-literal-string/all.js
+++ b/tests/lib/rules/no-literal-string/all.js
@@ -4,7 +4,7 @@ const runTest = require('../../helpers/runTest');
 const cases = {
   valid: [testFile('valid.jsx')],
   invalid: [
-    { ...testFile('invalid.jsx'), errors: 14 },
+    { ...testFile('invalid.jsx'), errors: 15 },
     {
       code: `export const validationSchema = Yup.object({
         email: Yup
diff --git a/tests/lib/rules/no-literal-string/callees.js b/tests/lib/rules/no-literal-string/callees.js
index 4588110..bfbb993 100644
--- a/tests/lib/rules/no-literal-string/callees.js
+++ b/tests/lib/rules/no-literal-string/callees.js
@@ -12,7 +12,7 @@ const cases = {
       options: [{ mode: 'all', callees: { exclude: ['foo.+'] } }],
     },
   ],
-  invalid: [{ ...testFile('invalid.jsx'), errors: 14 }],
+  invalid: [{ ...testFile('invalid.jsx'), errors: 15 }],
 };
 
 runTest('no-literal-string: callees', cases);
diff --git a/tests/lib/rules/no-literal-string/default.js b/tests/lib/rules/no-literal-string/default.js
index 54f9c47..b57efa9 100644
--- a/tests/lib/rules/no-literal-string/default.js
+++ b/tests/lib/rules/no-literal-string/default.js
@@ -3,7 +3,7 @@ const runTest = require('../../helpers/runTest');
 
 const cases = {
   valid: [{ code: 'const a = "absfoo";<DIV abc="bcd" />' }],
-  invalid: [{ ...testFile('invalid.jsx'), errors: 14 }],
+  invalid: [{ ...testFile('invalid.jsx'), errors: 15 }],
 };
 
 runTest('no-literal-string: default', cases);