question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to allow `console.log()` in .eslint?

See original GitHub issue

How to allow console.log() in .eslint? I tried

"rules": {
    "comma-dangle": 0,
    "no-console": 2
  }

but don’t work.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:3
  • Comments:20

github_iconTop GitHub Comments

124reactions
xyzdatacommented, Jul 25, 2017

eslint 0, 1, 2 means

http://eslint.org/docs/user-guide/getting-started#configuration


"off" or 0 - turn the rule off
"warn" or 1 - turn the rule on as a warning (doesn’t affect exit code)
"error" or 2 - turn the rule on as an error (exit code will be 1)

47reactions
ljharbcommented, Feb 21, 2016

no-console would need to be set to 0 to disable it. See http://eslint.org/docs/rules/no-console.html

Read more comments on GitHub >

github_iconTop Results From Across the Web

no-console - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >
How to disable "unexpected console statement" in Node.js ...
Simply install node.js if you don't have it installed, then run npm install eslint from a console/command prompt, then navigate to your project...
Read more >
eslint/eslint - Gitter
Ensure the done() callback is being called in this test. Le sigh. @scriptdaemon.
Read more >
eslint - allow console logging - Kevin Golding
You can globally allow console logging when using eslint, and/or disable it on a line by line basis: To disable eslint showing errors...
Read more >
eslint console log rule Code Example - Code Grepper
module.exports = { rules: { 'no-console': 'off', }, }; /* **** OR **** */ /* eslint-disable no-console */ console.log(someThing); /* eslint-enable ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found