Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Lint typescript stories (no-changelog) #4723

Merged
merged 2 commits into from
Nov 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/design-system/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const path = require('path');
* @type {import('@storybook/core-common').StorybookConfig}
*/
module.exports = {
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.ts'],
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.{ts,js}'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import N8nActionToggle from './ActionToggle.vue';
import { action } from '@storybook/addon-actions';
import type { StoryFn } from '@storybook/vue';

export default {
title: 'Atoms/ActionToggle',
Expand All @@ -23,7 +24,7 @@ const methods = {
onAction: action('action'),
};

const Template = (args, { argTypes }) => ({
const Template: StoryFn = (args, { argTypes }) => ({
props: Object.keys(argTypes),
components: {
N8nActionToggle,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { StoryFn } from '@storybook/vue';
import N8nAvatar from './Avatar.vue';

export default {
Expand All @@ -11,7 +12,7 @@ export default {
},
};

const Template = (args, { argTypes }) => ({
const Template: StoryFn = (args, { argTypes }) => ({
props: Object.keys(argTypes),
components: {
N8nAvatar,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { StoryFn } from '@storybook/vue';
import N8nBadge from './Badge.vue';

export default {
Expand All @@ -15,7 +16,7 @@ export default {
},
};

const Template = (args, { argTypes }) => ({
const Template: StoryFn = (args, { argTypes }) => ({
props: Object.keys(argTypes),
components: {
N8nBadge,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import type { StoryFn } from '@storybook/vue';
import N8nBlockUi from './BlockUi.vue';

export default {
title: 'Atoms/BlockUI',
component: N8nBlockUi,
};

const Template = (args, { argTypes }) => ({
const Template: StoryFn = (args, { argTypes }) => ({
props: Object.keys(argTypes),
components: {
N8nBlockUi,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import N8nFormBox from './FormBox.vue';
import { action } from '@storybook/addon-actions';
import type { StoryFn } from '@storybook/vue';

export default {
title: 'Modules/FormBox',
Expand All @@ -15,7 +16,7 @@ const methods = {
onInput: action('input'),
};

const Template = (args, { argTypes }) => ({
const Template: StoryFn = (args, { argTypes }) => ({
props: Object.keys(argTypes),
components: {
N8nFormBox,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import N8nFormInput from './FormInput.vue';
import { action } from '@storybook/addon-actions';
import type { StoryFn } from '@storybook/vue';

export default {
title: 'Modules/FormInput',
Expand All @@ -13,7 +14,7 @@ const methods = {
onChange: action('change'),
};

const Template = (args, { argTypes }) => ({
const Template: StoryFn = (args, { argTypes }) => ({
props: Object.keys(argTypes),
components: {
N8nFormInput,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import N8nFormInputs from './FormInputs.vue';
import { action } from '@storybook/addon-actions';
import type { StoryFn } from '@storybook/vue';

export default {
title: 'Modules/FormInputs',
Expand All @@ -15,7 +16,7 @@ const methods = {
onSubmit: action('submit'),
};

const Template = (args, { argTypes }) => ({
const Template: StoryFn = (args, { argTypes }) => ({
props: Object.keys(argTypes),
components: {
N8nFormInputs,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { StoryFn } from '@storybook/vue';
import N8nHeading from './Heading.vue';

export default {
Expand All @@ -19,7 +20,7 @@ export default {
},
};

const Template = (args, { argTypes }) => ({
const Template: StoryFn = (args, { argTypes }) => ({
props: Object.keys(argTypes),
components: {
N8nHeading,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { StoryFn } from '@storybook/vue';
import N8nIcon from './Icon.vue';

export default {
Expand All @@ -21,7 +22,7 @@ export default {
},
};

const Template = (args, { argTypes }) => ({
const Template: StoryFn = (args, { argTypes }) => ({
props: Object.keys(argTypes),
components: {
N8nIcon,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import N8nInputLabel from './InputLabel.vue';
import N8nInput from '../N8nInput';
import type { StoryFn } from '@storybook/vue';

export default {
title: 'Atoms/Input Label',
Expand All @@ -10,7 +11,7 @@ export default {
},
};

const Template = (args, { argTypes }) => ({
const Template: StoryFn = (args, { argTypes }) => ({
props: Object.keys(argTypes),
components: {
N8nInputLabel,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import N8nInputNumber from './InputNumber.vue';
import { action } from '@storybook/addon-actions';
import type { StoryFn } from '@storybook/vue';

export default {
title: 'Atoms/Input Number',
Expand Down Expand Up @@ -51,7 +52,7 @@ const methods = {
onInput: action('input'),
};

const Template = (args, { argTypes }) => ({
const Template: StoryFn = (args, { argTypes }) => ({
props: Object.keys(argTypes),
components: {
N8nInputNumber,
Expand All @@ -71,7 +72,7 @@ Input.args = {
controls: false,
};

const ManyTemplate = (args, { argTypes }) => ({
const ManyTemplate: StoryFn = (args, { argTypes }) => ({
props: Object.keys(argTypes),
components: {
N8nInputNumber,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import N8nLink from './Link.vue';
import { action } from '@storybook/addon-actions';
import type { StoryFn } from '@storybook/vue';

export default {
title: 'Atoms/Link',
Expand All @@ -18,7 +19,7 @@ const methods = {
onClick: action('click'),
};

const Template = (args, { argTypes }) => ({
const Template: StoryFn = (args, { argTypes }) => ({
props: Object.keys(argTypes),
components: {
N8nLink,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { StoryFn } from '@storybook/vue';
import N8nLoading from './Loading.vue';

export default {
Expand Down Expand Up @@ -29,7 +30,7 @@ export default {
},
};

const Template = (args, { argTypes }) => ({
const Template: StoryFn = (args, { argTypes }) => ({
props: Object.keys(argTypes),
components: {
N8nLoading,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { StoryFn } from '@storybook/vue';
import N8nMarkdown from './Markdown.vue';

export default {
Expand Down Expand Up @@ -29,7 +30,7 @@ export default {
},
};

const Template = (args, { argTypes }) => ({
const Template: StoryFn = (args, { argTypes }) => ({
props: Object.keys(argTypes),
components: {
N8nMarkdown,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { StoryFn } from '@storybook/vue';
import N8nPopover from './Popover.vue';

export default {
Expand Down Expand Up @@ -34,7 +35,7 @@ export default {
},
};

const Template = (args, { argTypes }) => ({
const Template: StoryFn = (args, { argTypes }) => ({
props: Object.keys(argTypes),
components: {
N8nPopover,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import N8nRadioButtons from './RadioButtons.vue';

import { action } from '@storybook/addon-actions';
import type { StoryFn } from '@storybook/vue';

export default {
title: 'Atoms/RadioButtons',
Expand All @@ -20,7 +21,7 @@ const methods = {
onInput: action('input'),
};

const Template = (args, { argTypes }) => ({
const Template: StoryFn = (args, { argTypes }) => ({
props: Object.keys(argTypes),
components: {
N8nRadioButtons,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { StoryFn } from '@storybook/vue';
import N8nSpinner from './Spinner.vue';

export default {
Expand All @@ -19,7 +20,7 @@ export default {
},
};

const Template = (args, { argTypes }) => ({
const Template: StoryFn = (args, { argTypes }) => ({
props: Object.keys(argTypes),
components: {
N8nSpinner,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { action } from '@storybook/addon-actions';
import type { StoryFn } from '@storybook/vue';
import N8nSticky from './Sticky.vue';

export default {
Expand Down Expand Up @@ -45,7 +46,7 @@ const methods = {
onResizeStart: action('resizestart'),
};

const Template = (args, { argTypes }) => ({
const Template: StoryFn = (args, { argTypes }) => ({
props: Object.keys(argTypes),
components: {
N8nSticky,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import N8nTabs from './Tabs.vue';

import { action } from '@storybook/addon-actions';
import type { StoryFn } from '@storybook/vue';

export default {
title: 'Atoms/Tabs',
Expand All @@ -15,7 +16,7 @@ const methods = {
onInput: action('input'),
};

const Template = (args, { argTypes }) => ({
const Template: StoryFn = (args, { argTypes }) => ({
props: Object.keys(argTypes),
components: {
N8nTabs,
Expand Down
3 changes: 2 additions & 1 deletion packages/design-system/src/components/N8nTag/Tag.stories.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { StoryFn } from '@storybook/vue';
import N8nTag from './Tag.vue';

export default {
Expand All @@ -12,7 +13,7 @@ export default {
},
};

const Template = (args, { argTypes }) => ({
const Template: StoryFn = (args, { argTypes }) => ({
props: Object.keys(argTypes),
components: {
N8nTag,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { StoryFn } from '@storybook/vue';
import N8nTags from './Tags.vue';

export default {
Expand All @@ -6,7 +7,7 @@ export default {
argTypes: {},
};

const Template = (args, { argTypes }) => ({
const Template: StoryFn = (args, { argTypes }) => ({
props: Object.keys(argTypes),
components: {
N8nTags,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { StoryFn } from '@storybook/vue';
import N8nText from './Text.vue';

export default {
Expand Down Expand Up @@ -27,7 +28,7 @@ export default {
},
};

const Template = (args, { argTypes }) => ({
const Template: StoryFn = (args, { argTypes }) => ({
props: Object.keys(argTypes),
components: {
N8nText,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { StoryFn } from '@storybook/vue';
import N8nTooltip from './Tooltip.vue';

export default {
Expand Down Expand Up @@ -34,7 +35,7 @@ export default {
},
};

const Template = (args, { argTypes }) => ({
const Template: StoryFn = (args, { argTypes }) => ({
props: Object.keys(argTypes),
components: {
N8nTooltip,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { StoryFn } from '@storybook/vue';
import N8nUserInfo from './UserInfo.vue';

export default {
Expand All @@ -8,7 +9,7 @@ export default {
},
};

const Template = (args, { argTypes }) => ({
const Template: StoryFn = (args, { argTypes }) => ({
props: Object.keys(argTypes),
components: {
N8nUserInfo,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import N8nUserSelect from './UserSelect.vue';
import { action } from '@storybook/addon-actions';
import type { StoryFn } from '@storybook/vue';

export default {
title: 'Modules/UserSelect',
Expand All @@ -16,7 +17,7 @@ const methods = {
onFocus: action('focus'),
};

const Template = (args, { argTypes }) => ({
const Template: StoryFn = (args, { argTypes }) => ({
props: Object.keys(argTypes),
components: {
N8nUserSelect,
Expand Down
Loading