0.1.0 • Published 2 years ago

@fullstackjosh/eslint-plugin-architected v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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
0.1.0

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago