Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
remark-lint-no-long-code
Advanced tools
remark lint plugin that warn when line in code block is too long
Warn when any line in code block is too long. By default, the accepted maximum length of each line in code block is 100 characters. You may configure the plugin by
100
{
"length": 100
}
[]
{
"exclude": ["dot", "smali"]
}
4
{
"tabWidth": 4
}
valid.md
In
```javascript
console.log("short line");
```
Out
No messages.
invalid.md
In
# heading
```javascript
console.log("this line contains 101 characters: extra extra extra extra extra extra extra extra ..."),
console.log("short line")
console.log("this line contains 101 characters: extra extra extra extra extra extra extra extra ...")
```
footer with `long long long long long long long long long long long long long long long long long long long long long long long long code`
Out
input.md:4:1-4:101: Maximum length of each code line is 100, but received 101
input.md:6:1-6:101: Maximum length of each code line is 100, but received 101
npm install remark-lint-no-long-code
You probably want to use it on the CLI through a config file:
...
"remarkConfig": {
"plugins": [
...
"remark-lint",
+ ["remark-lint-no-long-code", { "length": 100 }]
...
]
}
...
Or use it on the CLI directly
remark -u remark-lint -u remark-lint-no-long-code readme.md
Or use this on the API:
var remark = require('remark');
var report = require('vfile-reporter');
remark()
.use(require('remark-lint'))
+ .use(require('remark-lint-no-long-code'), { length: 100 })
.process('_Emphasis_ and **importance**', function (err, file) {
console.error(report(err || file));
});
FAQs
remark lint plugin that warn when line in code block is too long
We found that remark-lint-no-long-code 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
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.