netless-io/flat

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

Aperta

#1080 aperta il 10 nov 2021

 (7 commenti) (1 reazione) (0 assegnatari)TypeScript (868 fork)user submission
enhancementgood first issue

Metriche repository

Star
 (6416 stelle)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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

Guida contributor