Skip to content

Commit 59e7bcc

Browse files
committed
fix(vscode): add back sort plugins hack
1 parent cfdc831 commit 59e7bcc

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

packages/vscode/extension.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@ vscode.languages.registerCodeActionsProvider(
9999
);`)
100100
}
101101

102+
// Ensure tsslint is the first plugin to be loaded, which fixes compatibility with "astro-build.astro-vscode"
103+
const pluginName = require('./package.json').contributes.typescriptServerPlugins[0].name;
104+
text = text.replace('"--globalPlugins",i.plugins', `"--globalPlugins",i.plugins.sort((a,b)=>(b.name==="${pluginName}"?1:0)-(a.name==="${pluginName}"?1:0))`);
105+
102106
return text;
103107
}
104108
return readFileSync(...args);

0 commit comments

Comments
 (0)