GithubHelp home page GithubHelp logo

Comments (6)

jookshub avatar jookshub commented on September 18, 2024 2

@mrmckeb Here is a small reproduction. https://github.com/jookshub/storybook_cra_tsx/tree/demo-eslint-issue%2387

Without EXTEND_ESLINT Storybook is using its own eslint rule set.

Is there any guide on how to setup Storybook 6 with an CRA & TypeScript project that uses its own esLint config?

from presets.

josias-r avatar josias-r commented on September 18, 2024 1

@mrmckeb
Sorry, I'm working in quite a large project, but here are my versions:

@storybook/* : ^5.3.9
@storybook/preset-create-react-app: ^1.5.2
react-scripts: ^3.3.1
react: ^16.12.0
typescript: ^3.7.5

In my .env file I only have the extend eslint option set.

Take a look at the issue I mentioned above. Turns out the errors I'm getting are coming from a react-docgen installation that isn't configured for typescript. This still doesn't explain this though:

I just don't understand why react-docgen errors appear only after I added EXTEND_ESLINT=true. I don't see a connection between eslint and react-docgen 🤔

from presets.

josias-r avatar josias-r commented on September 18, 2024

I just discovered something weird. I opened this issue, which causes react-docgen to fail.

Turns out, all the errors I'm getting after setting the env variable, are coming from react-docgen in advanced use cases w/ typescript.

I just don't understand why react-docgen errors appear only after I added EXTEND_ESLINT=true. I don't see a connection between eslint and react-docgen 🤔

from presets.

mrmckeb avatar mrmckeb commented on September 18, 2024

Hey @josias-r, are you able to provide a reproduction repo? Or if not, at least version of packages and configuration details? Thanks!

from presets.

mrmckeb avatar mrmckeb commented on September 18, 2024

I think it would help if you could share a very small reproduction - it doesn't have to contain anything but a copy of your config and one simple story to show this error.

I can then properly investigate and propose a fix.

I assume - but could be wrong - that it is something to do with the way ESLint is handling TS/JS files as you suggested.

from presets.

mrmckeb avatar mrmckeb commented on September 18, 2024

And sorry for the very slow response, I was away on a business trip that was much busier than expected.

from presets.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.