Line ending errors
Jameskmonger opened this issue · 2 comments
Jameskmonger commented
After a fresh clone
, I ran npm install
, followed by npm test
and got this:
C:\Users\james.monger\Desktop\js\m\matcher (master) (matcher@0.1.2)
λ npm test
> matcher@0.1.2 test C:\Users\james.monger\Desktop\js\m\matcher
> xo && ava
C:\Users\james.monger\Desktop\js\m\matcher\index.js
1:14 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
2:58 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
3:18 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
4:1 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
5:41 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
6:40 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
7:1 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
8:26 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
9:28 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
10:3 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
11:1 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
12:22 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
13:1 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
14:27 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
15:18 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
16:30 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
17:3 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
18:1 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
19:63 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
20:1 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
21:32 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
22:35 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
23:3 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
24:1 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
25:48 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
26:1 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
27:23 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
28:1 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
29:25 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
30:1 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
31:12 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
32:2 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
33:1 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
34:47 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
35:60 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
36:92 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
37:3 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
38:1 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
39:30 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
40:17 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
41:3 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
42:1 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
43:44 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
44:1 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
45:40 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
46:27 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
47:5 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
48:1 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
49:15 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
50:1 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
51:43 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
52:44 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
53:42 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
54:30 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
55:1 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
56:46 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
57:38 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
58:36 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
59:5 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
60:4 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
61:1 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
62:17 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
63:24 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
64:4 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
65:3 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
66:1 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
67:13 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
68:3 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
69:1 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
70:53 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
71:43 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
72:3 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
C:\Users\james.monger\Desktop\js\m\matcher\test.js
1:24 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
2:20 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
3:1 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
4:25 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
5:51 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
6:51 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
7:66 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
8:58 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
9:1 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
10:31 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
11:4 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
12:1 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
13:33 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
14:42 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
15:39 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
16:40 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
17:40 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
18:52 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
19:36 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
20:36 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
21:44 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
22:41 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
23:31 error Unnecessary escape character: \* no-useless-escape
23:37 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
24:42 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
25:4 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
✖ 98 problems (98 errors, 0 warnings)
npm ERR! Test failed. See above for more details.
npm ERR! not ok code 0
sindresorhus commented
That's coming from the linter, not the tests and it's because you checked out with CRLF line-endings instead of LF.
Run
git config --global core.autocrlf false
git config --global core.eol lf
And then clone the repo again.
Jameskmonger commented
Thanks @sindresorhus 😄 It might be worth specifying in the .gitattributes
.