eslint-plugin-unicorn icon indicating copy to clipboard operation
eslint-plugin-unicorn copied to clipboard

`no-empty-file` support for other extensions

Open adoin opened this issue 1 year ago • 2 comments

image But image

And commit lint didn't stop commit through eslint.

adoin avatar Jul 28 '23 11:07 adoin

Support is explicitly limited to JS/TS files:

https://github.com/sindresorhus/eslint-plugin-unicorn/blob/61912993131b359d3c5789a2d1b2567b144e2f56/rules/no-empty-file.js#L22-L24

fregante avatar Aug 12 '23 14:08 fregante

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).

Igorkowalski94 avatar Oct 01 '23 08:10 Igorkowalski94