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

Typescript ESLint error TS2695 on stories.tsx #15867

Closed
RickCardoso opened this issue Aug 17, 2021 · 1 comment
Closed

Typescript ESLint error TS2695 on stories.tsx #15867

RickCardoso opened this issue Aug 17, 2021 · 1 comment

Comments

@RickCardoso
Copy link
Contributor

Describe the bug
Unexpected error on ESLint.
TS2695: Left side of comma operator is unused and has no side effects.

To Reproduce
Please create a reproduction by running npx sb@next repro and following the instructions. Read our documentation to learn more about creating reproductions.
Paste your repository and deployed reproduction here. We prioritize issues with reproductions over those without.

Simply install version 6.3.7 and create a story with Default.args such as this:

import { Meta } from '@storybook/react';
import React from 'react';
import { Radio, RadioProps } from './Radio';
import page from './Radio.docs.mdx';

export default {
  title: 'Components/Atoms/Radio',
  component: Radio,
  parameters: {
    docs: {
      page,
    },
  },
  argTypes: {
    name: { control: 'text' },
    value: { control: 'text' },
    disabled: { control: 'boolean' },
    children: { control: 'text' },
  },
} as Meta;

export const Default = ({ name, value, disabled, children }: RadioProps) => (
  <Radio name={name} value={value} disabled={disabled}>
    {children}
  </Radio>
);

Default.args = {
  children: 'A label',
  value: 'a value',
  name: 'anInput',
  disabled: false,
};

In version 6.3.1 this does not happen!

System
Please paste the results of npx sb@next info here.

Environment Info:

  System:
    OS: macOS 10.15.7
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
  Binaries:
    Node: 14.17.0 - ~/.nvm/versions/node/v14.17.0/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 7.15.1 - ~/.nvm/versions/node/v14.17.0/bin/npm
  Browsers:
    Chrome: 92.0.4515.131
    Firefox: 85.0
    Safari: 14.1
  npmPackages:
    @storybook/addon-actions: ^6.3.1 => 6.3.7 
    @storybook/addon-essentials: ^6.3.1 => 6.3.7 
    @storybook/addon-links: ^6.3.1 => 6.3.7 
    @storybook/react: ^6.3.1 => 6.3.7 

Additional context
Apparently this was an issue on a previous version of storybook.

@shilman
Copy link
Member

shilman commented Jun 7, 2023

We’re cleaning house! Storybook has changed a lot since this issue was created and we don’t know if it’s still valid. Please open a new issue referencing this one if:

@shilman shilman closed this as not planned Won't fix, can't repro, duplicate, stale Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants