-
As I continue to add thoughts to this document, I realize that this is a pretty opinionated structure, and unlikely to have a ready-made ESLint rule. However, I will be working on turning this spec into an ESlint rule as part of eslint-plugin-canonical.
-
CodeRabbit
CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
-
dependency-cruiser
Validate and visualize dependencies. Your rules. JavaScript, TypeScript, CoffeeScript. ES6, CommonJS, AMD.
I've personally fallen in love with Dependency Cruiser, which lets you set any arbitrary import rules you want on your repository. With it, you can enforce common things, like, "You can only import through the index file, if one exists", but you can also make custom-tailored rules for your specific project. For example, maybe your project is divided into three large folders - folder1 is allowed to import from folder2 and folder3, folder2 can import from folder3, and folder3 can not import from anyone else. Well, you can enforce that too, or whatever you need.
Related posts
-
Taking Frontend Architecture Serious with dependency-cruiser
-
how to automatically run a script / yarn command before each dev hot-reload build
-
Deprank: Use PageRank to find the most important files in your codebase
-
Developing your own Chrome Extension - Fixing Errors with ts-morph and using Buns API (Part 4)
-
TypeStat: Converts JavaScript to TypeScript and TypeScript to Better TypeScript