eslint-plugin-reliability 3.0.1 โ 3.0.3
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 +44 -67
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
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">
|
|
@@ -16,27 +16,27 @@
|
|
|
16
16
|
|
|
17
17
|
## Description
|
|
18
18
|
|
|
19
|
-
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.
|
|
20
21
|
|
|
21
22
|
## Philosophy
|
|
22
23
|
|
|
23
|
-
**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.
|
|
24
25
|
|
|
25
26
|
## Getting Started
|
|
26
27
|
|
|
27
|
-
- To check out the [guide](https://eslint.interlace.tools/docs/reliability), visit [eslint.interlace.tools](https://eslint.interlace.tools). ๐
|
|
28
|
-
- ่ฆๆฅ็ไธญๆ [ๆๅ](https://eslint.interlace.tools/docs/reliability), ่ฏท่ฎฟ้ฎ [eslint.interlace.tools](https://eslint.interlace.tools). ๐
|
|
29
|
-
- [๊ฐ์ด๋](https://eslint.interlace.tools/docs/reliability) ๋ฌธ์๋ [eslint.interlace.tools](https://eslint.interlace.tools)์์ ํ์ธํ์ค ์ ์์ต๋๋ค. ๐
|
|
30
|
-
- [ใฌใคใ](https://eslint.interlace.tools/docs/reliability)ใฏ [eslint.interlace.tools](https://eslint.interlace.tools)ใงใ็ขบ่ชใใ ใใใ ๐
|
|
31
|
-
- Para ver la [guรญa](https://eslint.interlace.tools/docs/reliability), visita [eslint.interlace.tools](https://eslint.interlace.tools). ๐
|
|
32
|
-
- ููุงุทูุงุน ุนูู [ุงูุฏููู](https://eslint.interlace.tools/docs/reliability)ุ ูู
ุจุฒูุงุฑุฉ [eslint.interlace.tools](https://eslint.interlace.tools). ๐
|
|
28
|
+
- To check out the [guide](https://eslint.interlace.tools/docs/quality/plugin-reliability), visit [eslint.interlace.tools](https://eslint.interlace.tools). ๐
|
|
29
|
+
- ่ฆๆฅ็ไธญๆ [ๆๅ](https://eslint.interlace.tools/docs/quality/plugin-reliability), ่ฏท่ฎฟ้ฎ [eslint.interlace.tools](https://eslint.interlace.tools). ๐
|
|
30
|
+
- [๊ฐ์ด๋](https://eslint.interlace.tools/docs/quality/plugin-reliability) ๋ฌธ์๋ [eslint.interlace.tools](https://eslint.interlace.tools)์์ ํ์ธํ์ค ์ ์์ต๋๋ค. ๐
|
|
31
|
+
- [ใฌใคใ](https://eslint.interlace.tools/docs/quality/plugin-reliability)ใฏ [eslint.interlace.tools](https://eslint.interlace.tools)ใงใ็ขบ่ชใใ ใใใ ๐
|
|
32
|
+
- Para ver la [guรญa](https://eslint.interlace.tools/docs/quality/plugin-reliability), visita [eslint.interlace.tools](https://eslint.interlace.tools). ๐
|
|
33
|
+
- ููุงุทูุงุน ุนูู [ุงูุฏููู](https://eslint.interlace.tools/docs/quality/plugin-reliability)ุ ูู
ุจุฒูุงุฑุฉ [eslint.interlace.tools](https://eslint.interlace.tools). ๐
|
|
33
34
|
|
|
34
35
|
```bash
|
|
35
36
|
npm install eslint-plugin-reliability --save-dev
|
|
36
37
|
```
|
|
37
38
|
|
|
38
39
|
## โ๏ธ Configuration Presets
|
|
39
|
-
|
|
40
40
|
| Preset | Description |
|
|
41
41
|
| :------------ | :-------------------------------------------- |
|
|
42
42
|
| `recommended` | Balanced reliability checks for most projects |
|
|
@@ -44,7 +44,6 @@ npm install eslint-plugin-reliability --save-dev
|
|
|
44
44
|
---
|
|
45
45
|
|
|
46
46
|
## ๐ข Usage Example
|
|
47
|
-
|
|
48
47
|
```js
|
|
49
48
|
// eslint.config.js
|
|
50
49
|
import reliability from 'eslint-plugin-reliability';
|
|
@@ -54,54 +53,7 @@ export default [reliability.configs.recommended];
|
|
|
54
53
|
|
|
55
54
|
---
|
|
56
55
|
|
|
57
|
-
## AI-Optimized Messages
|
|
58
|
-
|
|
59
|
-
This plugin is optimized for ESLint's [Model Context Protocol (MCP)](https://eslint.org/docs/latest/use/mcp), enabling AI assistants like **Cursor**, **GitHub Copilot**, and **Claude** to:
|
|
60
|
-
|
|
61
|
-
- Understand the exact issue via structured context
|
|
62
|
-
- Apply the correct fix using guidance
|
|
63
|
-
- Provide educational context to developers
|
|
64
|
-
|
|
65
|
-
```json
|
|
66
|
-
// .cursor/mcp.json
|
|
67
|
-
{
|
|
68
|
-
"mcpServers": {
|
|
69
|
-
"eslint": {
|
|
70
|
-
"command": "npx",
|
|
71
|
-
"args": ["@eslint/mcp@latest"]
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
---
|
|
78
|
-
|
|
79
|
-
## Rules
|
|
80
|
-
|
|
81
|
-
### Error Handling
|
|
82
|
-
|
|
83
|
-
| Rule | Description | ๐ผ | โ ๏ธ |
|
|
84
|
-
| :------------------------------------------------------------------- | :-------------------------------------------- | :-: | :-: |
|
|
85
|
-
| [no-unhandled-promise](./docs/rules/no-unhandled-promise.md) | Detect unhandled promise rejections | | |
|
|
86
|
-
| [no-silent-errors](./docs/rules/no-silent-errors.md) | Detect empty catch blocks that swallow errors | ๐ผ | โ ๏ธ |
|
|
87
|
-
| [no-missing-error-context](./docs/rules/no-missing-error-context.md) | Require error context when re-throwing | | |
|
|
88
|
-
| [error-message](./docs/rules/error-message.md) | Require meaningful error messages | | |
|
|
89
|
-
|
|
90
|
-
### Runtime Safety
|
|
91
|
-
|
|
92
|
-
| Rule | Description | ๐ผ | โ ๏ธ |
|
|
93
|
-
| :------------------------------------------------------------------- | :--------------------------------------------- | :-: | :-: |
|
|
94
|
-
| [no-missing-null-checks](./docs/rules/no-missing-null-checks.md) | Detect potential null/undefined dereferences | ๐ผ | โ ๏ธ |
|
|
95
|
-
| [no-unsafe-type-narrowing](./docs/rules/no-unsafe-type-narrowing.md) | Detect unsafe type narrowing patterns | | |
|
|
96
|
-
| [require-network-timeout](./docs/rules/require-network-timeout.md) | Require timeouts on network requests | ๐ผ | |
|
|
97
|
-
| [no-await-in-loop](./docs/rules/no-await-in-loop.md) | Detect sequential await in loops (performance) | | |
|
|
98
|
-
|
|
99
|
-
**Legend**: ๐ผ Recommended | โ ๏ธ Warns (not error)
|
|
100
|
-
|
|
101
|
-
---
|
|
102
|
-
|
|
103
56
|
## Why These Rules?
|
|
104
|
-
|
|
105
57
|
### `no-silent-errors`
|
|
106
58
|
|
|
107
59
|
Empty catch blocks hide errors, making debugging impossible.
|
|
@@ -174,20 +126,45 @@ const results = await Promise.all(userIds.map((id) => fetchUser(id)));
|
|
|
174
126
|
|
|
175
127
|
---
|
|
176
128
|
|
|
177
|
-
##
|
|
129
|
+
## Rules
|
|
130
|
+
|
|
131
|
+
**Legend**
|
|
132
|
+
|
|
133
|
+
| Icon | Description |
|
|
134
|
+
| :---: | :--- |
|
|
135
|
+
| ๐ผ | **Recommended**: Included in the recommended preset. |
|
|
136
|
+
| โ ๏ธ | **Warns**: Set towarn in recommended preset. |
|
|
137
|
+
| ๐ง | **Auto-fixable**: Automatically fixable by the `--fix` CLI option. |
|
|
138
|
+
| ๐ก | **Suggestions**: Providing code suggestions in IDE. |
|
|
139
|
+
| ๐ซ | **Deprecated**: This rule is deprecated. |
|
|
178
140
|
|
|
179
|
-
|
|
141
|
+
| Rule | CWE | OWASP | CVSS | Description | ๐ผ | โ ๏ธ | ๐ง | ๐ก | ๐ซ |
|
|
142
|
+
| :--- | :---: | :---: | :---: | :--- | :---: | :---: | :---: | :---: | :---: |
|
|
143
|
+
| [error-handling](https://eslint.interlace.tools/docs/quality/plugin-reliability/rules/error-handling) | | | | Enforce error handling | | | | | |
|
|
144
|
+
| [reliability](https://eslint.interlace.tools/docs/quality/plugin-reliability/rules/reliability) | | | | Enforce reliability | | | | | |
|
|
180
145
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
|
146
|
+
## ๐ Related ESLint Plugins
|
|
147
|
+
|
|
148
|
+
Part of the **Interlace ESLint Ecosystem** โ AI-native security plugins with LLM-optimized error messages:
|
|
149
|
+
|
|
150
|
+
| Plugin | Downloads | Description |
|
|
151
|
+
| :--- | :---: | :--- |
|
|
152
|
+
| [`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. |
|
|
153
|
+
| [`eslint-plugin-pg`](https://www.npmjs.com/package/eslint-plugin-pg) | [](https://www.npmjs.com/package/eslint-plugin-pg) | PostgreSQL security & best practices. |
|
|
154
|
+
| [`eslint-plugin-crypto`](https://www.npmjs.com/package/eslint-plugin-crypto) | [](https://www.npmjs.com/package/eslint-plugin-crypto) | NodeJS Cryptography security rules. |
|
|
155
|
+
| [`eslint-plugin-jwt`](https://www.npmjs.com/package/eslint-plugin-jwt) | [](https://www.npmjs.com/package/eslint-plugin-jwt) | JWT security & best practices. |
|
|
156
|
+
| [`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. |
|
|
157
|
+
| [`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. |
|
|
158
|
+
| [`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. |
|
|
159
|
+
| [`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. |
|
|
160
|
+
| [`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. |
|
|
161
|
+
| [`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. |
|
|
162
|
+
| [`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. |
|
|
186
163
|
|
|
187
164
|
## ๐ License
|
|
188
165
|
|
|
189
166
|
MIT ยฉ [Ofri Peretz](https://github.com/ofri-peretz)
|
|
190
167
|
|
|
191
168
|
<p align="center">
|
|
192
|
-
<a href="https://eslint.interlace.tools/docs/reliability"><img src="https://eslint.interlace.tools/images/og-
|
|
193
|
-
</p>
|
|
169
|
+
<a href="https://eslint.interlace.tools/docs/quality/plugin-reliability"><img src="https://eslint.interlace.tools/images/og-reliability.png" alt="ESLint Interlace Plugin" width="100%" /></a>
|
|
170
|
+
</p>
|