File tree 1 file changed +19
-1
lines changed
1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -132,5 +132,23 @@ export async function ensurePackages(packages: (string | undefined)[]): Promise<
132
132
}
133
133
134
134
export function isInEditorEnv ( ) : boolean {
135
- return ! ! ( ( process . env . VSCODE_PID || process . env . VSCODE_CWD || process . env . JETBRAINS_IDE || process . env . VIM || process . env . NVIM ) && ! process . env . CI )
135
+ if ( process . env . CI )
136
+ return false
137
+ if ( isInGitHooksOrLintStaged ( ) )
138
+ return false
139
+ return ! ! ( false
140
+ || process . env . VSCODE_PID
141
+ || process . env . VSCODE_CWD
142
+ || process . env . JETBRAINS_IDE
143
+ || process . env . VIM
144
+ || process . env . NVIM
145
+ )
146
+ }
147
+
148
+ export function isInGitHooksOrLintStaged ( ) : boolean {
149
+ return ! ! ( false
150
+ || process . env . GIT_PARAMS
151
+ || process . env . VSCODE_GIT_COMMAND
152
+ || process . env . npm_lifecycle_script ?. startsWith ( 'lint-staged' )
153
+ )
136
154
}
You can’t perform that action at this time.
0 commit comments