@@ -7,7 +7,7 @@ Deno.test('colon-spacing plugin', async (test) => {
77 colonSpacing ,
88 'main.ts' ,
99 `
10- export function Foo(arg1: string, arg2: number ): string {
10+ export function Foo(): string {
1111 return 'Hello World!';
1212 }
1313 `
@@ -19,15 +19,15 @@ Deno.test('colon-spacing plugin', async (test) => {
1919
2020 assertEquals ( diagnostic . id , 'colon-spacing/before-colon' ) ;
2121 assertEquals ( diagnostic . message , 'Wrong colon spacing. Expected 1 space before colon.' ) ;
22- assertEquals ( diagnostic . fix , [ { range : [ 54 , 54 ] , text : ' ' } ] ) ;
22+ assertEquals ( diagnostic . fix , [ { range : [ 28 , 28 ] , text : ' ' } ] ) ;
2323 } ) ;
2424
2525 await test . step ( 'before-colon rule, too many spaces' , ( ) => {
2626 const diagnostics = Deno . lint . runPlugin (
2727 colonSpacing ,
2828 'main.ts' ,
2929 `
30- export function Foo(arg1: string, arg2: number ) : string {
30+ export function Foo() : string {
3131 return 'Hello World!';
3232 }
3333 `
@@ -39,15 +39,15 @@ Deno.test('colon-spacing plugin', async (test) => {
3939
4040 assertEquals ( diagnostic . id , 'colon-spacing/before-colon' ) ;
4141 assertEquals ( diagnostic . message , 'Wrong colon spacing. Expected 1 space before colon.' ) ;
42- assertEquals ( diagnostic . fix , [ { range : [ 54 , 56 ] , text : ' ' } ] ) ;
42+ assertEquals ( diagnostic . fix , [ { range : [ 28 , 30 ] , text : ' ' } ] ) ;
4343 } ) ;
4444
4545 await test . step ( 'after-colon rule, no space' , ( ) => {
4646 const diagnostics = Deno . lint . runPlugin (
4747 colonSpacing ,
4848 'main.ts' ,
4949 `
50- export function Foo(prop1: string, prop2: number ) :string {
50+ export function Foo() :string {
5151 return 'Hello World!';
5252 }
5353 `
@@ -59,15 +59,15 @@ Deno.test('colon-spacing plugin', async (test) => {
5959
6060 assertEquals ( diagnostic . id , 'colon-spacing/after-colon' ) ;
6161 assertEquals ( diagnostic . message , 'Wrong colon spacing. Expected 1 space after colon.' ) ;
62- assertEquals ( diagnostic . fix , [ { range : [ 58 , 58 ] , text : ' ' } ] ) ;
62+ assertEquals ( diagnostic . fix , [ { range : [ 30 , 30 ] , text : ' ' } ] ) ;
6363 } ) ;
6464
6565 await test . step ( 'after-colon rule, too many spaces' , ( ) => {
6666 const diagnostics = Deno . lint . runPlugin (
6767 colonSpacing ,
6868 'main.ts' ,
6969 `
70- export function Foo(prop1: string, prop2: number ) : string {
70+ export function Foo() : string {
7171 return 'Hello World!';
7272 }
7373 `
@@ -79,15 +79,15 @@ Deno.test('colon-spacing plugin', async (test) => {
7979
8080 assertEquals ( diagnostic . id , 'colon-spacing/after-colon' ) ;
8181 assertEquals ( diagnostic . message , 'Wrong colon spacing. Expected 1 space after colon.' ) ;
82- assertEquals ( diagnostic . fix , [ { range : [ 58 , 60 ] , text : ' ' } ] ) ;
82+ assertEquals ( diagnostic . fix , [ { range : [ 30 , 32 ] , text : ' ' } ] ) ;
8383 } ) ;
8484
8585 await test . step ( 'before-colon/after-colon rule, no space, both' , ( ) => {
8686 const diagnostics = Deno . lint . runPlugin (
8787 colonSpacing ,
8888 'main.ts' ,
8989 `
90- export function Foo(prop1: string, prop2: number ):string {
90+ export function Foo():string {
9191 return 'Hello World!';
9292 }
9393 `
@@ -100,11 +100,11 @@ Deno.test('colon-spacing plugin', async (test) => {
100100
101101 assertEquals ( afterFunctionDiagnostic . id , 'colon-spacing/before-colon' ) ;
102102 assertEquals ( afterFunctionDiagnostic . message , 'Wrong colon spacing. Expected 1 space before colon.' ) ;
103- assertEquals ( afterFunctionDiagnostic . fix , [ { range : [ 56 , 56 ] , text : ' ' } ] ) ;
103+ assertEquals ( afterFunctionDiagnostic . fix , [ { range : [ 28 , 28 ] , text : ' ' } ] ) ;
104104
105105 assertEquals ( beforeTypeDiagnostic . id , 'colon-spacing/after-colon' ) ;
106106 assertEquals ( beforeTypeDiagnostic . message , 'Wrong colon spacing. Expected 1 space after colon.' ) ;
107- assertEquals ( beforeTypeDiagnostic . fix , [ { range : [ 57 , 57 ] , text : ' ' } ] ) ;
107+ assertEquals ( beforeTypeDiagnostic . fix , [ { range : [ 29 , 29 ] , text : ' ' } ] ) ;
108108 } ) ;
109109
110110 await test . step ( 'before-colon rule, no space' , ( ) => {
0 commit comments