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-budapestian
Advanced tools
To make visually clear within a function body which variables are variables, and which ones are regular constants or variables, we use a bastard variant of Hungarian notation where we treat elements with a scope prefix:
p
for parameters (supported by this plugin),l
for local variables (not yet supported)g
for global variables (not yet supported).This convention makes weird re-assignment bugs immediately visible, and makes naming things
that would normally clash with regular javascript syntax a easier. E.g. you can't use
function
as a parameter - so you need creativity to come up with something - callback
is
a popular option for that. Just prefixing with a p
removes that mental stress.
You'll first need to install ESLint:
$ npm i eslint --save-dev
Next, install eslint-plugin-budapestian
:
$ npm install eslint-plugin-budapestian --save-dev
Note: If you installed ESLint globally (using the -g
flag) then you must also install eslint-plugin-budapestian
globally.
Add budapestian
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": ["budapestian"]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"budapestian/parameter-pattern": "error",
"budapestian/global-constant-pattern": "error"
}
}
auto fixable? | rule | description |
---|---|---|
yes | budapestian/parameter-pattern | pascal case function parameters and make them start with a p |
yes | budapestian/global-constant-pattern | makes sure global constants are in snaked upper case. |
FAQs
enforce budapestian style rules
The npm package eslint-plugin-budapestian receives a total of 32 weekly downloads. As such, eslint-plugin-budapestian popularity was classified as not popular.
We found that eslint-plugin-budapestian demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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.