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

@nabla/vite-plugin-eslint

Package Overview
Dependencies
Maintainers
2
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nabla/vite-plugin-eslint

Plugs ESLint into Vite dev server

  • 1.3.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
17K
decreased by-44.39%
Maintainers
2
Weekly downloads
 
Created
Source

@nabla/vite-plugin-eslint npm

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

logs.png

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

import { defineConfig } from "vite";
import eslintPlugin from "@nabla/vite-plugin-eslint";

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

Options

eslintOptions

shouldLint

  • Type: (path: string) => boolean
  • Default: (path) => path.match(/\/src\/.*\.[jt]sx?$/)

formatter

  • Type: string

If provided, the value is passed to eslint.loadFormatter. Default to a custom format with one line per warning/error. Use stylish to get a CRA like output.

Keywords

FAQs

Package last updated on 05 Jul 2021

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