How igorkowalski94/eslint-plugin-project-structure works
Project type and purpose
• This is an open-source ESLint plugin (“eslint-plugin-project-structure”)
• It provides three rule-sets—folder-structure, independent-modules, file-composition—to enforce project conventions
• Written in TypeScript/Node.js, integrates with ESLint’s plugin API
File structure
Top-level
– .github/, LICENSE, README.md, package.json, tsconfig.json, eslint.config.mjs, jest.config.ts, tsup.config.ts
– JSON schemas and generators (fileComposition.schema.json + fileComposition.mjs, folderStructure.schema.json + folderStructure.mjs, independentModules.schema.json + independentModules.mjs)
src/
– index.ts (plugin entry point)
– parser.ts (AST preprocessing)
– consts.ts, types.ts (shared constants/types)
– errors/ (error constructors and guards)
– helpers/ (utility functions for config reading, cache handling, regex, case transforms, project root resolution)
– rules/
• folderStructure/ (schema, rule logic, helpers, custom errors)
• independentModules/ (schema, rule logic, helpers, custom errors)
• fileComposition/ (schema, rule logic, helpers)
README for additional insights
• Describes each rule-set’s purpose, features, and configuration options
• Points to JSON schema→TypeScript config generator flow for each rule category
• Explains plugin usage in ESLint, built-in import resolver, and --fix capabilities