Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
eslint-plugin-mmkal
Advanced tools
My eslint plugin with rules I find good. If you aren't me you probably shouldn't use this.
My eslint plugin with rules I find good. If you aren't me you probably shouldn't use this.
The following plugins/libraries are usable and should "just work" without needing to add extra configs. They should also "just work" if you have defined extra configs like .prettierrc.js
or tsconfig.json
.
Install with npm install eslint-plugin-mmkal
, then in your eslint.config.js:
module.exports = require('eslint-plugin-mmkal').recommendedFlatConfigs
That is, there are prettier options baked into this package, and the above usage will use them. If you want to rely on the default prettier resolution, just override:
const mmkal = require('eslint-plugin-mmkal')
module.exports = [
...mmkal.recommendedFlatConfigs,
{rules: {'prettier/prettier': 'warn'}},
]
This will rely on prettier's built-in config resolution. The reason this package doesn't do this is so that you can install it in a project without a .prettierrc.js
file, you get what I think is a better prettier config than the default.
Because the goal of this plugin is to make it quick to write sensible code rather than be 100% sure to prevent you from writing silly code (which no lint library can really achieve), globals for nodejs, browsers, commonjs and es2021 are enabled by default. Use typescript to get compiler errors on undefined globals.
All of the globals in the globals package (which are the official globals eslint uses) are available as configs:
const mmkal = require('eslint-plugin-mmkal')
module.exports = [
...mmkal.recommendedFlatConfigs,
...mmkal.configs.globals_greasemonkey,
]
This is somewhat experimental and might be changed, but there's a jerry-rigged "naming" system that ships with this package to make it easier to disable internal configs (which are pretty modular) if you don't want it:
const mmkal = require('eslint-plugin-mmkal')
module.exports = mmkal.withoutConfigs(mmkal.recommendedFlatConfigs, [
'globals_node',
'prettierPreset',
])
Since this is experimental and subject to change, what the actual names are isn't documented here, but the withoutConfigs
function is strongly typed, so IDE intellisense/autocomplete should hint what you can disable.
FAQs
My eslint plugin with rules I find good. If you aren't me you probably shouldn't use this.
The npm package eslint-plugin-mmkal receives a total of 767 weekly downloads. As such, eslint-plugin-mmkal popularity was classified as not popular.
We found that eslint-plugin-mmkal demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.