Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
eslint-plugin-lit-a11y
Advanced tools
Accessibility linting plugin for lit-html.
Most of the rules are ported from eslint-plugin-jsx-a11y.
You'll first need to install ESLint:
$ npm i eslint --save-dev
Next, install eslint-plugin-lit-a11y
:
$ npm install eslint-plugin-lit-a11y --save-dev
Note: If you installed ESLint globally (using the -g
flag) then you must also install eslint-plugin-lit-a11y
globally.
Add lit-a11y
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": ["lit-a11y"]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"lit-a11y/rule-name": 2
}
}
You may also extend the recommended configuration like so:
{
"extends": ["plugin:lit-a11y/recommended"]
}
By default, only templates imported from 'lit-html'
or 'lit-element'
are linted. It may be the case, however, that you're importing lit-html's html
template tag function from a package that re-exports lit-html, like for example @apollo-elements/lit-apollo
does.
In this case, you can configure @apollo-elements/lit-apollo
as a valid lit-html source like so:
{
"settings": {
"litHtmlSources": ["@apollo-elements/lit-apollo"]
}
}
The reason for this check is that project may make use of multiple rendering libraries, which may have similar apis, like for example htm
, which also uses a html
tagged template literal, but handles syntax differently.
If you wish, you can disable this check by passing false
. In that case, every tagged-template-literal whose tag name is html
will be considered a lit-html template. This is not recommended in most cases.
{
"settings": {
"litHtmlSources": false
}
}
FAQs
linting plugin for lit-a11y
The npm package eslint-plugin-lit-a11y receives a total of 37,507 weekly downloads. As such, eslint-plugin-lit-a11y popularity was classified as popular.
We found that eslint-plugin-lit-a11y demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.