netless-io/flat

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

Open

#1.080 aberto em 10 de nov. de 2021

Ver no GitHub
 (7 comments) (1 reaction) (0 assignees)TypeScript (878 forks)user submission
enhancementgood first issue

Métricas do repositório

Stars
 (6.396 stars)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

Description

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"
			],
		}
	}
]

Guia do colaborador