diff --git a/output.txt b/output.txt deleted file mode 100644 index c7a39dd..0000000 --- a/output.txt +++ /dev/null @@ -1,358 +0,0 @@ -yarn node v1.22.19 - console.log - Resource { - type: 'Resource', - body: [ - Message { - type: 'Message', - id: [Identifier], - value: [Pattern], - attributes: [Array], - comment: null, - span: [Span] - }, - Message { - type: 'Message', - id: [Identifier], - value: [Pattern], - attributes: [Array], - comment: null, - span: [Span] - } - ], - span: Span { type: 'Span', start: 0, end: 269 } - } - - at Object.print (dist/index.js:36:13) - - console.log - Message { - type: 'Message', - id: Identifier { - type: 'Identifier', - name: 'login-input', - span: Span { type: 'Span', start: 0, end: 11 } - }, - value: Pattern { - type: 'Pattern', - elements: [ [TextElement] ], - span: Span { type: 'Span', start: 14, end: 65 } - }, - attributes: [ - Attribute { - type: 'Attribute', - id: [Identifier], - value: [Pattern], - span: [Span] - }, - Attribute { - type: 'Attribute', - id: [Identifier], - value: [Pattern], - span: [Span] - } - ], - comment: null, - span: Span { type: 'Span', start: 0, end: 140 } - } - - at Object.print (dist/index.js:36:13) - - console.log - Pattern { - type: 'Pattern', - elements: [ - TextElement { - type: 'TextElement', - value: 'Predefined value\n\t.placeholder = email@example.com', - span: [Span] - } - ], - span: Span { type: 'Span', start: 14, end: 65 } - } - - at Object.print (dist/index.js:36:13) - - console.log - TextElement { - type: 'TextElement', - value: 'Predefined value\n\t.placeholder = email@example.com', - span: Span { type: 'Span', start: 14, end: 65 } - } - - at Object.print (dist/index.js:36:13) - - console.log - Attribute { - type: 'Attribute', - id: Identifier { - type: 'Identifier', - name: 'aria-label', - span: Span { type: 'Span', start: 71, end: 81 } - }, - value: Pattern { - type: 'Pattern', - elements: [ [TextElement] ], - span: Span { type: 'Span', start: 87, end: 104 } - }, - span: Span { type: 'Span', start: 70, end: 104 } - } - - at Object.print (dist/index.js:36:13) - - console.log - Pattern { - type: 'Pattern', - elements: [ - TextElement { - type: 'TextElement', - value: 'Login input value', - span: [Span] - } - ], - span: Span { type: 'Span', start: 87, end: 104 } - } - - at Object.print (dist/index.js:36:13) - - console.log - TextElement { - type: 'TextElement', - value: 'Login input value', - span: Span { type: 'Span', start: 87, end: 104 } - } - - at Object.print (dist/index.js:36:13) - - console.log - Attribute { - type: 'Attribute', - id: Identifier { - type: 'Identifier', - name: 'title', - span: Span { type: 'Span', start: 108, end: 113 } - }, - value: Pattern { - type: 'Pattern', - elements: [ [TextElement] ], - span: Span { type: 'Span', start: 119, end: 140 } - }, - span: Span { type: 'Span', start: 107, end: 140 } - } - - at Object.print (dist/index.js:36:13) - - console.log - Pattern { - type: 'Pattern', - elements: [ - TextElement { - type: 'TextElement', - value: 'Type your login email', - span: [Span] - } - ], - span: Span { type: 'Span', start: 119, end: 140 } - } - - at Object.print (dist/index.js:36:13) - - console.log - TextElement { - type: 'TextElement', - value: 'Type your login email', - span: Span { type: 'Span', start: 119, end: 140 } - } - - at Object.print (dist/index.js:36:13) - - console.log - Message { - type: 'Message', - id: Identifier { - type: 'Identifier', - name: 'password-input', - span: Span { type: 'Span', start: 142, end: 156 } - }, - value: Pattern { - type: 'Pattern', - elements: [ [TextElement] ], - span: Span { type: 'Span', start: 159, end: 167 } - }, - attributes: [ - Attribute { - type: 'Attribute', - id: [Identifier], - value: [Pattern], - span: [Span] - }, - Attribute { - type: 'Attribute', - id: [Identifier], - value: [Pattern], - span: [Span] - }, - Attribute { - type: 'Attribute', - id: [Identifier], - value: [Pattern], - span: [Span] - } - ], - comment: null, - span: Span { type: 'Span', start: 142, end: 268 } - } - - at Object.print (dist/index.js:36:13) - - console.log - Pattern { - type: 'Pattern', - elements: [ - TextElement { - type: 'TextElement', - value: 'Password', - span: [Span] - } - ], - span: Span { type: 'Span', start: 159, end: 167 } - } - - at Object.print (dist/index.js:36:13) - - console.log - TextElement { - type: 'TextElement', - value: 'Password', - span: Span { type: 'Span', start: 159, end: 167 } - } - - at Object.print (dist/index.js:36:13) - - console.log - Attribute { - type: 'Attribute', - id: Identifier { - type: 'Identifier', - name: 'placeholder', - span: Span { type: 'Span', start: 174, end: 185 } - }, - value: Pattern { - type: 'Pattern', - elements: [ [TextElement] ], - span: Span { type: 'Span', start: 191, end: 200 } - }, - span: Span { type: 'Span', start: 173, end: 200 } - } - - at Object.print (dist/index.js:36:13) - - console.log - Pattern { - type: 'Pattern', - elements: [ - TextElement { - type: 'TextElement', - value: 'password', - span: [Span] - } - ], - span: Span { type: 'Span', start: 191, end: 200 } - } - - at Object.print (dist/index.js:36:13) - - console.log - TextElement { - type: 'TextElement', - value: 'password', - span: Span { type: 'Span', start: 191, end: 200 } - } - - at Object.print (dist/index.js:36:13) - - console.log - Attribute { - type: 'Attribute', - id: Identifier { - type: 'Identifier', - name: 'aria-label', - span: Span { type: 'Span', start: 205, end: 215 } - }, - value: Pattern { - type: 'Pattern', - elements: [ [TextElement] ], - span: Span { type: 'Span', start: 218, end: 238 } - }, - span: Span { type: 'Span', start: 204, end: 238 } - } - - at Object.print (dist/index.js:36:13) - - console.log - Pattern { - type: 'Pattern', - elements: [ - TextElement { - type: 'TextElement', - value: 'Password input value', - span: [Span] - } - ], - span: Span { type: 'Span', start: 218, end: 238 } - } - - at Object.print (dist/index.js:36:13) - - console.log - TextElement { - type: 'TextElement', - value: 'Password input value', - span: Span { type: 'Span', start: 218, end: 238 } - } - - at Object.print (dist/index.js:36:13) - - console.log - Attribute { - type: 'Attribute', - id: Identifier { - type: 'Identifier', - name: 'title', - span: Span { type: 'Span', start: 241, end: 246 } - }, - value: Pattern { - type: 'Pattern', - elements: [ [TextElement] ], - span: Span { type: 'Span', start: 249, end: 268 } - }, - span: Span { type: 'Span', start: 240, end: 268 } - } - - at Object.print (dist/index.js:36:13) - - console.log - Pattern { - type: 'Pattern', - elements: [ - TextElement { - type: 'TextElement', - value: 'Type your password', - span: [Span] - } - ], - span: Span { type: 'Span', start: 249, end: 268 } - } - - at Object.print (dist/index.js:36:13) - - console.log - TextElement { - type: 'TextElement', - value: 'Type your password', - span: Span { type: 'Span', start: 249, end: 268 } - } - - at Object.print (dist/index.js:36:13) - -info Visit https://yarnpkg.com/en/docs/cli/node for documentation about this command. diff --git a/package.json b/package.json index dc01105..fc6c4ff 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@luca-iachini/prettier-plugin-fluent", - "version": "1.0.7", + "version": "1.0.8", "description": "Fluent Prettier Plugin", "author": "Luca Iachini", "license": "MIT", diff --git a/src/index.ts b/src/index.ts index 2703a0e..081049f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -44,8 +44,6 @@ function print( ): Doc { const node = path.node; - console.log(node); - switch (node.type) { case "Resource": return join(line, path.map(printFn, 'body')); diff --git a/test/fixtures.test.ts b/test/fixtures.test.ts index 0d53f4b..5b1061f 100644 --- a/test/fixtures.test.ts +++ b/test/fixtures.test.ts @@ -28,7 +28,7 @@ describe('it format', () => { await test_fixture('message_multiple_lines_spaces'); }); }); - describe.only('attributes', () => { + describe('attributes', () => { test('message with attributes', async () => { await test_fixture('attributes') });