Enforces full path, folder and file names to match desired case style
MIT License
Enforces full path, folder and file names to match desired case style
// Errors for rule: kebabCase
myFileFolder/my-file-name.js // file path
// Ok for rule: kebabCase
my-file-folder/my-file-name.js // file path
You'll first need to install ESLint:
$ npm i eslint --save-dev
Next, install eslint-plugin-nada
:
$ npm install eslint-plugin-nada --save-dev
Note: If you installed ESLint globally (using the -g
flag) then you must also install eslint-plugin-nada
globally.
Add nada
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": [
"nada"
]
}
Then configure the rules you want to use under the rules section.
First param is the severity level as per eslint standards, where: 0 = off, 1 = warn, 2 = error
{
"rules": {
"nada/path-case": [2, {"case": "kebabCase"}]
}
}
Enforces full path, folder and file names to match desired case style.
kebabCase
, camelCase
and snakeCase
.Example:
{
"rules": {
"nada/path-case": [{"case": "kebabCase"}]
}
}
my-file.spec.js
or my-file.test.js
.Example:
{
"rules": {
"nada/path-case": [
{
"case": "kebabCase",
"ignoreParts": [".test", ".spec"]},
]
}
}
feat: your new feature summary
or fix: annoying bug that was killing me
.