eslint-plugin-unicorn
eslint-plugin-unicorn copied to clipboard
`no-empty-file` support for other extensions
But
And commit lint didn't stop commit through eslint.
Support is explicitly limited to JS/TS files:
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/61912993131b359d3c5789a2d1b2567b144e2f56/rules/no-empty-file.js#L22-L24
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, all extensions 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).