Gathering detailed insights and metrics for vite-plugin-eslint
Gathering detailed insights and metrics for vite-plugin-eslint
Gathering detailed insights and metrics for vite-plugin-eslint
Gathering detailed insights and metrics for vite-plugin-eslint
npm install vite-plugin-eslint
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
272 Stars
125 Commits
52 Forks
5 Watching
2 Branches
5 Contributors
Updated on 27 Nov 2024
TypeScript (87.05%)
Vue (9.64%)
HTML (3.31%)
Cumulative downloads
Total Downloads
Last day
-4.5%
85,655
Compared to previous day
Last week
1.9%
445,482
Compared to previous week
Last month
10.9%
1,888,879
Compared to previous month
Last year
95.1%
22,597,642
Compared to previous year
ESLint plugin for vite.
1npm install eslint vite-plugin-eslint --save-dev 2# or 3yarn add eslint vite-plugin-eslint -D
1import { defineConfig } from 'vite' 2import eslint from 'vite-plugin-eslint' 3 4export default defineConfig({ 5 plugins: [eslint()] 6})
If you do not want the plugin to break dev, you can configure the plugin this way:
1import { defineConfig } from 'vite'; 2import eslint from 'vite-plugin-eslint'; 3 4export default defineConfig({ 5 plugins: [ 6 { // default settings on build (i.e. fail on error) 7 ...eslint(), 8 apply: 'build', 9 }, 10 { // do not fail on serve (i.e. local development) 11 ...eslint({ 12 failOnWarning: false, 13 failOnError: false, 14 }), 15 apply: 'serve', 16 enforce: 'post' 17 } 18 ], 19}); 20
You can pass eslint options.
cache
boolean
false
Decrease execution time, Beta
Cache now correctly recognizes file changes, you can try it out.
fix
boolean
false
Auto fix source code.
eslintPath
string
eslint
Path to eslint
instance that will be used for linting.
lintOnStart
boolean
false
Check all matching files on project startup, too slow, turn on discreetly.
include
string | string[]
['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx', '**/*.vue', '**/*.svelte']
A single file, or array of files, to include when linting.
exclude
string | string[]
['**/node_modules/**']
A single file, or array of files, to exclude when linting.
formatter
string | ESLint.Formatter['format']
stylish
Custom error formatter or the name of a built-in formatter.
emitWarning
boolean
true
The warings found will be printed.
emitError
boolean
true
The errors found will be printed.
failOnWarning
boolean
false
Will cause the module build to fail if there are any warnings, based on emitWarning
.
failOnError
boolean
true
Will cause the module build to fail if there are any errors, based on emitError
.
MIT
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 2/28 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
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
13 existing vulnerabilities detected
Details
Score
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