netless-io/flat

[chore]: use `unicorn/filename-case` eslint rule

Open

#1,080 建立於 2021年11月10日

在 GitHub 查看
 (7 留言) (1 反應) (0 負責人)TypeScript (878 fork)user submission
enhancementgood first issue

倉庫指標

Star
 (6,396 star)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

Previously, we discussed the specification of file names (see: https://github.com/netless-io/flat/issues/714)

But this is all built on an ego-driven basis and we need to have a rule to help us check this.

Thanks to @LitoMore recommendation, we were made aware of the existence of unicorn/filename-case.

Rule Link: https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/filename-case.md

The following rules, which I have just come up with, may not be perfect.

"unicorn/filename-case": [
	"error",
	{
		"cases": {
			"kebabCase": true,
			"ignore": [
				"^[A-Z].+\\.tsx$",
				"^README.*\\.md$",
				".*\\.yaml",
				".*\\.yml"
			],
		}
	}
]

貢獻者指南