diff --git a/.eslintrc.js b/.eslintrc.js index dac1e9e5..f4cc6a5f 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -61,7 +61,6 @@ module.exports = { 'no-useless-return': 'error', 'array-bracket-spacing': 'error', 'no-useless-escape': 'off', - 'no-unused-vars': 'off', 'no-eval': 'error', 'no-var': 'error', 'no-with': 'error', @@ -75,7 +74,6 @@ module.exports = { '{}': false, }, }], - '@typescript-eslint/no-unused-vars': 'off', '@typescript-eslint/no-non-null-assertion': 'off', 'vue/multi-word-component-names': 'off', 'vue/no-reserved-component-names': 'off', diff --git a/src/configs/shapes.ts b/src/configs/shapes.ts index 622e64f0..223cc6d5 100644 --- a/src/configs/shapes.ts +++ b/src/configs/shapes.ts @@ -160,7 +160,7 @@ export const SHAPE_PATH_FORMULAS = { defaultValue: 0.5, range: [0, 1], relative: 'left', - getBaseSize: (width: number, height: number) => width, + getBaseSize: (width: number) => width, formula: (width: number, height: number, value: number) => { const vertex = width * value return `M ${vertex} 0 L 0 ${height} L ${width} ${height} Z` @@ -171,7 +171,7 @@ export const SHAPE_PATH_FORMULAS = { defaultValue: 0.25, range: [0, 0.9], relative: 'left', - getBaseSize: (width: number, height: number) => width, + getBaseSize: (width: number) => width, formula: (width: number, height: number, value: number) => { const point = width * value return `M ${point} 0 L ${width} 0 L ${width - point} ${height} L 0 ${height} Z` @@ -182,7 +182,7 @@ export const SHAPE_PATH_FORMULAS = { defaultValue: 0.25, range: [0, 0.9], relative: 'right', - getBaseSize: (width: number, height: number) => width, + getBaseSize: (width: number) => width, formula: (width: number, height: number, value: number) => { const point = width * value return `M 0 0 L ${width - point} 0 L ${width} ${height} L ${point} ${height} Z` @@ -193,7 +193,7 @@ export const SHAPE_PATH_FORMULAS = { defaultValue: 0.25, range: [0, 0.5], relative: 'left', - getBaseSize: (width: number, height: number) => width, + getBaseSize: (width: number) => width, formula: (width: number, height: number, value: number) => { const point = width * value return `M ${point} 0 L ${width - point} 0 L ${width} ${height} L 0 ${height} Z` @@ -215,7 +215,7 @@ export const SHAPE_PATH_FORMULAS = { defaultValue: 0.2, range: [0, 0.9], relative: 'right', - getBaseSize: (width: number, height: number) => width, + getBaseSize: (width: number) => width, formula: (width: number, height: number, value: number) => { const point = width * value return `M ${width} ${height / 2} L ${width - point} 0 L 0 0 L ${point} ${height / 2} L 0 ${height} L ${width - point} ${height} Z` diff --git a/src/utils/prosemirror/schema/nodes.ts b/src/utils/prosemirror/schema/nodes.ts index 4a0c3e9f..4380b7f3 100644 --- a/src/utils/prosemirror/schema/nodes.ts +++ b/src/utils/prosemirror/schema/nodes.ts @@ -123,6 +123,7 @@ const paragraph: NodeSpec = { } // https://github.com/pipipi-pikachu/PPTist/issues/134 +// eslint-disable-next-line @typescript-eslint/no-unused-vars const { hard_break, ...otherNodes } = nodes export default { diff --git a/src/views/Editor/Canvas/hooks/useInsertFromCreateSelection.ts b/src/views/Editor/Canvas/hooks/useInsertFromCreateSelection.ts index b3b24a92..91486dba 100644 --- a/src/views/Editor/Canvas/hooks/useInsertFromCreateSelection.ts +++ b/src/views/Editor/Canvas/hooks/useInsertFromCreateSelection.ts @@ -1,7 +1,7 @@ import { Ref } from 'vue' import { storeToRefs } from 'pinia' import { useMainStore } from '@/store' -import { CreateElementSelectionData, CreatingLineElement, CreatingShapeElement } from '@/types/edit' +import { CreateElementSelectionData } from '@/types/edit' import useCreateElement from '@/hooks/useCreateElement' export default (viewportRef: Ref) => { diff --git a/src/views/Editor/SelectPanel.vue b/src/views/Editor/SelectPanel.vue index 752203e9..7e9027aa 100644 --- a/src/views/Editor/SelectPanel.vue +++ b/src/views/Editor/SelectPanel.vue @@ -86,7 +86,7 @@ import useOrderElement from '@/hooks/useOrderElement' import { ElementOrderCommands } from '@/types/edit' import MoveablePanel from '@/components/MoveablePanel.vue' -import { Button, Input } from 'ant-design-vue' +import { Button } from 'ant-design-vue' const slidesStore = useSlidesStore() const mainStore = useMainStore() diff --git a/src/views/Editor/Toolbar/ElementStylePanel/ChartStylePanel/ChartDataEditor.vue b/src/views/Editor/Toolbar/ElementStylePanel/ChartStylePanel/ChartDataEditor.vue index 928d44e0..0c1edcb7 100644 --- a/src/views/Editor/Toolbar/ElementStylePanel/ChartStylePanel/ChartDataEditor.vue +++ b/src/views/Editor/Toolbar/ElementStylePanel/ChartStylePanel/ChartDataEditor.vue @@ -60,7 +60,7 @@ import { ChartData } from '@/types/slides' import { KEYS } from '@/configs/hotkey' import { pasteCustomClipboardString, pasteExcelClipboardString } from '@/utils/clipboard' -import { Button, Input } from 'ant-design-vue' +import { Button } from 'ant-design-vue' const props = defineProps({ data: { diff --git a/src/views/Editor/Toolbar/SlideDesignPanel.vue b/src/views/Editor/Toolbar/SlideDesignPanel.vue index c9a05034..09e3b273 100644 --- a/src/views/Editor/Toolbar/SlideDesignPanel.vue +++ b/src/views/Editor/Toolbar/SlideDesignPanel.vue @@ -198,7 +198,7 @@