gajus/eslint-plugin-canonical

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

Open

#18 opened on Feb 23, 2023

View on GitHub
 (2 comments) (0 reactions) (0 assignees)TypeScript (15 forks)github user discovery
enhancementhelp wanted

Repository metrics

Stars
 (150 stars)
PR merge metrics
 (PR metrics pending)

Description

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

Contributor guide