Enforces all linted files to have their names in a certain case style. Default is kebabCase
.
Files named index.js
are ignored as they can't change case (Only a problem with pascalCase
).
foo-bar.js
foo-bar.test.js
foo-bar.test-utils.js
fooBar.js
fooBar.test.js
fooBar.testUtils.js
foo_bar.js
foo_bar.test.js
foo_bar.test_utils.js
FooBar.js
FooBar.Test.js
FooBar.TestUtils.js
You can set the case
option like this:
"unicorn/filename-case": ["error", {"case": "kebabCase"}]