Skip to content

Commit 5c9960a

Browse files
committedFeb 19, 2024
feat: detect more editors
ref: antfu/eslint-config@5c628ff
1 parent c6af273 commit 5c9960a

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed
 

‎src/env.ts

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
import process from 'node:process'
22
import { isPackageExists } from 'local-pkg'
33

4-
export const isInEditor =
5-
(process.env.VSCODE_PID || process.env.JETBRAINS_IDE) && !process.env.CI
4+
export const isInEditor = !!(
5+
(process.env.VSCODE_PID ||
6+
process.env.VSCODE_CWD ||
7+
process.env.JETBRAINS_IDE ||
8+
process.env.VIM) &&
9+
!process.env.CI
10+
)
611
export const hasTypeScript = isPackageExists('typescript')
712
export const hasVue =
813
isPackageExists('vue') ||

0 commit comments

Comments
 (0)
Please sign in to comment.