Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
eslines
processes an ESLint JSON report and downgrades errors to warnings, except for those reported in lines modified within the current git branch.
Install it:
npm install eslines
Add the default .eslines.json
config file in you git repo:
{
"rulesNotToDowngrade": [],
"remote": "origin/master",
"processors": {
"default": "lines-modified"
}
}
Run it:
eslint -f json . | eslines
eslines
reads its configuration for a file named .eslines.json
placed in the root of your git repository.
eslines
has two ways of processing an ESLint report. We call them processors. The processor lines-modified
will downgrade ESLint errors
to warnings
, except for lines modified in the topic branch. The processor parsing-errors
takes the ESLint report and outputs a new one containing only Parsing Errors
.
Options available through the config file:
rulesNotToDowngrade: an array containing valid ESLint rule ids. For any rule declared in this array, the lines-modified
processor won't downgrade to warnings
reported errors
for these rules, no matter whether the line was modified or not.
remote: lines modified are determined by diffing this remote git branch against the current branch.
processors: through this object, it is possible to tell eslines
which one to use by default and which one to use for particular branches. For example:
"processors": { "default": "lines-modified", "master": "parsing-errors", "my/topic-branch": "parsing-errors" }
With the above configuration, when running on a git branch called master
or my/topic-branch
, eslines
will report only parsing-errors
. For any other branch, eslines
will use the lines-modified
processor.
The eslines
Command Line Interface has the following options:
--processor or -p: choose an eslines
processor at run-time. lines-modified
will be used by default.
--format or -f: set any of ESLint default formatters as the output for eslines
. stylish
will be used by default.
--diff or -d: let you choose between two diff strategies:
index
: to diff HEAD against the git index.remote
: to diff HEAD against the git remote. This is the default.Some examples:
to get a report with junit
format containing only the parsing errors:
eslint -f json . | eslines -p parsing-errors -f junit
to get a report containing errors in lines modified within files at the git index
eslint -f json . | eslines -d index
FAQs
Utility to process ESLint JSON reports
We found that eslines demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 34 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
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.