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-ignore-inserter
Advanced tools
When moving to a new ESLint config, or when adopting ESLint for the first time, it's common to have tons of violations that you want to silence for now.
When moving to a new ESLint config, or when adopting ESLint for the first time, it's common to have tons of violations that you want to silence for now.
This library exposes a helpful utility, eslint-ignore-inserter
, that will
do all the heavy lifting, and insert // eslint-ignore-next-line ...
comments
into your code.
Say you have the following code, with an indentation violation:
function example () {
console.log('Hello')
console.log('World!')
}
Assuming you have the ESLint indent
rule turned on, running this...
eslint --format json . | eslint-ignore-inserter
... yields this:
function example () {
console.log('Hello')
// eslint-disable-next-line indent
console.log('World!')
}
$ yarn add --dev eslint-ignore-inserter
Then, in your package.json
, you can do something like this:
{
"scripts": {
"eslint:insert-ignores": "eslint --format json . | eslint-ignore-inserter"
}
}
Alternatively, you can install it globally and do the piping in your shell.
The --dry-run
/ -d
flag will prevent any filesystem writes, and will instead
print the modified files to stdout for you to inspect.
MIT
FAQs
When moving to a new ESLint config, or when adopting ESLint for the first time, it's common to have tons of violations that you want to silence for now.
We found that eslint-ignore-inserter 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.