Our great sponsors
-
dependency-cruiser
Validate and visualize dependencies. Your rules. JavaScript, TypeScript, CoffeeScript. ES6, CommonJS, AMD.
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
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.
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