Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
eslint-plugin-magic-variables
Advanced tools
prevent variables that are the number representation of a magic number from being used
prevent variables that are the number representation of a magic number from being used
You'll first need to install ESLint:
npm i eslint --save-dev
Next, install eslint-plugin-magic-variables
:
npm install eslint-plugin-magic-variables --save-dev
Add magic-variables
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": [
"magic-variables"
]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"magic-variables/rule-name": 2
}
}
Name | Description |
---|---|
no-magic-variables | prevent magic numbers from being used as a variable name |
FAQs
Prevent variable names that are numeric, or are the word form of a number from being used. i.e. FIFTY_TWO is not a valid variable name.
We found that eslint-plugin-magic-variables 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.