Installations
npm install eslint-plugin-lit
Developer Guide
Typescript
Yes
Module System
CommonJS
Min. Node Version
>= 12
Node Version
22.8.0
NPM Version
10.8.2
Score
86.9
Supply Chain
94.6
Quality
77.7
Maintenance
100
Vulnerability
98.9
License
Releases
Contributors
Unable to fetch Contributors
Languages
TypeScript (100%)
Developer
43081j
Download Statistics
Total Downloads
8,438,420
Last Day
9,129
Last Week
65,114
Last Month
292,043
Last Year
3,871,070
GitHub Statistics
120 Stars
175 Commits
22 Forks
7 Watching
1 Branches
11 Contributors
Package Meta Information
Latest Version
1.15.0
Package Id
eslint-plugin-lit@1.15.0
Unpacked Size
138.00 kB
Size
25.07 kB
File Count
90
NPM Version
10.8.2
Node Version
22.8.0
Publised On
07 Sept 2024
Total Downloads
Cumulative downloads
Total Downloads
8,438,420
Last day
-32.5%
9,129
Compared to previous day
Last week
-10.3%
65,114
Compared to previous week
Last month
-4.5%
292,043
Compared to previous month
Last year
77.7%
3,871,070
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
3
Peer Dependencies
1
Dev Dependencies
22
eslint-plugin-lit
ESLint plugin for Lit.
Install
Assuming you already have ESLint installed, run:
1# npm 2npm install eslint-plugin-lit --save-dev 3 4# yarn 5yarn add eslint-plugin-lit --dev
Usage
Then extend the recommended eslint config:
1{ 2 "extends": [ 3 // ... 4 "plugin:lit/recommended" 5 ] 6}
Or if you're using (flat) config files, add to your eslint.config.js
:
1import {configs} from 'eslint-plugin-lit'; 2 3export default [ 4 configs['flat/recommended'], 5 6 // or if you want to specify `files`, or other options 7 { 8 ...configs['flat/recommended'], 9 files: ['test/**/*.js'] 10 } 11];
Custom Configuration
If you want more fine-grained configuration, you can instead add a snippet like this to your ESLint configuration file:
1{ 2 "plugins": [ 3 // ... 4 "lit" 5 ], 6 "rules": { 7 // ... 8 "lit/no-legacy-template-syntax": "error", 9 "lit/no-template-arrow": "warn" 10 } 11}
List of supported rules
- lit/attribute-names
- lit/attribute-value-entities
- lit/ban-attributes
- lit/binding-positions
- lit/lifecycle-super
- lit/no-classfield-shadowing
- lit/no-duplicate-template-bindings
- lit/no-invalid-escape-sequences
- lit/no-invalid-html
- lit/no-legacy-imports
- lit/no-legacy-template-syntax
- lit/no-native-attributes
- lit/no-private-properties
- lit/no-property-change-update
- lit/no-template-arrow
- lit/no-template-bind
- lit/no-template-map
- lit/no-this-assign-in-render
- lit/no-useless-template-literals
- lit/no-value-attribute
- lit/prefer-nothing
- lit/quoted-expressions
- lit/value-after-constraints
Shareable configurations
Recommended
This plugin exports a recommended
configuration that enforces Lit good practices.
To enable this configuration use the extends
property in your .eslintrc
config file:
1{ 2 "extends": ["eslint:recommended", "plugin:lit/recommended"] 3}
Usage with eslint-plugin-wc
We highly recommend you also depend on eslint-plugin-wc as it will provide additional rules for web components in general:
1npm i -D eslint-plugin-wc
Then extend the recommended eslint config:
1{ 2 "extends": [ 3 "plugin:wc/recommended", 4 "plugin:lit/recommended" 5 ] 6}
License
MIT
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
packaging workflow detected
Details
- Info: Project packages its releases by way of GitHub Actions.: .github/workflows/publish.yml:24
Reason
3 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55
Reason
dependency not pinned by hash detected -- score normalized to 6
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/43081j/eslint-plugin-lit/main.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/43081j/eslint-plugin-lit/main.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/43081j/eslint-plugin-lit/main.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/43081j/eslint-plugin-lit/publish.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/43081j/eslint-plugin-lit/publish.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/43081j/eslint-plugin-lit/publish.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/43081j/eslint-plugin-lit/publish.yml/master?enable=pin
- Info: 0 out of 6 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 1 third-party GitHubAction dependencies pinned
- Info: 3 out of 3 npmCommand dependencies pinned
Reason
Found 6/23 approved changesets -- score normalized to 2
Reason
0 commit(s) and 1 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/main.yml:1
- Warn: no topLevel permission defined: .github/workflows/publish.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
license file not detected
Details
- Warn: project does not have a license file
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 27 are checked with a SAST tool
Score
4.2
/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