eslint-plugin-operability 3.0.2 โ 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 +43 -58
- 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/operability), visit [eslint.interlace.tools](https://eslint.interlace.tools). ๐
|
|
28
|
-
- ่ฆๆฅ็ไธญๆ [ๆๅ](https://eslint.interlace.tools/docs/operability), ่ฏท่ฎฟ้ฎ [eslint.interlace.tools](https://eslint.interlace.tools). ๐
|
|
29
|
-
- [๊ฐ์ด๋](https://eslint.interlace.tools/docs/operability) ๋ฌธ์๋ [eslint.interlace.tools](https://eslint.interlace.tools)์์ ํ์ธํ์ค ์ ์์ต๋๋ค. ๐
|
|
30
|
-
- [ใฌใคใ](https://eslint.interlace.tools/docs/operability)ใฏ [eslint.interlace.tools](https://eslint.interlace.tools)ใงใ็ขบ่ชใใ ใใใ ๐
|
|
31
|
-
- Para ver la [guรญa](https://eslint.interlace.tools/docs/operability), visita [eslint.interlace.tools](https://eslint.interlace.tools). ๐
|
|
32
|
-
- ููุงุทูุงุน ุนูู [ุงูุฏููู](https://eslint.interlace.tools/docs/operability)ุ ูู
ุจุฒูุงุฑุฉ [eslint.interlace.tools](https://eslint.interlace.tools). ๐
|
|
28
|
+
- To check out the [guide](https://eslint.interlace.tools/docs/quality/plugin-operability), visit [eslint.interlace.tools](https://eslint.interlace.tools). ๐
|
|
29
|
+
- ่ฆๆฅ็ไธญๆ [ๆๅ](https://eslint.interlace.tools/docs/quality/plugin-operability), ่ฏท่ฎฟ้ฎ [eslint.interlace.tools](https://eslint.interlace.tools). ๐
|
|
30
|
+
- [๊ฐ์ด๋](https://eslint.interlace.tools/docs/quality/plugin-operability) ๋ฌธ์๋ [eslint.interlace.tools](https://eslint.interlace.tools)์์ ํ์ธํ์ค ์ ์์ต๋๋ค. ๐
|
|
31
|
+
- [ใฌใคใ](https://eslint.interlace.tools/docs/quality/plugin-operability)ใฏ [eslint.interlace.tools](https://eslint.interlace.tools)ใงใ็ขบ่ชใใ ใใใ ๐
|
|
32
|
+
- Para ver la [guรญa](https://eslint.interlace.tools/docs/quality/plugin-operability), visita [eslint.interlace.tools](https://eslint.interlace.tools). ๐
|
|
33
|
+
- ููุงุทูุงุน ุนูู [ุงูุฏููู](https://eslint.interlace.tools/docs/quality/plugin-operability)ุ ูู
ุจุฒูุงุฑุฉ [eslint.interlace.tools](https://eslint.interlace.tools). ๐
|
|
33
34
|
|
|
34
35
|
```bash
|
|
35
36
|
npm install eslint-plugin-operability --save-dev
|
|
36
37
|
```
|
|
37
38
|
|
|
38
39
|
## โ๏ธ Configuration Presets
|
|
39
|
-
|
|
40
40
|
| Preset | Description |
|
|
41
41
|
| :------------ | :---------------------------------------------- |
|
|
42
42
|
| `recommended` | Balanced operability checks for production code |
|
|
@@ -44,7 +44,6 @@ npm install eslint-plugin-operability --save-dev
|
|
|
44
44
|
---
|
|
45
45
|
|
|
46
46
|
## ๐ข Usage Example
|
|
47
|
-
|
|
48
47
|
```js
|
|
49
48
|
// eslint.config.js
|
|
50
49
|
import operability from 'eslint-plugin-operability';
|
|
@@ -65,45 +64,7 @@ export default [
|
|
|
65
64
|
|
|
66
65
|
---
|
|
67
66
|
|
|
68
|
-
## AI-Optimized Messages
|
|
69
|
-
|
|
70
|
-
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:
|
|
71
|
-
|
|
72
|
-
- Understand the exact issue via structured context
|
|
73
|
-
- Apply the correct fix using guidance
|
|
74
|
-
- Provide educational context to developers
|
|
75
|
-
|
|
76
|
-
```json
|
|
77
|
-
// .cursor/mcp.json
|
|
78
|
-
{
|
|
79
|
-
"mcpServers": {
|
|
80
|
-
"eslint": {
|
|
81
|
-
"command": "npx",
|
|
82
|
-
"args": ["@eslint/mcp@latest"]
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
---
|
|
89
|
-
|
|
90
|
-
## Rules
|
|
91
|
-
|
|
92
|
-
| Rule | Description | ๐ผ | โ ๏ธ |
|
|
93
|
-
| :------------------------------------------------------------------------- | :-------------------------------------------- | :-: | :-: |
|
|
94
|
-
| [no-console-log](./docs/rules/no-console-log.md) | Disallow `console.log` in production code | ๐ผ | โ ๏ธ |
|
|
95
|
-
| [no-process-exit](./docs/rules/no-process-exit.md) | Disallow `process.exit()` in library code | | |
|
|
96
|
-
| [no-debug-code-in-production](./docs/rules/no-debug-code-in-production.md) | Detect debug statements and debugger keywords | ๐ผ | |
|
|
97
|
-
| [no-verbose-error-messages](./docs/rules/no-verbose-error-messages.md) | Prevent overly detailed error messages | ๐ผ | โ ๏ธ |
|
|
98
|
-
| [require-code-minification](./docs/rules/require-code-minification.md) | Detect patterns that prevent minification | | |
|
|
99
|
-
| [require-data-minimization](./docs/rules/require-data-minimization.md) | Detect excessive data exposure in responses | | |
|
|
100
|
-
|
|
101
|
-
**Legend**: ๐ผ Recommended | โ ๏ธ Warns (not error)
|
|
102
|
-
|
|
103
|
-
---
|
|
104
|
-
|
|
105
67
|
## Why These Rules?
|
|
106
|
-
|
|
107
68
|
### `no-console-log`
|
|
108
69
|
|
|
109
70
|
`console.log` statements are for debugging and shouldn't ship to production.
|
|
@@ -156,20 +117,44 @@ throw new Error('Service temporarily unavailable');
|
|
|
156
117
|
|
|
157
118
|
---
|
|
158
119
|
|
|
159
|
-
##
|
|
120
|
+
## Rules
|
|
121
|
+
|
|
122
|
+
**Legend**
|
|
123
|
+
|
|
124
|
+
| Icon | Description |
|
|
125
|
+
| :---: | :--- |
|
|
126
|
+
| ๐ผ | **Recommended**: Included in the recommended preset. |
|
|
127
|
+
| โ ๏ธ | **Warns**: Set towarn in recommended preset. |
|
|
128
|
+
| ๐ง | **Auto-fixable**: Automatically fixable by the `--fix` CLI option. |
|
|
129
|
+
| ๐ก | **Suggestions**: Providing code suggestions in IDE. |
|
|
130
|
+
| ๐ซ | **Deprecated**: This rule is deprecated. |
|
|
160
131
|
|
|
161
|
-
|
|
132
|
+
| Rule | CWE | OWASP | CVSS | Description | ๐ผ | โ ๏ธ | ๐ง | ๐ก | ๐ซ |
|
|
133
|
+
| :--- | :---: | :---: | :---: | :--- | :---: | :---: | :---: | :---: | :---: |
|
|
134
|
+
| [operability](https://eslint.interlace.tools/docs/quality/plugin-operability/rules/operability) | | | | Enforce operability | | | | | |
|
|
162
135
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
|
136
|
+
## ๐ Related ESLint Plugins
|
|
137
|
+
|
|
138
|
+
Part of the **Interlace ESLint Ecosystem** โ AI-native security plugins with LLM-optimized error messages:
|
|
139
|
+
|
|
140
|
+
| Plugin | Downloads | Description |
|
|
141
|
+
| :--- | :---: | :--- |
|
|
142
|
+
| [`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. |
|
|
143
|
+
| [`eslint-plugin-pg`](https://www.npmjs.com/package/eslint-plugin-pg) | [](https://www.npmjs.com/package/eslint-plugin-pg) | PostgreSQL security & best practices. |
|
|
144
|
+
| [`eslint-plugin-crypto`](https://www.npmjs.com/package/eslint-plugin-crypto) | [](https://www.npmjs.com/package/eslint-plugin-crypto) | NodeJS Cryptography security rules. |
|
|
145
|
+
| [`eslint-plugin-jwt`](https://www.npmjs.com/package/eslint-plugin-jwt) | [](https://www.npmjs.com/package/eslint-plugin-jwt) | JWT security & best practices. |
|
|
146
|
+
| [`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. |
|
|
147
|
+
| [`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. |
|
|
148
|
+
| [`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. |
|
|
149
|
+
| [`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. |
|
|
150
|
+
| [`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. |
|
|
151
|
+
| [`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. |
|
|
152
|
+
| [`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. |
|
|
168
153
|
|
|
169
154
|
## ๐ License
|
|
170
155
|
|
|
171
156
|
MIT ยฉ [Ofri Peretz](https://github.com/ofri-peretz)
|
|
172
157
|
|
|
173
158
|
<p align="center">
|
|
174
|
-
<a href="https://eslint.interlace.tools/docs/operability"><img src="https://eslint.interlace.tools/images/og-
|
|
175
|
-
</p>
|
|
159
|
+
<a href="https://eslint.interlace.tools/docs/quality/plugin-operability"><img src="https://eslint.interlace.tools/images/og-operability.png" alt="ESLint Interlace Plugin" width="100%" /></a>
|
|
160
|
+
</p>
|