# Console Log Sage 9 eslint

**URL:** https://discourse.roots.io/t/console-log-sage-9-eslint/10316
**Category:** sage
**Created:** 2017-08-28T19:43:48Z
**Posts:** 8

## Post 1 by @wolfcola — 2017-08-28T19:43:48Z

I have tried this: [Enable console.log with eslint](https://discourse.roots.io/t/enable-console-log-with-eslint/8936)

But still receive error: unexpected console statement no-console

Copy of .eslintrc:  
{  
“root”: false,  
“rules”: {  
“no-console”: off,  
“import/no-extraneous-dependencies”: 0,  
“prefer-rest-params”: 0,  
“comma-dangle”: [“error”, {  
“arrays”: “always-multiline”,  
“objects”: “always-multiline”,  
“imports”: “always-multiline”,  
“exports”: “always-multiline”,  
“functions”: “ignore”  
}]  
}  
}

I’ve restarted the build with yarn build and yarn start many times. Still throws a no console error.

On sage 9 beta 3.

Any help appreciated. Cheers.

---

## Post 2 by @Nicolo_Sacchi — 2017-08-28T23:04:44Z

Put this in your rules:

```
"rules": {
      "comma-dangle": [
        "error",
        {
          "arrays": "always-multiline",
          "objects": "always-multiline",
          "imports": "always-multiline",
          "exports": "always-multiline",
          "functions": "ignore"
        }
      ],
      "no-console": "warn"
    }
```

Or if you want to completely turn it off, set it to `"off"` as a string

---

## Post 3 by @wolfcola — 2017-08-28T23:18:37Z

No dice. I still get the same error.

I’ve been adding: /\* eslint-disable \*/ to the top of my pages to get around it for development. No idea why “no-console” rule isn’t working.

---

## Post 4 by @Nicolo_Sacchi — 2017-08-28T23:38:15Z

Both settings work for me without any issue.  
If you’re using the latest version of sage remember to put these settings in your `package.json`

---

## Post 5 by @don — 2017-09-14T08:23:14Z

first setting didn’t work for me. However, adding it to the package.json did the trick. Thanks mate!

---

## Post 6 by @rjackson — 2017-11-30T16:40:36Z

@Nicolo, or anyone, are we saying that the [sage\resources\assets\build\.eslintrc](https://github.com/roots/sage/blob/master/resources/assets/build/.eslintrc) file is not used by Sage 9?

Can someone update\* the repo to remove that, to prevent users from repetitively failing to grok why their changes are being ignored??

\*I honestly don’t know how to pull request, if there’s a 101 I can do I’ll delete it myself.

---

## Post 7 by @esaner — 2017-12-14T22:28:44Z

+1

Took some time today to find out why additions to .eslintrc weren’t working. Perhaps it should be removed.

---

## Post 8 by @ben — 2017-12-15T06:06:06Z

Thanks, done: [https://github.com/roots/sage/commit/80a00245ab78c0ad61404c4858e3b35f4cc3268f](https://github.com/roots/sage/commit/80a00245ab78c0ad61404c4858e3b35f4cc3268f)
