Skip to content

Commit 1d13218

Browse files
committed
Restore tests and crossorigin attribute map
1 parent d64a16b commit 1d13218

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

lib/rules/no-unknown-property.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ const DOM_ATTRIBUTE_NAMES = {
2121
'accept-charset': 'acceptCharset',
2222
class: 'className',
2323
for: 'htmlFor',
24-
'http-equiv': 'httpEquiv'
24+
'http-equiv': 'httpEquiv',
25+
crossorigin: 'crossOrigin'
2526
};
2627

2728
const ATTRIBUTE_TAGS_MAP = {

tests/lib/rules/no-unknown-property.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,12 @@ ruleTester.run('no-unknown-property', rule, {
8080
code: '<rect clip-path="bar" />;',
8181
output: '<rect clipPath="bar" />;',
8282
errors: [{message: 'Unknown property \'clip-path\' found, use \'clipPath\' instead'}]
83+
}, {
84+
code: '<script crossorigin />',
85+
errors: [{message: 'Unknown property \'crossorigin\' found, use \'crossOrigin\' instead'}]
86+
}, {
87+
code: '<div crossorigin />',
88+
errors: [{message: 'Unknown property \'crossorigin\' found, use \'crossOrigin\' instead'}]
8389
}, {
8490
code: '<div crossOrigin />',
8591
errors: [{message: 'Invalid property \'crossOrigin\' found on tag \'div\', but it is only allowed on: script, img, video, link'}]

0 commit comments

Comments
 (0)