Levi Botelho
Levi Botelho

Reputation: 25204

Eslint not outputting errors to the console

I'm running eslint 1.9.0 on Windows on the following test file

var foo = (3 * 4);

The command I am using (from the same directory as the file) is

eslint test.js

However nothing is outputted to the console. If I understand correctly, it should output a few errors here such as no-extra-parens which is on by default.

Upvotes: 1

Views: 849

Answers (1)

Ilya Volodin
Ilya Volodin

Reputation: 11256

Starting from version 1.0.0 ESLint doesn't enable any of the rules by default. In order to enable "recommended" rules, you should create a .eslintrc file in the root of your project and add the following line to it:

{
  "extends": "eslint:recommended"
}

That will enable all of the rules that are marked as "recommended" on this page.

Upvotes: 2

Related Questions