Skip to content

Commit 203dcb9

Browse files
committed
chore: fix linter
1 parent 63a1df5 commit 203dcb9

File tree

7 files changed

+10
-59
lines changed

7 files changed

+10
-59
lines changed

docs/plugins/markdown/markdown-chart/echarts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ If you can generate your chart data easily, you can just provide echarts config
7878

7979
If you need to use script to get the data, you can use `js` or `javascript` code block.
8080

81-
We will expose the echarts instance as `myChart` in the script, and you are expected to assign the echarts option object to `option` variable. Also, you can assign `width` and `height` variable to set the chart size.
81+
We will expose the echarts instance as `echarts` in the script, and you are expected to assign the echarts option object to `option` variable. Also, you can assign `width` and `height` variable to set the chart size.
8282

8383
````md
8484
::: echarts Title

plugins/markdown/plugin-markdown-chart/src/client/components/ChartJS.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ __chart_js_config__=config;
2828
}
2929
return __chart_js_config__;\
3030
`,
31-
)
31+
) as () => ChartConfiguration
3232

33-
return runner() as ChartConfiguration
33+
return runner()
3434
}
3535

3636
export default defineComponent({

plugins/markdown/plugin-markdown-chart/src/client/components/ECharts.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ const AsyncFunction = (async (): Promise<void> => {}).constructor
2727
const parseEChartsConfig = (
2828
config: string,
2929
type: 'js' | 'json',
30-
myChart: EChartsType,
30+
echarts: EChartsType,
3131
): Promise<EChartsConfig> => {
3232
if (type === 'js') {
33-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
33+
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
3434
const runner = AsyncFunction(
35-
'myChart',
35+
'echarts',
3636
`\
3737
let width,height,option,__echarts_config__;
3838
{
@@ -41,10 +41,9 @@ __echarts_config__={width,height,option};
4141
}
4242
return __echarts_config__;
4343
`,
44-
)
44+
) as (echarts: EChartsType) => Promise<EChartsConfig>
4545

46-
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
47-
return runner(myChart) as Promise<EChartsConfig>
46+
return runner(echarts)
4847
}
4948

5049
return Promise.resolve({ option: JSON.parse(config) as EChartsOption })

plugins/markdown/plugin-markdown-chart/src/client/components/Mermaid.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ const getThemeVariables = (isDarkmode: boolean): MermaidThemeVariables => ({
8080
})
8181

8282
export default defineComponent({
83-
// eslint-disable-next-line vue/multi-word-component-names
8483
name: 'Mermaid',
8584

8685
props: {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export * from './mermaid.js'
1+
export type * from './mermaid.js'
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export * from './markdown-it-plugins/index.js'
22
export * from './markdownChartPlugin.js'
3-
export * from './options.js'
3+
export type * from './options.js'

plugins/markdown/plugin-markdown-chart/src/node/markdown-it-plugins/chartJs.ts

Lines changed: 0 additions & 47 deletions
This file was deleted.

0 commit comments

Comments
 (0)