storybookjs / storybook

Storybook is the industry standard workshop for building, documenting, and testing UI components in isolation
https://storybook.js.org
MIT License
83.95k stars 9.22k forks source link

support .eslintrc.json #17715

Open stefanprobst opened 2 years ago

stefanprobst commented 2 years ago

Describe the bug

running sb init and choosing to install the eslint plugin fails when the eslint config is in .eslintrc.json.

Screenshot_20220315_103157

also, it does not work at all with a eslintConfig field in package.json

To Reproduce

System

System: OS: Linux 5.13 KDE neon 5.24 CPU: (4) x64 Intel(R) Core(TM) i5-6400T CPU @ 2.20GHz Binaries: Node: 16.14.0 - /usr/bin/node Yarn: 1.22.17 - /usr/bin/yarn npm: 8.3.1 - /usr/bin/npm Browsers: Chrome: 99.0.4844.51 Firefox: 98.0 npmPackages: @storybook/addon-actions: ^6.4.19 => 6.4.19 @storybook/addon-essentials: ^6.4.19 => 6.4.19 @storybook/addon-interactions: ^6.4.19 => 6.4.19 @storybook/addon-links: ^6.4.19 => 6.4.19 @storybook/react: ^6.4.19 => 6.4.19 @storybook/testing-library: ^0.0.9 => 0.0.9

Additional context

yuvi-pc commented 2 years ago

I get the same error when trying to add storybook on Next JS project.

Reproduce:

System: OS: windows 10 64 bit 19044.1645 Node: 16.0.0 Next: 12

Work around: