Huan
Huan
@chimericdream You can write a glob expression to do this, and there is a similar example in the [documentation](https://github.com/dukeluo/eslint-plugin-check-file/blob/main/docs/rules/folder-naming-convention.md#custom-patterns): > To exclude __tests__ folder in src, use the glob expression...
v8.6.1 still have this problem.
Thank you for author's contribution, I wanted to share another alternative plugin I created: https://github.com/dukeluo/eslint-plugin-check-file, thanks!
I think `KEBAB_CASE` can do these things you said for files in nextjs app router project, so i havent add a new naming convention for the rule `filename-naming-convention`.
@chimericdream Could you share a minimal reproducible monorepo project so I can work on this? And it look like there is a way to work round this issue https://github.com/dukeluo/eslint-plugin-check-file/issues/38#issuecomment-2012085969.
@EthanLin-TWer 谢谢分享,干货很多!本文提倡从最上层的 React 组件入手,除了 mock 三方依赖之外,通过贯穿整个应用的单元测试策略来进行测试。有时候某些 ui-components, Domain Logic 足够复杂,我想本文测试策略是不是还不够覆盖到每个细节🤔(所以在你的示例代码中有对 ui-components 层的额外单元测试 ),我有个疑问,我们应该如何平衡「贯穿整个应用」和「额外为某一层增加测试」之间的关系,让我们整个系统的单元测试是充分的而又不是重叠的?我们应该对哪些层额外添加测试,哪些层放在 routes 层一并测试? 另外,在对 ui-components 层的单元测试中,有调用放在 routes 层级下的 tester `import { findCounter } from '../../../routes/__tests__/component-testers/counter.tester'`,是不是有一种打破分层的感觉 👀
> 所以说我现在直觉本质问题还是有些业务逻辑是写单独的React Hooks单测还是一样通过page tests覆盖,是吧? @EthanLin-TWer 是的, React Hooks 以及一些 Domain Object,期待你的下一篇 :)
根据 nextjs 的官方文档:https://nextjs.org/docs/pages/building-your-application/configuring/babel 还需要加入 `"presets": ["next/babel"]`,可以解决这个问题: ```json { "presets": ["next/babel"], "plugins": [] } ``` 但是,在 nextjs page router 运行时下会报出新的错误: ``` Global CSS cannot be imported from files other than your...
Could you share the examples that only can do with regex syntax not the glob syntax? I am fine with glob syntax for my current needs.