[英]ESLint for storybook files
How do I can write script for the stories extensions also?我如何也可以为故事扩展编写脚本? Currently I have:
目前我有:
"eslint": "eslint '**/{*,*.stories}.{ts,tsx}'",
My structure:我的结构:
src
components
SomeComponent
SomeComponent.tsx
SomeComponent.stories.tsx
index.ts
types.ts
but script as I wrote, works well only for tsx and ts files, but I would like to check .stories.tsx
also但是我写的脚本只适用于 tsx 和 ts 文件,但我也想检查
.stories.tsx
Just doing this should be enough to include the story files.只需这样做就足以包含故事文件。
"eslint": "eslint **/*.{ts,tsx}",
Another way of doing it is to use the —ext
flag.另一种方法是使用
—ext
标志。
"eslint": "eslint -ext .ts,.tsx **",
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.