eslint-plugin-filenames
eslint-plugin-filenames copied to clipboard
match-exported with non-default exports
Our company enforces the 'no-default-export' rule across the codebase. So while there is a single export from every file, it is a non-default named export.
Is there any way to use or adapt this library to check filename against non-default export?
I imagine expanding the match-exported rule applicability to files with exactly one non-default named export, continuing to ignore files that have multiple non-default exports.
If needed, to avoid breaking changes, this could be done as a configuration switch in the rule.
I'm looking for this also
+1
Also trying to figure out a way to enforce this. I'd prefer to be able to use the import/no-default-export
rule along with the filename/match-exported
rule so that the file name, export name, and import name can all match for things like React components. I realize this project is no longer active but, I'm curious if anyone has figured out a way to do something like this.
+1