mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
fix: Lint typescript stories (no-changelog) (#4723)
* fix: Lint typescript stories (no-changelog) * import StoryFn as type
This commit is contained in:
parent
d8c2dffc37
commit
1821bb0699
|
@ -4,7 +4,7 @@ const path = require('path');
|
||||||
* @type {import('@storybook/core-common').StorybookConfig}
|
* @type {import('@storybook/core-common').StorybookConfig}
|
||||||
*/
|
*/
|
||||||
module.exports = {
|
module.exports = {
|
||||||
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.ts'],
|
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.{ts,js}'],
|
||||||
addons: [
|
addons: [
|
||||||
'@storybook/addon-links',
|
'@storybook/addon-links',
|
||||||
'@storybook/addon-essentials',
|
'@storybook/addon-essentials',
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import N8nActionToggle from './ActionToggle.vue';
|
import N8nActionToggle from './ActionToggle.vue';
|
||||||
import { action } from '@storybook/addon-actions';
|
import { action } from '@storybook/addon-actions';
|
||||||
|
import type { StoryFn } from '@storybook/vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
title: 'Atoms/ActionToggle',
|
title: 'Atoms/ActionToggle',
|
||||||
|
@ -23,7 +24,7 @@ const methods = {
|
||||||
onAction: action('action'),
|
onAction: action('action'),
|
||||||
};
|
};
|
||||||
|
|
||||||
const Template = (args, { argTypes }) => ({
|
const Template: StoryFn = (args, { argTypes }) => ({
|
||||||
props: Object.keys(argTypes),
|
props: Object.keys(argTypes),
|
||||||
components: {
|
components: {
|
||||||
N8nActionToggle,
|
N8nActionToggle,
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import type { StoryFn } from '@storybook/vue';
|
||||||
import N8nAvatar from './Avatar.vue';
|
import N8nAvatar from './Avatar.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -11,7 +12,7 @@ export default {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const Template = (args, { argTypes }) => ({
|
const Template: StoryFn = (args, { argTypes }) => ({
|
||||||
props: Object.keys(argTypes),
|
props: Object.keys(argTypes),
|
||||||
components: {
|
components: {
|
||||||
N8nAvatar,
|
N8nAvatar,
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import type { StoryFn } from '@storybook/vue';
|
||||||
import N8nBadge from './Badge.vue';
|
import N8nBadge from './Badge.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -15,7 +16,7 @@ export default {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const Template = (args, { argTypes }) => ({
|
const Template: StoryFn = (args, { argTypes }) => ({
|
||||||
props: Object.keys(argTypes),
|
props: Object.keys(argTypes),
|
||||||
components: {
|
components: {
|
||||||
N8nBadge,
|
N8nBadge,
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import type { StoryFn } from '@storybook/vue';
|
||||||
import N8nBlockUi from './BlockUi.vue';
|
import N8nBlockUi from './BlockUi.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -5,7 +6,7 @@ export default {
|
||||||
component: N8nBlockUi,
|
component: N8nBlockUi,
|
||||||
};
|
};
|
||||||
|
|
||||||
const Template = (args, { argTypes }) => ({
|
const Template: StoryFn = (args, { argTypes }) => ({
|
||||||
props: Object.keys(argTypes),
|
props: Object.keys(argTypes),
|
||||||
components: {
|
components: {
|
||||||
N8nBlockUi,
|
N8nBlockUi,
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import N8nFormBox from './FormBox.vue';
|
import N8nFormBox from './FormBox.vue';
|
||||||
import { action } from '@storybook/addon-actions';
|
import { action } from '@storybook/addon-actions';
|
||||||
|
import type { StoryFn } from '@storybook/vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
title: 'Modules/FormBox',
|
title: 'Modules/FormBox',
|
||||||
|
@ -15,7 +16,7 @@ const methods = {
|
||||||
onInput: action('input'),
|
onInput: action('input'),
|
||||||
};
|
};
|
||||||
|
|
||||||
const Template = (args, { argTypes }) => ({
|
const Template: StoryFn = (args, { argTypes }) => ({
|
||||||
props: Object.keys(argTypes),
|
props: Object.keys(argTypes),
|
||||||
components: {
|
components: {
|
||||||
N8nFormBox,
|
N8nFormBox,
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import N8nFormInput from './FormInput.vue';
|
import N8nFormInput from './FormInput.vue';
|
||||||
import { action } from '@storybook/addon-actions';
|
import { action } from '@storybook/addon-actions';
|
||||||
|
import type { StoryFn } from '@storybook/vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
title: 'Modules/FormInput',
|
title: 'Modules/FormInput',
|
||||||
|
@ -13,7 +14,7 @@ const methods = {
|
||||||
onChange: action('change'),
|
onChange: action('change'),
|
||||||
};
|
};
|
||||||
|
|
||||||
const Template = (args, { argTypes }) => ({
|
const Template: StoryFn = (args, { argTypes }) => ({
|
||||||
props: Object.keys(argTypes),
|
props: Object.keys(argTypes),
|
||||||
components: {
|
components: {
|
||||||
N8nFormInput,
|
N8nFormInput,
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import N8nFormInputs from './FormInputs.vue';
|
import N8nFormInputs from './FormInputs.vue';
|
||||||
import { action } from '@storybook/addon-actions';
|
import { action } from '@storybook/addon-actions';
|
||||||
|
import type { StoryFn } from '@storybook/vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
title: 'Modules/FormInputs',
|
title: 'Modules/FormInputs',
|
||||||
|
@ -15,7 +16,7 @@ const methods = {
|
||||||
onSubmit: action('submit'),
|
onSubmit: action('submit'),
|
||||||
};
|
};
|
||||||
|
|
||||||
const Template = (args, { argTypes }) => ({
|
const Template: StoryFn = (args, { argTypes }) => ({
|
||||||
props: Object.keys(argTypes),
|
props: Object.keys(argTypes),
|
||||||
components: {
|
components: {
|
||||||
N8nFormInputs,
|
N8nFormInputs,
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import type { StoryFn } from '@storybook/vue';
|
||||||
import N8nHeading from './Heading.vue';
|
import N8nHeading from './Heading.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -19,7 +20,7 @@ export default {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const Template = (args, { argTypes }) => ({
|
const Template: StoryFn = (args, { argTypes }) => ({
|
||||||
props: Object.keys(argTypes),
|
props: Object.keys(argTypes),
|
||||||
components: {
|
components: {
|
||||||
N8nHeading,
|
N8nHeading,
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import type { StoryFn } from '@storybook/vue';
|
||||||
import N8nIcon from './Icon.vue';
|
import N8nIcon from './Icon.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -21,7 +22,7 @@ export default {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const Template = (args, { argTypes }) => ({
|
const Template: StoryFn = (args, { argTypes }) => ({
|
||||||
props: Object.keys(argTypes),
|
props: Object.keys(argTypes),
|
||||||
components: {
|
components: {
|
||||||
N8nIcon,
|
N8nIcon,
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import N8nInputLabel from './InputLabel.vue';
|
import N8nInputLabel from './InputLabel.vue';
|
||||||
import N8nInput from '../N8nInput';
|
import N8nInput from '../N8nInput';
|
||||||
|
import type { StoryFn } from '@storybook/vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
title: 'Atoms/Input Label',
|
title: 'Atoms/Input Label',
|
||||||
|
@ -10,7 +11,7 @@ export default {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const Template = (args, { argTypes }) => ({
|
const Template: StoryFn = (args, { argTypes }) => ({
|
||||||
props: Object.keys(argTypes),
|
props: Object.keys(argTypes),
|
||||||
components: {
|
components: {
|
||||||
N8nInputLabel,
|
N8nInputLabel,
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import N8nInputNumber from './InputNumber.vue';
|
import N8nInputNumber from './InputNumber.vue';
|
||||||
import { action } from '@storybook/addon-actions';
|
import { action } from '@storybook/addon-actions';
|
||||||
|
import type { StoryFn } from '@storybook/vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
title: 'Atoms/Input Number',
|
title: 'Atoms/Input Number',
|
||||||
|
@ -51,7 +52,7 @@ const methods = {
|
||||||
onInput: action('input'),
|
onInput: action('input'),
|
||||||
};
|
};
|
||||||
|
|
||||||
const Template = (args, { argTypes }) => ({
|
const Template: StoryFn = (args, { argTypes }) => ({
|
||||||
props: Object.keys(argTypes),
|
props: Object.keys(argTypes),
|
||||||
components: {
|
components: {
|
||||||
N8nInputNumber,
|
N8nInputNumber,
|
||||||
|
@ -71,7 +72,7 @@ Input.args = {
|
||||||
controls: false,
|
controls: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
const ManyTemplate = (args, { argTypes }) => ({
|
const ManyTemplate: StoryFn = (args, { argTypes }) => ({
|
||||||
props: Object.keys(argTypes),
|
props: Object.keys(argTypes),
|
||||||
components: {
|
components: {
|
||||||
N8nInputNumber,
|
N8nInputNumber,
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import N8nLink from './Link.vue';
|
import N8nLink from './Link.vue';
|
||||||
import { action } from '@storybook/addon-actions';
|
import { action } from '@storybook/addon-actions';
|
||||||
|
import type { StoryFn } from '@storybook/vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
title: 'Atoms/Link',
|
title: 'Atoms/Link',
|
||||||
|
@ -18,7 +19,7 @@ const methods = {
|
||||||
onClick: action('click'),
|
onClick: action('click'),
|
||||||
};
|
};
|
||||||
|
|
||||||
const Template = (args, { argTypes }) => ({
|
const Template: StoryFn = (args, { argTypes }) => ({
|
||||||
props: Object.keys(argTypes),
|
props: Object.keys(argTypes),
|
||||||
components: {
|
components: {
|
||||||
N8nLink,
|
N8nLink,
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import type { StoryFn } from '@storybook/vue';
|
||||||
import N8nLoading from './Loading.vue';
|
import N8nLoading from './Loading.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -29,7 +30,7 @@ export default {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const Template = (args, { argTypes }) => ({
|
const Template: StoryFn = (args, { argTypes }) => ({
|
||||||
props: Object.keys(argTypes),
|
props: Object.keys(argTypes),
|
||||||
components: {
|
components: {
|
||||||
N8nLoading,
|
N8nLoading,
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import type { StoryFn } from '@storybook/vue';
|
||||||
import N8nMarkdown from './Markdown.vue';
|
import N8nMarkdown from './Markdown.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -29,7 +30,7 @@ export default {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const Template = (args, { argTypes }) => ({
|
const Template: StoryFn = (args, { argTypes }) => ({
|
||||||
props: Object.keys(argTypes),
|
props: Object.keys(argTypes),
|
||||||
components: {
|
components: {
|
||||||
N8nMarkdown,
|
N8nMarkdown,
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import type { StoryFn } from '@storybook/vue';
|
||||||
import N8nPopover from './Popover.vue';
|
import N8nPopover from './Popover.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -34,7 +35,7 @@ export default {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const Template = (args, { argTypes }) => ({
|
const Template: StoryFn = (args, { argTypes }) => ({
|
||||||
props: Object.keys(argTypes),
|
props: Object.keys(argTypes),
|
||||||
components: {
|
components: {
|
||||||
N8nPopover,
|
N8nPopover,
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import N8nRadioButtons from './RadioButtons.vue';
|
import N8nRadioButtons from './RadioButtons.vue';
|
||||||
|
|
||||||
import { action } from '@storybook/addon-actions';
|
import { action } from '@storybook/addon-actions';
|
||||||
|
import type { StoryFn } from '@storybook/vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
title: 'Atoms/RadioButtons',
|
title: 'Atoms/RadioButtons',
|
||||||
|
@ -20,7 +21,7 @@ const methods = {
|
||||||
onInput: action('input'),
|
onInput: action('input'),
|
||||||
};
|
};
|
||||||
|
|
||||||
const Template = (args, { argTypes }) => ({
|
const Template: StoryFn = (args, { argTypes }) => ({
|
||||||
props: Object.keys(argTypes),
|
props: Object.keys(argTypes),
|
||||||
components: {
|
components: {
|
||||||
N8nRadioButtons,
|
N8nRadioButtons,
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import type { StoryFn } from '@storybook/vue';
|
||||||
import N8nSpinner from './Spinner.vue';
|
import N8nSpinner from './Spinner.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -19,7 +20,7 @@ export default {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const Template = (args, { argTypes }) => ({
|
const Template: StoryFn = (args, { argTypes }) => ({
|
||||||
props: Object.keys(argTypes),
|
props: Object.keys(argTypes),
|
||||||
components: {
|
components: {
|
||||||
N8nSpinner,
|
N8nSpinner,
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { action } from '@storybook/addon-actions';
|
import { action } from '@storybook/addon-actions';
|
||||||
|
import type { StoryFn } from '@storybook/vue';
|
||||||
import N8nSticky from './Sticky.vue';
|
import N8nSticky from './Sticky.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -45,7 +46,7 @@ const methods = {
|
||||||
onResizeStart: action('resizestart'),
|
onResizeStart: action('resizestart'),
|
||||||
};
|
};
|
||||||
|
|
||||||
const Template = (args, { argTypes }) => ({
|
const Template: StoryFn = (args, { argTypes }) => ({
|
||||||
props: Object.keys(argTypes),
|
props: Object.keys(argTypes),
|
||||||
components: {
|
components: {
|
||||||
N8nSticky,
|
N8nSticky,
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import N8nTabs from './Tabs.vue';
|
import N8nTabs from './Tabs.vue';
|
||||||
|
|
||||||
import { action } from '@storybook/addon-actions';
|
import { action } from '@storybook/addon-actions';
|
||||||
|
import type { StoryFn } from '@storybook/vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
title: 'Atoms/Tabs',
|
title: 'Atoms/Tabs',
|
||||||
|
@ -15,7 +16,7 @@ const methods = {
|
||||||
onInput: action('input'),
|
onInput: action('input'),
|
||||||
};
|
};
|
||||||
|
|
||||||
const Template = (args, { argTypes }) => ({
|
const Template: StoryFn = (args, { argTypes }) => ({
|
||||||
props: Object.keys(argTypes),
|
props: Object.keys(argTypes),
|
||||||
components: {
|
components: {
|
||||||
N8nTabs,
|
N8nTabs,
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import type { StoryFn } from '@storybook/vue';
|
||||||
import N8nTag from './Tag.vue';
|
import N8nTag from './Tag.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -12,7 +13,7 @@ export default {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const Template = (args, { argTypes }) => ({
|
const Template: StoryFn = (args, { argTypes }) => ({
|
||||||
props: Object.keys(argTypes),
|
props: Object.keys(argTypes),
|
||||||
components: {
|
components: {
|
||||||
N8nTag,
|
N8nTag,
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import type { StoryFn } from '@storybook/vue';
|
||||||
import N8nTags from './Tags.vue';
|
import N8nTags from './Tags.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -6,7 +7,7 @@ export default {
|
||||||
argTypes: {},
|
argTypes: {},
|
||||||
};
|
};
|
||||||
|
|
||||||
const Template = (args, { argTypes }) => ({
|
const Template: StoryFn = (args, { argTypes }) => ({
|
||||||
props: Object.keys(argTypes),
|
props: Object.keys(argTypes),
|
||||||
components: {
|
components: {
|
||||||
N8nTags,
|
N8nTags,
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import type { StoryFn } from '@storybook/vue';
|
||||||
import N8nText from './Text.vue';
|
import N8nText from './Text.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -27,7 +28,7 @@ export default {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const Template = (args, { argTypes }) => ({
|
const Template: StoryFn = (args, { argTypes }) => ({
|
||||||
props: Object.keys(argTypes),
|
props: Object.keys(argTypes),
|
||||||
components: {
|
components: {
|
||||||
N8nText,
|
N8nText,
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import type { StoryFn } from '@storybook/vue';
|
||||||
import N8nTooltip from './Tooltip.vue';
|
import N8nTooltip from './Tooltip.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -34,7 +35,7 @@ export default {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const Template = (args, { argTypes }) => ({
|
const Template: StoryFn = (args, { argTypes }) => ({
|
||||||
props: Object.keys(argTypes),
|
props: Object.keys(argTypes),
|
||||||
components: {
|
components: {
|
||||||
N8nTooltip,
|
N8nTooltip,
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import type { StoryFn } from '@storybook/vue';
|
||||||
import N8nUserInfo from './UserInfo.vue';
|
import N8nUserInfo from './UserInfo.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -8,7 +9,7 @@ export default {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const Template = (args, { argTypes }) => ({
|
const Template: StoryFn = (args, { argTypes }) => ({
|
||||||
props: Object.keys(argTypes),
|
props: Object.keys(argTypes),
|
||||||
components: {
|
components: {
|
||||||
N8nUserInfo,
|
N8nUserInfo,
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import N8nUserSelect from './UserSelect.vue';
|
import N8nUserSelect from './UserSelect.vue';
|
||||||
import { action } from '@storybook/addon-actions';
|
import { action } from '@storybook/addon-actions';
|
||||||
|
import type { StoryFn } from '@storybook/vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
title: 'Modules/UserSelect',
|
title: 'Modules/UserSelect',
|
||||||
|
@ -16,7 +17,7 @@ const methods = {
|
||||||
onFocus: action('focus'),
|
onFocus: action('focus'),
|
||||||
};
|
};
|
||||||
|
|
||||||
const Template = (args, { argTypes }) => ({
|
const Template: StoryFn = (args, { argTypes }) => ({
|
||||||
props: Object.keys(argTypes),
|
props: Object.keys(argTypes),
|
||||||
components: {
|
components: {
|
||||||
N8nUserSelect,
|
N8nUserSelect,
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import N8nUsersList from './UsersList.vue';
|
import N8nUsersList from './UsersList.vue';
|
||||||
import { action } from '@storybook/addon-actions';
|
import { action } from '@storybook/addon-actions';
|
||||||
|
import type { StoryFn } from '@storybook/vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
title: 'Modules/UsersList',
|
title: 'Modules/UsersList',
|
||||||
|
@ -15,7 +16,7 @@ const methods = {
|
||||||
onDelete: action('delete'),
|
onDelete: action('delete'),
|
||||||
};
|
};
|
||||||
|
|
||||||
const Template = (args, { argTypes }) => ({
|
const Template: StoryFn = (args, { argTypes }) => ({
|
||||||
props: Object.keys(argTypes),
|
props: Object.keys(argTypes),
|
||||||
components: {
|
components: {
|
||||||
N8nUsersList,
|
N8nUsersList,
|
||||||
|
|
Loading…
Reference in a new issue