Skip to content

Commit 9534172

Browse files
fix: crash without typescript-eslint (#47)
1 parent 622f8e6 commit 9534172

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

configs/markdown.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ async function getMarkdownRecommendedConfig() {
1111
// Nothing
1212
}
1313

14-
if (!markdownPlugin) {
15-
return [];
16-
}
17-
1814
return [
1915
{
2016
name: "markdown/code-blocks",

configs/typescript.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,14 @@ async function getTypescriptRecommendedConfig() {
287287
// Nothing
288288
}
289289

290-
const { configs } = typescriptPlugin;
290+
const { configs } = typescriptPlugin || {
291+
configs: {
292+
base: { languageOptions: {} },
293+
eslintRecommended: {},
294+
recommended: [{ name: "typescript-eslint/recommended", rules: {} }],
295+
stylistic: [{ name: "typescript-eslint/stylistic", rules: {} }],
296+
},
297+
};
291298
const baseConfig = configs.base;
292299
const eslintRecommendedConfig = configs.eslintRecommended;
293300
const recommendedConfig = configs.recommended.find(

0 commit comments

Comments
 (0)