{"id":25870,"library":"lint-fs","title":"lint-fs","description":"A tool to lint file system structures using regular expressions, enabling enforcement of directory and file naming conventions and project layout rules. Current stable version is 1.2.10, released in early 2023 with ongoing minor updates. It uses a YAML configuration file (lint-fs.yaml) and runs via npx. Differentiates from other linters by focusing on file system structure rather than code content, supporting ECMAScript regex patterns for flexible rules.","status":"active","version":"1.2.10","language":"javascript","source_language":"en","source_url":"https://github.com/aolenevme/lint-fs","tags":["javascript","lint","filesystem","linter","lint-fs"],"install":[{"cmd":"npm install lint-fs","lang":"bash","label":"npm"},{"cmd":"yarn add lint-fs","lang":"bash","label":"yarn"},{"cmd":"pnpm add lint-fs","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[],"quickstart":{"code":"npm install --save-dev lint-fs\n# Create lint-fs.yaml in project root:\n# rules:\n#   enforce-dir-case:\n#     pattern: \"^[a-z]+$\"\n#     path: \"src/**\"\n#     description: \"Directories must be lowercase\"\n# Run:\nnpx lint-fs","lang":"javascript","description":"Install lint-fs, create a basic YAML config to enforce lowercase directory names in src/, and run the linter."},"warnings":[{"fix":"Rename your config file to lint-fs.yaml or use --config option if supported.","message":"Configuration file must be named lint-fs.yaml exactly and placed in project root.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Adjust regex patterns to match the full path (e.g., ^src/[a-z]+$ for directories under src).","message":"Regular expressions are applied against full relative paths from project root, not just file/directory names.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Update Node.js to v18.14.2+ and npm to v9.5.0+.","message":"Node engine requirement is 18.14.2 or higher, npm 9.5.0+. Older Node versions will fail to install or run.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use child_process.exec('npx lint-fs') if integration is needed.","message":"Package is CLI-only; there is no programmatic API for use within Node.js scripts.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Create a lint-fs.yaml file in your project's root directory with valid rules.","cause":"Missing or misnamed configuration file.","error":"Error: No configuration file found. Expected lint-fs.yaml in project root."},{"fix":"Provide a valid ECMAScript regex string in the pattern field (e.g., '^[a-z]+$').","cause":"Malformed regular expression in configuration.","error":"Error: Invalid regex pattern in rule 'xyz': / ... /"},{"fix":"Use the CLI via npx, not require(). The package is an ES module.","cause":"Attempting to use the package as a CommonJS module.","error":"Error: require() of ES modules is not supported."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}