Skip to content

Commit

Permalink
address comments - remove auto-fixer and adapt tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Primajin committed Jan 16, 2022
1 parent 17f2878 commit 4de38ef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
5 changes: 0 additions & 5 deletions lib/rules/no-invalid-html-attribute.js
Expand Up @@ -321,11 +321,6 @@ function checkLiteralValueNode(context, attributeName, node, parentNode, parentN
secondValue,
missingValue: [...siblings].join(', '),
},
fix(fixer) {
if (siblings.size === 1) {
return fixer.replaceTextRange(singleAttributeParts[0].range, `${pairing}\u0020${[...siblings][0]}`);
}
},
});
}
}
Expand Down
7 changes: 3 additions & 4 deletions tests/lib/rules/no-invalid-html-attribute.js
Expand Up @@ -387,7 +387,7 @@ ruleTester.run('no-invalid-html-attribute', rule, {
],
},
{
code: '<a rel="noreferrer  noopener"></a>', // this string contains nbsp
code: '<a rel="noreferrer\xa0\xa0noopener"></a>',
output: '<a rel="noreferrer noopener"></a>',
errors: [
{
Expand Down Expand Up @@ -562,7 +562,6 @@ ruleTester.run('no-invalid-html-attribute', rule, {
},
{
code: '<link rel="shortcut"></link>',
output: '<link rel="shortcut icon"></link>',
errors: [
{
messageId: 'notAlone',
Expand All @@ -575,7 +574,7 @@ ruleTester.run('no-invalid-html-attribute', rule, {
},
{
code: '<link rel="shortcut foo"></link>',
output: '<link rel="shortcut icon "></link>',
output: '<link rel="shortcut "></link>',
errors: [
{
messageId: 'neverValid',
Expand Down Expand Up @@ -606,7 +605,7 @@ ruleTester.run('no-invalid-html-attribute', rule, {
},
{
code: '<link rel="shortcut foo"></link>',
output: '<link rel="shortcut icon "></link>',
output: '<link rel="shortcut foo"></link>',
errors: [
{
messageId: 'neverValid',
Expand Down

0 comments on commit 4de38ef

Please sign in to comment.