eslint-plugin-canonical
eslint-plugin-canonical copied to clipboard
[filename-match-exported] add kebab filename export for react components
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
PS:
with { transforms: ['null', 'camel'] } I have error:
Filename 'thumb-up' must match any of the exported and transformed names 'ThumbUp', 'thumbUp' canonical/filename-match-exported