0
votes

I want to use eslint and the Airbnb style guide.

But it keeps throwing an error regarding indentation.

The error says:

Expected indentation of two characters but found 0

But in atom's settings I have the tab length option set (as it is by default) to two spaces.

I also unchecked the soft tab option, and, set the tab type to hard.

Still the error continues.

What do I have to do in order that, when I use a tab, atom transform my tab into two spaces and so I can use the tab key to indent, instead of having to use the spacebar?

1

1 Answers

1
votes

Change your Atom settings to soft tabs (spaces), eslint is expecting soft tabs of 2 spaces. Soft tabs are spaces, hard tabs are tab characters.

Just to be sure, you can check with atom's "toggle invisibles" command that every tab is equal to 2 spaces. (ctrl + shift + P to enter a command)