eslint-plugin-modularity 2.0.0 โ 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +51 -27
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3,33 +3,40 @@
|
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
5
|
<p align="center">
|
|
6
|
-
|
|
6
|
+
Security-focused ESLint plugin.
|
|
7
7
|
</p>
|
|
8
8
|
|
|
9
9
|
<p align="center">
|
|
10
10
|
<a href="https://www.npmjs.com/package/eslint-plugin-modularity" target="_blank"><img src="https://img.shields.io/npm/v/eslint-plugin-modularity.svg" alt="NPM Version" /></a>
|
|
11
11
|
<a href="https://www.npmjs.com/package/eslint-plugin-modularity" target="_blank"><img src="https://img.shields.io/npm/dm/eslint-plugin-modularity.svg" alt="NPM Downloads" /></a>
|
|
12
12
|
<a href="https://opensource.org/licenses/MIT" target="_blank"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="Package License" /></a>
|
|
13
|
+
<a href="https://app.codecov.io/gh/ofri-peretz/eslint/components?components%5B0%5D=modularity" target="_blank"><img src="https://codecov.io/gh/ofri-peretz/eslint/graph/badge.svg?component=modularity" alt="Codecov" /></a>
|
|
14
|
+
<a href="https://github.com/ofri-peretz/eslint" target="_blank"><img src="https://img.shields.io/badge/Since-Dec_2025-blue?logo=rocket&logoColor=white" alt="Since Dec 2025" /></a>
|
|
13
15
|
</p>
|
|
14
16
|
|
|
15
17
|
## Description
|
|
16
18
|
|
|
17
|
-
This plugin
|
|
19
|
+
This plugin provides Security-focused ESLint plugin.
|
|
20
|
+
By using this plugin, you can proactively identify and mitigate security risks across your entire codebase.
|
|
18
21
|
|
|
19
22
|
## Philosophy
|
|
20
23
|
|
|
21
|
-
**Interlace** fosters **strength through integration**.
|
|
24
|
+
**Interlace** fosters **strength through integration**. Instead of stacking isolated rules, we **interlace** security directly into your workflow to create a resilient fabric of code. We believe tools should **guide rather than gatekeep**, providing educational feedback that strengthens the developer with every interaction.
|
|
22
25
|
|
|
23
26
|
## Getting Started
|
|
24
27
|
|
|
25
|
-
- To check out the [guide](https://eslint.interlace.tools/docs/modularity), visit [eslint.interlace.tools](https://eslint.interlace.tools). ๐
|
|
28
|
+
- To check out the [guide](https://eslint.interlace.tools/docs/quality/plugin-modularity), visit [eslint.interlace.tools](https://eslint.interlace.tools). ๐
|
|
29
|
+
- ่ฆๆฅ็ไธญๆ [ๆๅ](https://eslint.interlace.tools/docs/quality/plugin-modularity), ่ฏท่ฎฟ้ฎ [eslint.interlace.tools](https://eslint.interlace.tools). ๐
|
|
30
|
+
- [๊ฐ์ด๋](https://eslint.interlace.tools/docs/quality/plugin-modularity) ๋ฌธ์๋ [eslint.interlace.tools](https://eslint.interlace.tools)์์ ํ์ธํ์ค ์ ์์ต๋๋ค. ๐
|
|
31
|
+
- [ใฌใคใ](https://eslint.interlace.tools/docs/quality/plugin-modularity)ใฏ [eslint.interlace.tools](https://eslint.interlace.tools)ใงใ็ขบ่ชใใ ใใใ ๐
|
|
32
|
+
- Para ver la [guรญa](https://eslint.interlace.tools/docs/quality/plugin-modularity), visita [eslint.interlace.tools](https://eslint.interlace.tools). ๐
|
|
33
|
+
- ููุงุทูุงุน ุนูู [ุงูุฏููู](https://eslint.interlace.tools/docs/quality/plugin-modularity)ุ ูู
ุจุฒูุงุฑุฉ [eslint.interlace.tools](https://eslint.interlace.tools). ๐
|
|
26
34
|
|
|
27
35
|
```bash
|
|
28
36
|
npm install eslint-plugin-modularity --save-dev
|
|
29
37
|
```
|
|
30
38
|
|
|
31
39
|
## โ๏ธ Configuration Presets
|
|
32
|
-
|
|
33
40
|
| Preset | Description |
|
|
34
41
|
| :------------ | :----------------------------------------- |
|
|
35
42
|
| `recommended` | Balanced DDD and architecture enforcement |
|
|
@@ -38,7 +45,6 @@ npm install eslint-plugin-modularity --save-dev
|
|
|
38
45
|
---
|
|
39
46
|
|
|
40
47
|
## ๐ข Usage Example
|
|
41
|
-
|
|
42
48
|
```js
|
|
43
49
|
// eslint.config.js
|
|
44
50
|
import modularity from 'eslint-plugin-modularity';
|
|
@@ -56,22 +62,7 @@ export default [
|
|
|
56
62
|
|
|
57
63
|
---
|
|
58
64
|
|
|
59
|
-
## Rules
|
|
60
|
-
|
|
61
|
-
| Rule | Description | ๐ผ | โ ๏ธ |
|
|
62
|
-
| :------------------------------------------------------------------------------- | :--------------------------------------------- | :-: | :-: |
|
|
63
|
-
| [ddd-anemic-domain-model](./docs/rules/ddd-anemic-domain-model.md) | Detect anemic domain models lacking behavior | ๐ผ | โ ๏ธ |
|
|
64
|
-
| [ddd-value-object-immutability](./docs/rules/ddd-value-object-immutability.md) | Enforce immutability in value objects | ๐ผ | |
|
|
65
|
-
| [enforce-naming](./docs/rules/enforce-naming.md) | Enforce consistent naming conventions by layer | ๐ผ | โ ๏ธ |
|
|
66
|
-
| [enforce-rest-conventions](./docs/rules/enforce-rest-conventions.md) | Enforce RESTful naming in API controllers | ๐ผ | |
|
|
67
|
-
| [no-external-api-calls-in-utils](./docs/rules/no-external-api-calls-in-utils.md) | Prevent external API calls in utility modules | ๐ผ | |
|
|
68
|
-
|
|
69
|
-
**Legend**: ๐ผ Recommended | โ ๏ธ Warns (not error)
|
|
70
|
-
|
|
71
|
-
---
|
|
72
|
-
|
|
73
65
|
## Why These Rules?
|
|
74
|
-
|
|
75
66
|
### `ddd-anemic-domain-model`
|
|
76
67
|
|
|
77
68
|
Detects domain entities that are just data containers without behavior โ a common anti-pattern.
|
|
@@ -147,15 +138,48 @@ export function format(data: Data): FormattedData {
|
|
|
147
138
|
|
|
148
139
|
---
|
|
149
140
|
|
|
150
|
-
##
|
|
141
|
+
## Rules
|
|
142
|
+
|
|
143
|
+
**Legend**
|
|
144
|
+
|
|
145
|
+
| Icon | Description |
|
|
146
|
+
| :---: | :--- |
|
|
147
|
+
| ๐ผ | **Recommended**: Included in the recommended preset. |
|
|
148
|
+
| โ ๏ธ | **Warns**: Set towarn in recommended preset. |
|
|
149
|
+
| ๐ง | **Auto-fixable**: Automatically fixable by the `--fix` CLI option. |
|
|
150
|
+
| ๐ก | **Suggestions**: Providing code suggestions in IDE. |
|
|
151
|
+
| ๐ซ | **Deprecated**: This rule is deprecated. |
|
|
151
152
|
|
|
152
|
-
|
|
153
|
+
| Rule | CWE | OWASP | CVSS | Description | ๐ผ | โ ๏ธ | ๐ง | ๐ก | ๐ซ |
|
|
154
|
+
| :--- | :---: | :---: | :---: | :--- | :---: | :---: | :---: | :---: | :---: |
|
|
155
|
+
| [ddd-anemic-domain-model](https://eslint.interlace.tools/docs/quality/plugin-modularity/rules/ddd-anemic-domain-model) | | | | ESLint rule documentation for ddd-anemic-domain-model | | | | | |
|
|
156
|
+
| [ddd-value-object-immutability](https://eslint.interlace.tools/docs/quality/plugin-modularity/rules/ddd-value-object-immutability) | | | | ESLint rule documentation for ddd-value-object-immutability | | | | | |
|
|
157
|
+
| [enforce-naming](https://eslint.interlace.tools/docs/quality/plugin-modularity/rules/enforce-naming) | | | | ESLint rule documentation for enforce-naming | | | | | |
|
|
158
|
+
| [enforce-rest-conventions](https://eslint.interlace.tools/docs/quality/plugin-modularity/rules/enforce-rest-conventions) | | | | ESLint rule documentation for enforce-rest-conventions | | | | | |
|
|
159
|
+
| [no-external-api-calls-in-utils](https://eslint.interlace.tools/docs/quality/plugin-modularity/rules/no-external-api-calls-in-utils) | | | | ESLint rule documentation for no-external-api-calls-in-utils | | | | | |
|
|
153
160
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
161
|
+
## ๐ Related ESLint Plugins
|
|
162
|
+
|
|
163
|
+
Part of the **Interlace ESLint Ecosystem** โ AI-native security plugins with LLM-optimized error messages:
|
|
164
|
+
|
|
165
|
+
| Plugin | Downloads | Description |
|
|
166
|
+
| :--- | :---: | :--- |
|
|
167
|
+
| [`eslint-plugin-secure-coding`](https://www.npmjs.com/package/eslint-plugin-secure-coding) | [](https://www.npmjs.com/package/eslint-plugin-secure-coding) | General security rules & OWASP guidelines. |
|
|
168
|
+
| [`eslint-plugin-pg`](https://www.npmjs.com/package/eslint-plugin-pg) | [](https://www.npmjs.com/package/eslint-plugin-pg) | PostgreSQL security & best practices. |
|
|
169
|
+
| [`eslint-plugin-crypto`](https://www.npmjs.com/package/eslint-plugin-crypto) | [](https://www.npmjs.com/package/eslint-plugin-crypto) | NodeJS Cryptography security rules. |
|
|
170
|
+
| [`eslint-plugin-jwt`](https://www.npmjs.com/package/eslint-plugin-jwt) | [](https://www.npmjs.com/package/eslint-plugin-jwt) | JWT security & best practices. |
|
|
171
|
+
| [`eslint-plugin-browser-security`](https://www.npmjs.com/package/eslint-plugin-browser-security) | [](https://www.npmjs.com/package/eslint-plugin-browser-security) | Browser-specific security & XSS prevention. |
|
|
172
|
+
| [`eslint-plugin-express-security`](https://www.npmjs.com/package/eslint-plugin-express-security) | [](https://www.npmjs.com/package/eslint-plugin-express-security) | Express.js security hardening rules. |
|
|
173
|
+
| [`eslint-plugin-lambda-security`](https://www.npmjs.com/package/eslint-plugin-lambda-security) | [](https://www.npmjs.com/package/eslint-plugin-lambda-security) | AWS Lambda security best practices. |
|
|
174
|
+
| [`eslint-plugin-nestjs-security`](https://www.npmjs.com/package/eslint-plugin-nestjs-security) | [](https://www.npmjs.com/package/eslint-plugin-nestjs-security) | NestJS security rules & patterns. |
|
|
175
|
+
| [`eslint-plugin-mongodb-security`](https://www.npmjs.com/package/eslint-plugin-mongodb-security) | [](https://www.npmjs.com/package/eslint-plugin-mongodb-security) | MongoDB security best practices. |
|
|
176
|
+
| [`eslint-plugin-vercel-ai-security`](https://www.npmjs.com/package/eslint-plugin-vercel-ai-security) | [](https://www.npmjs.com/package/eslint-plugin-vercel-ai-security) | Vercel AI SDK security hardening. |
|
|
177
|
+
| [`eslint-plugin-import-next`](https://www.npmjs.com/package/eslint-plugin-import-next) | [](https://www.npmjs.com/package/eslint-plugin-import-next) | Next-gen import sorting & architecture. |
|
|
158
178
|
|
|
159
179
|
## ๐ License
|
|
160
180
|
|
|
161
181
|
MIT ยฉ [Ofri Peretz](https://github.com/ofri-peretz)
|
|
182
|
+
|
|
183
|
+
<p align="center">
|
|
184
|
+
<a href="https://eslint.interlace.tools/docs/quality/plugin-modularity"><img src="https://eslint.interlace.tools/images/og-modularity.png" alt="ESLint Interlace Plugin" width="100%" /></a>
|
|
185
|
+
</p>
|
package/package.json
CHANGED