Installations
npm install @untitled-engineer/eslint-plugin-lit-a11y
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
14.17.0
NPM Version
7.16.0
Score
55
Supply Chain
94.6
Quality
69.8
Maintenance
100
Vulnerability
96.1
License
Releases
eslint-plugin-lit-a11y@4.1.4
Published on 11 Jul 2024
eslint-plugin-lit-a11y@4.1.3
Published on 26 Jun 2024
@open-wc/testing-helpers@3.0.1
Published on 23 Apr 2024
@open-wc/lit-helpers@0.7.0
Published on 20 Feb 2024
eslint-plugin-lit-a11y@4.1.2
Published on 30 Jan 2024
@open-wc/scoped-elements@3.0.5
Published on 24 Jan 2024
Contributors
Languages
JavaScript (95.73%)
TypeScript (2.46%)
HTML (1.68%)
MDX (0.12%)
Shell (0.01%)
Developer
Download Statistics
Total Downloads
451
Last Day
1
Last Week
1
Last Month
3
Last Year
51
GitHub Statistics
2,283 Stars
2,563 Commits
424 Forks
48 Watching
84 Branches
221 Contributors
Package Meta Information
Latest Version
1.1.0-next.2-dev
Package Id
@untitled-engineer/eslint-plugin-lit-a11y@1.1.0-next.2-dev
Unpacked Size
231.68 kB
Size
40.85 kB
File Count
96
NPM Version
7.16.0
Node Version
14.17.0
Total Downloads
Cumulative downloads
Total Downloads
451
Last day
0%
1
Compared to previous day
Last week
0%
1
Compared to previous week
Last month
-50%
3
Compared to previous month
Last year
-52.3%
51
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Linting >> EsLint Plugin Lit A11y >> Overview || -5
Accessibility linting plugin for lit-html.
Most of the rules are ported from eslint-plugin-jsx-a11y, and made to work with lit-html templates and custom elements.
Installation
You'll first need to install ESLint:
$ npm i eslint --save-dev
Next, install eslint-plugin-lit-a11y
:
$ npm install eslint-plugin-lit-a11y@next --save-dev
Note: If you installed ESLint globally (using the -g
flag) then you must also install eslint-plugin-lit-a11y
globally.
Usage
Add lit-a11y
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
1{ 2 "plugins": ["lit-a11y"] 3}
Then configure the rules you want to use under the rules section.
1{ 2 "rules": { 3 "lit-a11y/rule-name": 2 4 } 5}
Configuration
You may also extend the recommended configuration like so:
1{ 2 "extends": ["plugin:lit-a11y/recommended"] 3}
By default, any tagged template literal that starts with html
is linted. Example:
1html` <img /> `;
It could be the case, however, that you're using multiple rendering libraries in a project, like for example htm
, which also uses a html
tagged template literal, but has a slightly different syntax than lit-html. In this case you can specify the following option, to make sure only lit-html tagged template literals are linted:
1{ 2 "settings": { 3 "litHtmlSources": true 4 } 5}
This will cause the plugin to lint only html
tagged template literals that are imported from either 'lit'
, 'lit-element'
or 'lit-html'
.
If you're importing lit-html from a package that re-exports lit-html, like for example @apollo-elements/lit-apollo
, you can specify @apollo-elements/lit-apollo
as a valid litHtmlSource like so:
1{ 2 "settings": { 3 "litHtmlSources": ["@apollo-elements/lit-apollo"] 4 } 5}
Supported Rules
- lit-a11y/accessible-emoji
- lit-a11y/alt-text
- lit-a11y/anchor-has-content
- lit-a11y/anchor-is-valid
- lit-a11y/aria-activedescendant-has-tabindex
- lit-a11y/aria-attr-valid-value
- lit-a11y/aria-attrs
- lit-a11y/aria-role
- lit-a11y/aria-unsupported-elements
- lit-a11y/autocomplete-valid
- lit-a11y/click-events-have-key-events
- lit-a11y/heading-has-content
- lit-a11y/iframe-title
- lit-a11y/img-redundant-alt
- lit-a11y/mouse-events-have-key-events
- lit-a11y/no-access-key
- lit-a11y/no-autofocus
- lit-a11y/no-distracting-elements
- lit-a11y/no-invalid-change-handler
- lit-a11y/no-redundant-role
- lit-a11y/role-has-required-aria-attrs
- lit-a11y/role-supports-aria-attr
- lit-a11y/scope
- lit-a11y/tabindex-no-positive
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
Found 15/20 approved changesets -- score normalized to 7
Reason
dependency not pinned by hash detected -- score normalized to 6
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/canary.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/open-wc/open-wc/canary.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/canary.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/open-wc/open-wc/canary.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/canary.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/open-wc/open-wc/canary.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/open-wc/open-wc/lint.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/open-wc/open-wc/lint.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/preview.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/open-wc/open-wc/preview.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/preview.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/open-wc/open-wc/preview.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/preview.yml:51: update your workflow using https://app.stepsecurity.io/secureworkflow/open-wc/open-wc/preview.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/open-wc/open-wc/release.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/open-wc/open-wc/release.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/open-wc/open-wc/release.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/verify-node.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/open-wc/open-wc/verify-node.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/verify-node.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/open-wc/open-wc/verify-node.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/verify-node.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/open-wc/open-wc/verify-node.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/verify-node.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/open-wc/open-wc/verify-node.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/verify-node.yml:58: update your workflow using https://app.stepsecurity.io/secureworkflow/open-wc/open-wc/verify-node.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/verify-node.yml:61: update your workflow using https://app.stepsecurity.io/secureworkflow/open-wc/open-wc/verify-node.yml/master?enable=pin
- Info: 0 out of 15 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 2 third-party GitHubAction dependencies pinned
- Info: 7 out of 7 npmCommand dependencies pinned
Reason
1 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/canary.yml:1
- Warn: no topLevel permission defined: .github/workflows/lint.yml:1
- Warn: no topLevel permission defined: .github/workflows/preview.yml:1
- Warn: no topLevel permission defined: .github/workflows/release.yml:1
- Warn: no topLevel permission defined: .github/workflows/verify-node.yml:1
- Info: no jobLevel write permissions found
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 30 are checked with a SAST tool
Reason
39 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-28mc-g557-92m7
- Warn: Project is vulnerable to: GHSA-wf5p-g6vw-rhxx
- Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq
- Warn: Project is vulnerable to: GHSA-phwq-j96m-2c2q
- Warn: Project is vulnerable to: GHSA-ghr5-ch3p-vcr6
- Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc
- Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx
- Warn: Project is vulnerable to: GHSA-rrr8-f88r-h8q6
- Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc
- Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp
- Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97
- Warn: Project is vulnerable to: GHSA-9pv7-vfvm-6vr7
- Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j
- Warn: Project is vulnerable to: GHSA-c7qv-q95q-8v27
- Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22
- Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp
- Warn: Project is vulnerable to: GHSA-45rm-2893-5f49
- Warn: Project is vulnerable to: GHSA-6vfc-qv3f-vr6c
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55
- Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j
- Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w
- Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j
- Warn: Project is vulnerable to: GHSA-p493-635q-r6gr
- Warn: Project is vulnerable to: GHSA-3965-hpx2-q597
- Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg
- Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p
- Warn: Project is vulnerable to: GHSA-gp95-ppv5-3jc5
- Warn: Project is vulnerable to: GHSA-54xq-cgqr-rpm3
- Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36
- Warn: Project is vulnerable to: GHSA-w5p7-h5w8-2hfq
- Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7
- Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q
Score
3.9
/10
Last Scanned on 2024-12-23
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More