We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6bbdb21 commit c610198Copy full SHA for c610198
1 file changed
packages/cli/src/oxlint-plugin.ts
@@ -6,15 +6,10 @@ import {
6
VITE_PLUS_OXLINT_PLUGIN_NAME,
7
} from './oxlint-plugin-config.ts';
8
9
-function isStringLiteralLike(value: unknown): value is ESTree.StringLiteral {
10
- return (
11
- typeof value === 'object' &&
12
- value !== null &&
13
- 'type' in value &&
14
- value.type === 'Literal' &&
15
- 'value' in value &&
16
- typeof value.value === 'string'
17
- );
+function isStringLiteralLike(
+ value: ESTree.Expression | ESTree.TSModuleDeclaration['id'],
+): value is ESTree.StringLiteral {
+ return value.type === 'Literal';
18
}
19
20
function rewriteVitePlusImportSpecifier(specifier: string): string | null {
0 commit comments