Folder Lint
raw JSON → 1.0.5 verified Fri May 01 auth: no javascript
A library for linting folder structures, currently at version 1.0.5. Designed to enforce directory conventions in projects using custom rules. Differentiates from standard linters by focusing on file system layout rather than code style. Latest release is stable, with no recent updates. The package ships TypeScript types for use in TS projects. It is a small utility primarily configured via Node.js scripts.
Common errors
error Cannot find module 'folder-lint' ↓
cause Package not installed or import path incorrect.
fix
Run 'npm install folder-lint' and ensure import matches version syntax.
Warnings
gotcha Rule names are case-insensitive but use kebab-case in documentation; mixing case may cause unexpected behavior. ↓
fix Always use kebab-case for rule names (e.g., 'no-nested-dist').
Install
npm install folder-lint yarn add folder-lint pnpm add folder-lint Imports
- folderLint wrong
const folderLint = require('folder-lint')correctimport folderLint from 'folder-lint' - checkStructure wrong
import { checkStructure } from 'folder-lint'correctimport { checkStructure } from 'folder-lint'
Quickstart
import folderLint from 'folder-lint';
const result = folderLint.checkStructure('.', {
rules: {
'no-nested-dist': true,
},
});
if (result.errors.length > 0) {
console.error('Folder structure violation:', result.errors);
} else {
console.log('Structure OK');
}