0

I run VSC, I use the configuration file for airbnb for ESlint.

And when I wanted to test it, I tried this:

const a = 'a';
const b = `${a}Hi`;
const d = function () {
  return b;
};
d();

The problem is that it keeps giving me errors about linebreaks:

Expected linebreaks to be 'LF' but found 'CRLF'. (linebreak-style)

There are 6 type of this error, plus this:

Unexpected unnamed function. (func-names)

It's getting annoying and I'm guessing it is because of the guide used, right?

Boy pro
  • 452
  • 4
  • 19
  • 3
    you can change them from the bottom right corner if needed – Giannis Mp Jul 09 '18 at 18:37
  • Oh finally. I never seen that. But can you please explain what was that? What does linebreak/carnage return mean(LF,CRLF)? Also the last error "Unexpected unamed function" didn't get solved. – Boy pro Jul 09 '18 at 18:40
  • 1
    Regarding your second error, see: https://eslint.org/docs/rules/func-names – nijm Jul 09 '18 at 18:40
  • 1
    What those linebreaks mean, see: https://stackoverflow.com/questions/1552749/difference-between-cr-lf-lf-and-cr-line-break-types – nijm Jul 09 '18 at 18:42

1 Answers1

2

To sum up: The difference between linebreaks is analysed here: Difference between CR LF, LF and CR line break types?

In order to change between CRLF and LF in Visual Studio Code you click on the bottom right side where the selected option is displayed.

For the func-names reference: func-names

Giannis Mp
  • 1,291
  • 6
  • 13