gajus/eslint-plugin-canonical

[filename-match-exported] add kebab filename export for react components

Open

#18 aperta il 23 feb 2023

Vedi su GitHub
 (2 commenti) (0 reazioni) (0 assegnatari)TypeScript (15 fork)github user discovery
enhancementhelp wanted

Metriche repository

Star
 (150 star)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

Is there any chance to add an ability to have kebab filename for pascal type of export (react component)?

Rule sample: "canonical/filename-match-exported": [ 2, { "transforms": "kebab" } ]

Filename sample: thumb-up.tsx

Export sample: export default ThumbUp

Current state: Error: 1:1 error Filename 'thumb-up' must match the exported and transformed name 'thumbUp' canonical/filename-match-exported

Expected: No error

Guida contributor