A linter to check the directory/file structure of your projects.
npm install -g structure-lint
# Or Yarn
yarn global add structure-lint
npm install structure-lint
# Or Yarn
yarn add structure-lint
Then add the following command to your package.json file:
{
"scripts": {
"structure-lint": "structure-lint"
}
}
Create a .structurelintrc
file in the root of your project. See the example config file below:
{
"root": "src",
"rules": [
"utils/*.ts",
"hooks/*.ts",
"interfaces/I*.ts",
"components/**/*.tsx",
"deeply/**/nested/**/folder/*.{tsx,ts,js}"
]
}