@fullstackjosh/eslint-plugin-architected
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

eslint-plugin-architected

Enforce layering your code following my personal preferences, based on Jason Taylor's Clean Architecture.

If you'd like a more strict implementation of clean architecture, checkout eslint-plugin-clean-architecture.

Installation

npm i -D @fullstackjosh/eslint-plugin-architected

Usage

// .eslintrc.js

module.exports = {
  extends: ["plugin:@fullstackjosh/architected/clean-ish"],
};

You will only be able to import code from layer X to layer Y if layer X depends on layer Y. Any other layer-to-layer import will yield a linting error.

For example:

// 2-application/business-logic.js

import { apiMethod } from "../1-presentation/api";
// error: Do not import 1-presentation code into the 2-application layer

Folder structure

layered-code
| 0-presentation
| 1-infrastructure
| 2-application
| 3-domain
| 4-data

Readme

Keywords

Package Sidebar

Install

npm i @fullstackjosh/eslint-plugin-architected

Weekly Downloads

8

Version

0.1.0

License

MIT

Unpacked Size

6.33 kB

Total Files

6

Last publish

Collaborators

  • joshuahull