Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vite-plugin-eslint

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vite-plugin-eslint

ESLint plugin for vite.

  • 1.8.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
168K
decreased by-59.89%
Maintainers
1
Weekly downloads
 
Created

What is vite-plugin-eslint?

vite-plugin-eslint is a Vite plugin that integrates ESLint into the Vite build process. It allows you to lint your code on build and serve, ensuring that your code adheres to the specified linting rules.

What are vite-plugin-eslint's main functionalities?

Lint on Build

This feature allows you to lint your code during the build process. By adding the eslintPlugin to the Vite configuration, ESLint will run and report any linting errors or warnings.

import { defineConfig } from 'vite';
import eslintPlugin from 'vite-plugin-eslint';

export default defineConfig({
  plugins: [eslintPlugin()]
});

Lint on Serve

This feature allows you to lint your code during the development server process. You can specify which files to include or exclude from linting.

import { defineConfig } from 'vite';
import eslintPlugin from 'vite-plugin-eslint';

export default defineConfig({
  plugins: [eslintPlugin({
    include: ['src/**/*.js', 'src/**/*.vue'],
    exclude: ['node_modules']
  })]
});

Custom ESLint Options

This feature allows you to pass custom ESLint options to the plugin. For example, you can enable the 'fix' option to automatically fix linting errors where possible.

import { defineConfig } from 'vite';
import eslintPlugin from 'vite-plugin-eslint';

export default defineConfig({
  plugins: [eslintPlugin({
    eslintOptions: {
      fix: true
    }
  })]
});

Other packages similar to vite-plugin-eslint

Keywords

FAQs

Package last updated on 16 Aug 2022

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc