File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
packages/vite-plugin-checker/src/checkers/eslint Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 1
1
import chokidar from 'chokidar'
2
2
import { ESLint } from 'eslint'
3
3
import path from 'path'
4
+ import invariant from 'tiny-invariant'
4
5
import { fileURLToPath } from 'url'
5
6
import { parentPort } from 'worker_threads'
6
7
@@ -38,6 +39,11 @@ const createDiagnostic: CreateDiagnostic<'eslint'> = (pluginConfig) => {
38
39
if ( ! pluginConfig . eslint ) return
39
40
40
41
const options = optionator . parse ( pluginConfig . eslint . lintCommand )
42
+ invariant (
43
+ ! options . fix ,
44
+ 'Using `--fix` in `config.eslint.lintCommand` is not allowed in vite-plugin-checker, you could using `--fix` with editor.'
45
+ )
46
+
41
47
const translatedOptions = translateOptions ( options ) as ESLint . Options
42
48
43
49
const logLevel = ( ( ) => {
You can’t perform that action at this time.
0 commit comments