@nabla/vite-plugin-eslint
Advanced tools
Comparing version 1.5.0 to 1.6.0
{ | ||
"name": "@nabla/vite-plugin-eslint", | ||
"description": "Plugs ESLint into Vite dev server", | ||
"version": "1.5.0", | ||
"version": "1.6.0", | ||
"license": "MIT", | ||
@@ -25,10 +25,10 @@ "author": "Arnaud Barré (https://github.com/ArnaudBarre)", | ||
"peerDependencies": { | ||
"vite": "^2 || ^3 || ^4", | ||
"vite": "^2 || ^3 || ^4 || ^5", | ||
"eslint": "*" | ||
}, | ||
"devDependencies": { | ||
"eslint": "^8.20.0", | ||
"prettier": "^2.7.1", | ||
"vite": "^3.0.2" | ||
"eslint": "^8.53.0", | ||
"prettier": "3.0.3", | ||
"vite": "^5.0.0" | ||
} | ||
} |
@@ -16,3 +16,3 @@ const { resolve } = require("path"); | ||
return { | ||
name: "eslint", | ||
name: "vite-plugin-eslint", | ||
apply: "serve", | ||
@@ -19,0 +19,0 @@ transform(_code, id) { |
@@ -18,2 +18,3 @@ const { workerData, parentPort } = require("worker_threads"); | ||
const [report] = await eslint.lintFiles(path); | ||
if (!report) return; // Can be empty with errorOnUnmatchedPattern: false | ||
if (report.output !== undefined) await fs.writeFile(path, report.output); | ||
@@ -31,4 +32,4 @@ if (report.messages.length === 0) return; | ||
`${location}: ${chalk[m.severity === 2 ? "red" : "yellow"]( | ||
m.message | ||
)}${rule}` | ||
m.message, | ||
)}${rule}`, | ||
); | ||
@@ -43,4 +44,4 @@ }); | ||
`${chalk.yellow(`[eslint] File not found`)} ${chalk.dim( | ||
e.messageData.pattern | ||
)}` | ||
e.messageData.pattern, | ||
)}`, | ||
); | ||
@@ -47,0 +48,0 @@ } else { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6122
85