
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
eslint-plugin-no-console-log
Advanced tools
Eslint plugin to warn on usage of `console.log`, unlike the built-in rule, this allows other `console` methods.
no-console: [2, { allow: ["warn", "error"] }]
An eslint plugin to warn on usage of console.log
.
Table of Contents generated with DocToc
npm i -S eslint-plugin-no-console-log
Add plugins
section and specify eslint-plugin-no-console-log as a plugin.
{
"plugins": [
"no-console-log"
]
}
Then, enable the rule.
{
"rules": {
"no-console-log/no-console-log": 1
}
}
This rule warns when it sees console.log
only. Other variants, like console.warn
are allowed, as it's assumed you've left them there on purpose. If you'd like to disable all console methods use the built-in rule no-console
.
The following patterns are considered warnings:
console.log('hi')
The following patterns are not warnings:
console.time('timer')
console.timeEnd('timer')
console.warn('oops')
console.error('kittens!')
If you want to disable all console
use to enforce a custom logging option.
https://github.com/eslint/eslint/issues/2621#issuecomment-105961888
Tests are in eslint's RuleTester.
npm test
will run the testsnpm run tdd
will run the tests on every file change.To publish, run npm run release -- [{patch,minor,major}]
NOTE: you might need to sudo ln -s /usr/local/bin/node /usr/bin/node
to ensure node is in your path for the git hooks to work
npm i -g npm
git push --follow-tags
will work. brew install git
Artistic 2.0 © Joey Baker and contributors. A copy of the license can be found in the file LICENSE
.
v2.0.0 | 2016-03-07
FAQs
Eslint plugin to warn on usage of `console.log`, unlike the built-in rule, this allows other `console` methods.
The npm package eslint-plugin-no-console-log receives a total of 366 weekly downloads. As such, eslint-plugin-no-console-log popularity was classified as not popular.
We found that eslint-plugin-no-console-log demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.