eslint-plugin-fig-kebab-folder
v1.0.0
Published
Ensure that all directories and subdirectories of a project use the kebab-case naming convention.
Downloads
3
Maintainers
Readme
eslint-plugin-fig-kebab-folder
Ensure that all directories and subdirectories of a project use the kebab-case naming convention.
Installation
You'll first need to install ESLint:
npm i eslint --save-dev
Next, install eslint-plugin-fig-kebab-folder
:
npm install eslint-plugin-fig-kebab-folder --save-dev
Usage
Add fig-kebab-folder
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": [
"fig-kebab-folder"
]
}
Exemple d'ajout dans les rules (peut manquer des fichiers s'il y a des restrictions sur quels fichiers seront analysés)
module.exports = {
plugins: ['fig-kebab-folder'],
rules: {
'fig-kebab-folder/kebab-case-directories': [
'error',
{
srcDir: './src',
excludedDirs: [
'__snapshots__',
'__tests__',
'@types'
]
}
]
}
};
Exemple d'ajout dans les overrides
module.exports = {
plugins: [
'fig-kebab-folder'
],
overrides: [
{
files: ["src/**/*"],
rules: {
'fig-kebab-folder/kebab-case-directories': [
'error',
{
srcDir: './src',
excludedDirs: [
'__snapshots__',
'__tests__',
'@types'
]
}
]
}
},
]
}