❯ npm test
multiline semicolons
✗ Add semicolon before `[` and `(` if they are the first things on the line
---
operator: equal
expected:
'var x = 2\n;[1, 2, 3].map(function () {})\n\nvar y = 8\n;(function () {\n bar()\n}())\n'
actual:
'var x = 2;[1, 2, 3].map(function () {})\n\nvar y = 8;(function () {\n bar()\n}())\n'
at: Test.<anonymous> (/Users/zat/.ghq/github.com/maxogden/standard-format/test/multiline.js:153:14)
...
singleline transforms
✗ Remove unneeded trailing semicolons that are followed by a comment
---
operator: equal
expected: 'var x = 123 // Useful comment\n'
actual: 'var x = 123// Useful comment\n'
at: Test.<anonymous> (/Users/zat/.ghq/github.com/maxogden/standard-format/test/singleline.js:119:14)
...
singleline transforms CRLF
✗ Remove unneeded trailing semicolons that are followed by a comment
---
operator: equal
expected: 'var x = 123 // Useful comment\r\n'
actual: 'var x = 123// Useful comment\r\n'
at: Test.<anonymous> (/Users/zat/.ghq/github.com/maxogden/standard-format/test/singleline.js:129:14)
...
Failed Tests: There were 3 failures
8) multiline semicolons
✗ Add semicolon before `[` and `(` if they are the first things on the line
11) singleline transforms
✗ Remove unneeded trailing semicolons that are followed by a comment
12) singleline transforms CRLF
✗ Remove unneeded trailing semicolons that are followed by a comment
total: 59
passing: 56
failing: 3
duration: 1.5s
Some tests fail in the latest version of esformatter.
This commit might be related. https://github.com/millermedeiros/esformatter/commit/99535097c3d1752c31b14e95c998945ea98d48d2