Repository: yannickcr/eslint-plugin-react (js)

Issue:
no-unknown-property does not allow crossorigin on link tags
In the latest release, there was a [fix for the crossorigin property](https://github.com/yannickcr/eslint-plugin-react/pull/1643) (related to https://github.com/yannickcr/eslint-plugin-react/issues/1642). The updated rule only allows the `crossorigin` property on `script`, `img` and `video` tags. This means an error is now thrown for the `crossorigin` property on `link` tags.

You can see [here](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link) that `crossorigin` is an accepted attribute of `link` tags. I would therefore expect the linter to allow them. Something like this should pass:

```
<link href="path/to/file.ext" crossorigin="anonymous" />
```

Unless there's something I'm missing, happy to make a PR to fix this 🌈 

Pull request description:
Fixed crossorigin naming convention and missing tag support.
Fixed crossorigin naming convention to match React's supported HTML attributes.
https://reactjs.org/docs/dom-elements.html

Fixes #1656. Per https://github.com/yannickcr/eslint-plugin-react/issues/1642#issuecomment-360881470

Patch:
diff --git a/lib/rules/no-unknown-property.js b/lib/rules/no-unknown-property.js
index 70b5772d..f2ea0e1a 100644
--- a/lib/rules/no-unknown-property.js
+++ b/lib/rules/no-unknown-property.js
@@ -22,11 +22,11 @@ const DOM_ATTRIBUTE_NAMES = {
   class: 'className',
   for: 'htmlFor',
   'http-equiv': 'httpEquiv',
-  crossOrigin: 'crossorigin'
+  crossorigin: 'crossOrigin'
 };
 
 const ATTRIBUTE_TAGS_MAP = {
-  crossorigin: ['script', 'img', 'video']
+  crossOrigin: ['script', 'img', 'video', 'link']
 };
 
 const SVGDOM_ATTRIBUTE_NAMES = {


Test patch:
diff --git a/tests/lib/rules/no-unknown-property.js b/tests/lib/rules/no-unknown-property.js
index 5a730b9c..8fdc4f75 100644
--- a/tests/lib/rules/no-unknown-property.js
+++ b/tests/lib/rules/no-unknown-property.js
@@ -42,7 +42,7 @@ ruleTester.run('no-unknown-property', rule, {
       code: '<div class="bar"></div>;',
       options: [{ignore: ['class']}]
     },
-    {code: '<script crossorigin />'}
+    {code: '<script crossOrigin />'}
   ],
   invalid: [{
     code: '<div class="bar"></div>;',
@@ -81,13 +81,13 @@ ruleTester.run('no-unknown-property', rule, {
     output: '<rect clipPath="bar" />;',
     errors: [{message: 'Unknown property \'clip-path\' found, use \'clipPath\' instead'}]
   }, {
-    code: '<script crossOrigin />',
-    errors: [{message: 'Unknown property \'crossOrigin\' found, use \'crossorigin\' instead'}]
-  }, {
-    code: '<div crossOrigin />',
-    errors: [{message: 'Unknown property \'crossOrigin\' found, use \'crossorigin\' instead'}]
+    code: '<script crossorigin />',
+    errors: [{message: 'Unknown property \'crossorigin\' found, use \'crossOrigin\' instead'}]
   }, {
     code: '<div crossorigin />',
-    errors: [{message: 'Invalid property \'crossorigin\' found on tag \'div\', but it is only allowed on: script, img, video'}]
+    errors: [{message: 'Unknown property \'crossorigin\' found, use \'crossOrigin\' instead'}]
+  }, {
+    code: '<div crossOrigin />',
+    errors: [{message: 'Invalid property \'crossOrigin\' found on tag \'div\', but it is only allowed on: script, img, video, link'}]
   }]
 });