Installations
npm install @nabla/vite-plugin-eslint
Developer
nabla
Developer Guide
Module System
ESM
Min. Node Version
Typescript Support
Yes
Node Version
16.20.2
NPM Version
8.19.4
Statistics
129 Stars
38 Commits
4 Forks
3 Watching
1 Branches
4 Contributors
Updated on 27 Nov 2024
Bundle Size
6.96 kB
Minified
2.83 kB
Minified + Gzipped
Languages
JavaScript (91.69%)
HTML (8.31%)
Total Downloads
Cumulative downloads
Total Downloads
2,310,009
Last day
2.5%
5,545
Compared to previous day
Last week
6%
31,081
Compared to previous week
Last month
3%
133,641
Compared to previous month
Last year
64.6%
1,299,390
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
@nabla/vite-plugin-eslint
Plugs ESLint into Vite dev server.
Differences with vite-plugin-eslint
- Keeps HMR fast: linting is done asynchronously and doesn't block the transform process
- Reduces noise: Display results via console logs
Because of this, the plugin can't fail the build and is only applied in dev. Like typechecking, linting should be done before or in parallel of the build command.
Install
yarn add --dev @nabla/vite-plugin-eslint
Usage
1import { defineConfig } from "vite"; 2import eslintPlugin from "@nabla/vite-plugin-eslint"; 3 4export default defineConfig({ 5 plugins: [eslintPlugin()], 6});
Options
eslintOptions
- Type: ESLint.Options
- Default:
{ cache: true }
Note: the fix
option is only supported from 1.3.4
shouldLint
- Type:
(path: string) => boolean
- Default:
(path) => path.match(/\/src\/[^?]*\.(vue|svelte|m?[jt]sx?)$/)
You can use DEBUG=eslint node_modules/.bin/vite
to debug this option (available in 1.4.0
)
formatter
- Type:
string | ((result: ESLint.LintResult) => void)
- Default: Custom format with one line per warning/error.
If provided, the value is passed to eslint.loadFormatter
. Use stylish
to get a CRA like output. Async formatters are supported in 1.5.0
. Function support was added in 2.0.2
.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
4 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm
- Warn: Project is vulnerable to: GHSA-64vr-g452-qvp3
- Warn: Project is vulnerable to: GHSA-9cwx-2883-4wfx
Reason
Found 0/24 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/nabla/vite-plugin-eslint/publish.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/nabla/vite-plugin-eslint/publish.yml/main?enable=pin
- Info: 0 out of 1 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 1 third-party GitHubAction dependencies pinned
Reason
detected GitHub workflow tokens with excessive permissions
Details
- 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
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'main'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 6 are checked with a SAST tool
Score
3.1
/10
Last Scanned on 2024-11-18
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