@@ -10,7 +10,7 @@ ruleTester.run('template-no-link-to-tagname', rule, {
1010 valid : [
1111 {
1212 filename : 'test.gjs' ,
13- code : " import { LinkTo } from '@ember/routing';\n<template><LinkTo @route=\ "index\ ">Home</LinkTo></template>" ,
13+ code : ' import { LinkTo } from \ '@ember/routing\ ';\n<template><LinkTo @route="index">Home</LinkTo></template>' ,
1414 output : null ,
1515 } ,
1616 {
@@ -39,7 +39,7 @@ ruleTester.run('template-no-link-to-tagname', rule, {
3939 // Bare tagName (without @) is just an HTML attribute, not flagged
4040 {
4141 filename : 'test.gjs' ,
42- code : " import { LinkTo } from '@ember/routing';\n<template><LinkTo @route=\ "index\ " tagName=\ "button\ ">Home</LinkTo></template>" ,
42+ code : ' import { LinkTo } from \ '@ember/routing\ ';\n<template><LinkTo @route="index" tagName="button">Home</LinkTo></template>' ,
4343 output : null ,
4444 } ,
4545 '<template><Foo @route="routeName" @tagName="button">Link text</Foo></template>' ,
@@ -53,26 +53,26 @@ ruleTester.run('template-no-link-to-tagname', rule, {
5353 invalid : [
5454 {
5555 filename : 'test.gjs' ,
56- code : " import { LinkTo } from '@ember/routing';\n<template><LinkTo @route=\ "about\ " @tagName=\ "span\ ">About</LinkTo></template>" ,
56+ code : ' import { LinkTo } from \ '@ember/routing\ ';\n<template><LinkTo @route="about" @tagName="span">About</LinkTo></template>' ,
5757 output : null ,
5858 errors : [ { messageId : 'noLinkToTagname' } ] ,
5959 } ,
6060 {
6161 filename : 'test.gts' ,
62- code : " import { LinkTo } from '@ember/routing';\n<template><LinkTo @route=\ "about\ " @tagName=\ "span\ ">About</LinkTo></template>" ,
62+ code : ' import { LinkTo } from \ '@ember/routing\ ';\n<template><LinkTo @route="about" @tagName="span">About</LinkTo></template>' ,
6363 output : null ,
6464 errors : [ { messageId : 'noLinkToTagname' } ] ,
6565 } ,
6666 // Renamed import
6767 {
6868 filename : 'test.gjs' ,
69- code : " import { LinkTo as Link } from '@ember/routing';\n<template><Link @tagName=\ "button\ ">x</Link></template>" ,
69+ code : ' import { LinkTo as Link } from \ '@ember/routing\ ';\n<template><Link @tagName="button">x</Link></template>' ,
7070 output : null ,
7171 errors : [ { messageId : 'noLinkToTagname' } ] ,
7272 } ,
7373 {
7474 filename : 'test.gts' ,
75- code : " import { LinkTo as Link } from '@ember/routing';\n<template><Link @route=\ "index\ " @tagName=\ "button\ ">x</Link></template>" ,
75+ code : ' import { LinkTo as Link } from \ '@ember/routing\ ';\n<template><Link @route="index" @tagName="button">x</Link></template>' ,
7676 output : null ,
7777 errors : [ { messageId : 'noLinkToTagname' } ] ,
7878 } ,
0 commit comments