eslint-plugin-filenames
eslint-plugin-filenames copied to clipboard
How to check for this pattern: componentService --> component.service.js?
The company I work at follows a pattern where service component filenames end with "component.service.js", but the default exported component is named "componentService". I've tried using the filename replace functionality to where I strip out the last period from the filename and have it do a comparison, but because of the casing it doesn't work: componentService --> componentservice
Any ideas how I might be able to check for this file pattern?
Looks like adding support for dot casing would solve my problems if this were approved.
https://github.com/selaux/eslint-plugin-filenames/pull/34
As an alternative you can use https://github.com/Igorkowalski94/eslint-plugin-project-structure has the same capabilities + force only folders/files, has a built-in case for name, regex support, ability to inherit the name from the parent (the child inherits the name of the folder in which it is located), folder recursion (You can nest a given folder structure recursively) and eslint realtime errors.