Socket
Socket
Sign inDemoInstall

@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 - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

10

index.js

@@ -6,4 +6,6 @@ const chalk = require("chalk");

module.exports = function eslintPlugin(options = {}) {
const { eslintOptions = {}, shouldLint = (path) => path.match(/\.[jt]sx?$/) } =
options;
const {
eslintOptions = {},
shouldLint = (path) => path.match(/\.[jt]sx?$/),
} = options;
const eslint = new ESLint({ cache: true, ...eslintOptions });

@@ -17,3 +19,5 @@

if (path.includes("/src/") && shouldLint(path)) {
eslint.lintFiles(path).then(([report]) => {
eslint.isPathIgnored(path).then(async (ignored) => {
if (ignored) return;
const [report] = await eslint.lintFiles(path);
report.messages.forEach((m) => {

@@ -20,0 +24,0 @@ const prettyPath = path.slice(path.indexOf("/src/") + 1);

{
"name": "@nabla/vite-plugin-eslint",
"version": "1.0.1",
"version": "1.1.0",
"license": "MIT",

@@ -5,0 +5,0 @@ "description": "Plugs ESLint into Vite dev server",

@@ -33,3 +33,3 @@ # @nabla/vite-plugin-eslint

- Type: `ESLint.Options`
- Type: [ESLint.Options](https://eslint.org/docs/developer-guide/nodejs-api#-new-eslintoptions)
- Default: `{ cache: true }`

@@ -36,0 +36,0 @@

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