Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
eslint-plugin-shadow-exception
Advanced tools
Allows to set a whitelist of variable names that you can shadow for ESLint "no-shadow"
This plugin allows you to have the ESLint rule no-shadow
with a whitelist of variable names.
While it is highly encouraged to not shadow any variables, I believe it is better to allow some exception than to force developpers to plainly disable the rule if they have some cases where they don't care.
You can see an interesting discussion about this on ESLint #1613
Install ESLint either locally or globally
$ npm install eslint
The plugin must be installed globally if ESLint is installed globally too.
$ npm install eslint-plugin-shadow-exception
Add plugins
sections and specify ESLint-plugin-shadow-exception as a plugin.
{
"plugins": [
"shadow-exception"
]
}
Then configure the rule. Note you must disable ESLint "no-shadow" rule.
{
"rules": {
"shadow-exception/no-shadow": [2, {
//default values
"exceptions": {
"err": true
}
}],
"no-shadow": 0
}
}
"err": false
will forbid shadowing of variables named err
.
The options is structured this way so you can overwrite/add variable names depending on the location of your .eslintrc
FAQs
Allows to set a whitelist of variable names that you can shadow for ESLint "no-shadow"
The npm package eslint-plugin-shadow-exception receives a total of 0 weekly downloads. As such, eslint-plugin-shadow-exception popularity was classified as not popular.
We found that eslint-plugin-shadow-exception 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.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.