Categories
TypeScript Answers

How to fix ‘console.log are not allowed’ error with TypeScript tslint?

Spread the love

Sometimes, we want to fix ‘console.log are not allowed’ error with TypeScript tslint.

In this article, we’ll look at how to fix ‘console.log are not allowed’ error with TypeScript tslint.

How to fix ‘console.log are not allowed’ error with TypeScript tslint?

To fix ‘console.log are not allowed’ error with TypeScript tslint, we can disable the no-console rule.

To do this, we write

{
  //...
  "rules": {
    "no-console": false
  }
  //...
}

in tslint.json in our project.

Conclusion

To fix ‘console.log are not allowed’ error with TypeScript tslint, we can disable the no-console rule.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *