eslint-plugin-operability 3.0.4 → 3.0.6
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/CHANGELOG.md +120 -0
- package/LICENSE +23 -0
- package/README.md +45 -18
- package/package.json +20 -3
- package/src/index.d.ts +4 -4
- package/src/index.js +5 -5
- package/src/index.js.map +1 -1
- package/src/lib/eslint-plugin-operability.js.map +1 -1
- package/src/oxlint.d.ts +20 -0
- package/src/oxlint.js +22 -0
- package/src/oxlint.js.map +1 -0
- package/src/rules/operability/no-console-log.js +20 -8
- package/src/rules/operability/no-console-log.js.map +1 -1
- package/src/rules/operability/no-debug-code-in-production.js +3 -0
- package/src/rules/operability/no-debug-code-in-production.js.map +1 -1
- package/src/rules/operability/no-process-exit.js +3 -0
- package/src/rules/operability/no-process-exit.js.map +1 -1
- package/src/rules/operability/no-verbose-error-messages.js +3 -0
- package/src/rules/operability/no-verbose-error-messages.js.map +1 -1
- package/src/rules/operability/require-code-minification.js +3 -0
- package/src/rules/operability/require-code-minification.js.map +1 -1
- package/src/rules/operability/require-data-minimization.js +3 -0
- package/src/rules/operability/require-data-minimization.js.map +1 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
## [3.0.5] - 2026-02-08
|
|
2
|
+
|
|
3
|
+
## 3.0.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#197](https://github.com/ofri-peretz/eslint/pull/197) [`ecb8491`](https://github.com/ofri-peretz/eslint/commit/ecb849121833bf63b00256fa837f329bb721fbac) Thanks [@ofri-peretz](https://github.com/ofri-peretz)! - fix: republish `recommended` with correctly-namespaced, unscoped rule ids
|
|
8
|
+
|
|
9
|
+
`eslint-plugin-maintainability@3.0.3` and `eslint-plugin-operability@3.0.5`
|
|
10
|
+
shipped a `recommended` preset whose rule ids carried a doubled, scoped plugin
|
|
11
|
+
segment (`@interlace/maintainability/maintainability/cognitive-complexity`)
|
|
12
|
+
that no registered plugin key matched. Enabling the preset alongside any other
|
|
13
|
+
config made ESLint throw at load:
|
|
14
|
+
|
|
15
|
+
```text
|
|
16
|
+
Could not find plugin "@interlace/maintainability/maintainability".
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
(and the equivalent `@interlace/operability/operability` for operability.)
|
|
20
|
+
|
|
21
|
+
The source was already corrected to the bare, unscoped form
|
|
22
|
+
(`maintainability/cognitive-complexity` under a `maintainability` plugin key)
|
|
23
|
+
but was never republished, so npm still served the broken build. This release
|
|
24
|
+
ships the corrected build. `plugin.meta.name` is also fixed to the unscoped
|
|
25
|
+
`eslint-plugin-maintainability` (was `@interlace/eslint-plugin-maintainability`,
|
|
26
|
+
which drifted from the package name and every other plugin).
|
|
27
|
+
|
|
28
|
+
Each plugin is configured on its own — there is no unified config. No rule
|
|
29
|
+
behaviour changes.
|
|
30
|
+
|
|
31
|
+
New regression locks in each plugin's `index.test.ts` reproduce ESLint's rule-id
|
|
32
|
+
resolution, pin the plugin name and key as unscoped, and load each `recommended`
|
|
33
|
+
preset in a real ESLint instance — failing closed if a scoped or doubly
|
|
34
|
+
namespaced config could ship again.
|
|
35
|
+
|
|
36
|
+
### Bug Fixes
|
|
37
|
+
|
|
38
|
+
- align codecov component IDs with full package names ([2831b968](https://github.com/ofri-peretz/eslint/commit/2831b968))
|
|
39
|
+
|
|
40
|
+
### Documentation
|
|
41
|
+
|
|
42
|
+
- fix changelog header format across all packages ([c3a15082](https://github.com/ofri-peretz/eslint/commit/c3a15082))
|
|
43
|
+
|
|
44
|
+
### ❤️ Thank You
|
|
45
|
+
|
|
46
|
+
- Ofri Peretz
|
|
47
|
+
|
|
48
|
+
## [3.0.4] - 2026-02-06
|
|
49
|
+
|
|
50
|
+
### Bug Fixes
|
|
51
|
+
|
|
52
|
+
- align codecov component names and update docs components ([0a59a86c](https://github.com/ofri-peretz/eslint/commit/0a59a86c))
|
|
53
|
+
|
|
54
|
+
### ❤️ Thank You
|
|
55
|
+
|
|
56
|
+
- Ofri Peretz
|
|
57
|
+
|
|
58
|
+
## [3.0.3] - 2026-02-02
|
|
59
|
+
|
|
60
|
+
This was a version bump only for eslint-plugin-operability to align it with other projects, there were no code changes.
|
|
61
|
+
|
|
62
|
+
# Changelog
|
|
63
|
+
|
|
64
|
+
All notable changes to `eslint-plugin-operability` will be documented in this file.
|
|
65
|
+
|
|
66
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
67
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
68
|
+
|
|
69
|
+
### Documentation
|
|
70
|
+
|
|
71
|
+
- 📘 Launched new documentation site: [eslint.interlace.tools](https://eslint.interlace.tools/)
|
|
72
|
+
- 📝 Achieved 100% documentation parity (both .md and .mdx files)
|
|
73
|
+
|
|
74
|
+
## [3.0.2] - 2026-02-02
|
|
75
|
+
|
|
76
|
+
This was a version bump only for eslint-plugin-operability to align it with other projects, there were no code changes.
|
|
77
|
+
|
|
78
|
+
## [3.0.1] - 2026-02-02
|
|
79
|
+
|
|
80
|
+
This was a version bump only for eslint-plugin-operability to align it with other projects, there were no code changes.
|
|
81
|
+
|
|
82
|
+
## [3.0.0] - 2026-02-02
|
|
83
|
+
|
|
84
|
+
This was a version bump only for eslint-plugin-operability to align it with other projects, there were no code changes.
|
|
85
|
+
|
|
86
|
+
## [1.0.0] - 2026-01-26
|
|
87
|
+
|
|
88
|
+
### Added
|
|
89
|
+
|
|
90
|
+
- Initial stable release with 6 production-readiness rules
|
|
91
|
+
- LLM-optimized error messages for AI-assisted development
|
|
92
|
+
- 100% test coverage across all rules
|
|
93
|
+
- ESLint 9 flat config support
|
|
94
|
+
- TypeScript type definitions for all rule options
|
|
95
|
+
|
|
96
|
+
### Rules
|
|
97
|
+
|
|
98
|
+
| Rule | Description | 💼 | ⚠️ |
|
|
99
|
+
| :---------------------------- | :----------------------------------------------- | :-: | :-: |
|
|
100
|
+
| `no-console-log` | Disallow `console.log` in production code | 💼 | ⚠️ |
|
|
101
|
+
| `no-process-exit` | Disallow `process.exit()` in library code | | |
|
|
102
|
+
| `no-debug-code-in-production` | Detect `debugger` statements and debug keywords | 💼 | |
|
|
103
|
+
| `no-verbose-error-messages` | Prevent overly detailed error messages (CWE-209) | 💼 | ⚠️ |
|
|
104
|
+
| `require-code-minification` | Detect patterns that prevent minification | | |
|
|
105
|
+
| `require-data-minimization` | Detect excessive data exposure in responses | | |
|
|
106
|
+
|
|
107
|
+
### Presets
|
|
108
|
+
|
|
109
|
+
- `recommended` - Balanced operability checks for production code
|
|
110
|
+
|
|
111
|
+
### Security
|
|
112
|
+
|
|
113
|
+
- `no-verbose-error-messages` prevents information exposure (CWE-209)
|
|
114
|
+
- `require-data-minimization` enforces data protection principles
|
|
115
|
+
|
|
116
|
+
### Jan 2026 Remediation
|
|
117
|
+
|
|
118
|
+
- Converted skeleton documentation to high-fidelity guides
|
|
119
|
+
- Added comprehensive examples for all rules
|
|
120
|
+
- Documented known limitations in `docs/KNOWN-LIMITATIONS.md`
|
package/LICENSE
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Ofri Peretz
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
23
|
+
|
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<a href="https://eslint.interlace.tools" target="blank"><img src="https://eslint.interlace.tools/eslint-interlace-logo-light.svg" alt="ESLint Interlace Logo" width="120" /></a>
|
|
2
|
+
<a href="https://eslint.interlace.tools/?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-operability" target="blank"><img src="https://eslint.interlace.tools/eslint-interlace-logo-light.svg" alt="ESLint Interlace Logo" width="120" /></a>
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
5
|
<p align="center">
|
|
6
|
-
|
|
6
|
+
Operability rules — observability hooks, structured logging, and runtime resilience.
|
|
7
7
|
</p>
|
|
8
8
|
|
|
9
9
|
<p align="center">
|
|
@@ -14,10 +14,11 @@
|
|
|
14
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>
|
|
15
15
|
</p>
|
|
16
16
|
|
|
17
|
+
> ⭐ If this plugin caught a real bug for you, [**star the repo**](https://github.com/ofri-peretz/eslint) — it's the signal that keeps these rules maintained.
|
|
18
|
+
|
|
17
19
|
## Description
|
|
18
20
|
|
|
19
|
-
This plugin provides
|
|
20
|
-
By using this plugin, you can proactively identify and mitigate security risks across your entire codebase.
|
|
21
|
+
This plugin provides Operability rules — observability hooks, structured logging, and runtime resilience.
|
|
21
22
|
|
|
22
23
|
## Philosophy
|
|
23
24
|
|
|
@@ -25,12 +26,12 @@ By using this plugin, you can proactively identify and mitigate security risks a
|
|
|
25
26
|
|
|
26
27
|
## Getting Started
|
|
27
28
|
|
|
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). 📚
|
|
29
|
+
- To check out the [guide](https://eslint.interlace.tools/docs/quality/plugin-operability?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-operability), visit [eslint.interlace.tools](https://eslint.interlace.tools/?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-operability). 📚
|
|
30
|
+
- 要查看中文 [指南](https://eslint.interlace.tools/docs/quality/plugin-operability?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-operability), 请访问 [eslint.interlace.tools](https://eslint.interlace.tools/?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-operability). 📚
|
|
31
|
+
- [가이드](https://eslint.interlace.tools/docs/quality/plugin-operability?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-operability) 문서는 [eslint.interlace.tools](https://eslint.interlace.tools/?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-operability)에서 확인하실 수 있습니다. 📚
|
|
32
|
+
- [ガイド](https://eslint.interlace.tools/docs/quality/plugin-operability?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-operability)は [eslint.interlace.tools](https://eslint.interlace.tools/?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-operability)でご確認ください。 📚
|
|
33
|
+
- Para ver la [guía](https://eslint.interlace.tools/docs/quality/plugin-operability?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-operability), visita [eslint.interlace.tools](https://eslint.interlace.tools/?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-operability). 📚
|
|
34
|
+
- للاطلاع على [الدليل](https://eslint.interlace.tools/docs/quality/plugin-operability?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-operability)، قم بزيارة [eslint.interlace.tools](https://eslint.interlace.tools/?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-operability). 📚
|
|
34
35
|
|
|
35
36
|
```bash
|
|
36
37
|
npm install eslint-plugin-operability --save-dev
|
|
@@ -117,6 +118,14 @@ throw new Error('Service temporarily unavailable');
|
|
|
117
118
|
|
|
118
119
|
---
|
|
119
120
|
|
|
121
|
+
## 📦 Compatibility
|
|
122
|
+
| Package | Version |
|
|
123
|
+
| :--- | :--- |
|
|
124
|
+
| ESLint | `^8.0.0 \|\| ^9.0.0 \|\| ^10.0.0` |
|
|
125
|
+
| Node.js | `>=18.0.0` |
|
|
126
|
+
|
|
127
|
+
See the [ESLint Version Support Policy](../../docs/ESLINT_VERSION_SUPPORT.md) — current ecosystem share data, the 20% gate, and the forward-looking exception that covers v10.
|
|
128
|
+
|
|
120
129
|
## Rules
|
|
121
130
|
|
|
122
131
|
**Legend**
|
|
@@ -124,15 +133,24 @@ throw new Error('Service temporarily unavailable');
|
|
|
124
133
|
| Icon | Description |
|
|
125
134
|
| :---: | :--- |
|
|
126
135
|
| 💼 | **Recommended**: Included in the recommended preset. |
|
|
127
|
-
| ⚠️ | **Warns**: Set
|
|
136
|
+
| ⚠️ | **Warns**: Set to warn in recommended preset. |
|
|
128
137
|
| 🔧 | **Auto-fixable**: Automatically fixable by the `--fix` CLI option. |
|
|
129
138
|
| 💡 | **Suggestions**: Providing code suggestions in IDE. |
|
|
130
139
|
| 🚫 | **Deprecated**: This rule is deprecated. |
|
|
131
|
-
|
|
132
|
-
|
|
|
133
|
-
|
|
|
134
|
-
|
|
135
|
-
|
|
140
|
+
| 🟢 | **Type-unaware**: AST-only, runs in oxlint JS-plugin tier. |
|
|
141
|
+
| 🟡 | **Type-aware (refining)**: pure-AST primary path; types refine precision. |
|
|
142
|
+
| 🟠 | **Type-aware (graceful)**: requires TS program; silent without it. |
|
|
143
|
+
|
|
144
|
+
<!-- AUTO-GENERATED:RULES_TABLE:START - Do not edit manually -->
|
|
145
|
+
| Rule | CWE | OWASP | CVSS | Description | 🧠 | 💼 | ⚠️ | 🔧 | 💡 | 🚫 |
|
|
146
|
+
| :--- | :---: | :---: | :---: | :--- | :---: | :---: | :---: | :---: | :---: | :---: |
|
|
147
|
+
| [no-console-log](https://eslint.interlace.tools/docs/quality/plugin-operability/rules/no-console-log?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-operability) | CWE-532 | | | Disallow console.log with configurable remediation strategies and LLM-optimized output. This rule is part o… | 🟢 | | ⚠️ | | 💡 | |
|
|
148
|
+
| [no-debug-code-in-production](https://eslint.interlace.tools/docs/quality/plugin-operability/rules/no-debug-code-in-production?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-operability) | CWE-489 | | | Detects debug code that should not be present in production builds. | 🟢 | 💼 | | | 💡 | |
|
|
149
|
+
| [no-process-exit](https://eslint.interlace.tools/docs/quality/plugin-operability/rules/no-process-exit?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-operability) | | | | Prevents direct process.exit() calls to encourage graceful shutdown patterns. This rule is part of eslint-p… | 🟢 | | | | 💡 | |
|
|
150
|
+
| [no-verbose-error-messages](https://eslint.interlace.tools/docs/quality/plugin-operability/rules/no-verbose-error-messages?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-operability) | CWE-209 | A01:2021 | | Prevent exposing stack traces to users in API responses | 🟢 | | ⚠️ | | | |
|
|
151
|
+
| [require-code-minification](https://eslint.interlace.tools/docs/quality/plugin-operability/rules/require-code-minification?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-operability) | CWE-656 | | | Require minification configuration in build tools | 🟢 | | | | | |
|
|
152
|
+
| [require-data-minimization](https://eslint.interlace.tools/docs/quality/plugin-operability/rules/require-data-minimization?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-operability) | CWE-213 | | | Identifies excessive data collection patterns that violate privacy principles | 🟢 | | | | 💡 | |
|
|
153
|
+
<!-- AUTO-GENERATED:RULES_TABLE:END -->
|
|
136
154
|
## 🔗 Related ESLint Plugins
|
|
137
155
|
|
|
138
156
|
Part of the **Interlace ESLint Ecosystem** — AI-native security plugins with LLM-optimized error messages:
|
|
@@ -141,7 +159,7 @@ Part of the **Interlace ESLint Ecosystem** — AI-native security plugins with L
|
|
|
141
159
|
| :--- | :---: | :--- |
|
|
142
160
|
| [`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
161
|
| [`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-
|
|
162
|
+
| [`eslint-plugin-node-security`](https://www.npmjs.com/package/eslint-plugin-node-security) | [](https://www.npmjs.com/package/eslint-plugin-node-security) | Node.js core-module security (fs, child_process, vm, crypto, Buffer). |
|
|
145
163
|
| [`eslint-plugin-jwt`](https://www.npmjs.com/package/eslint-plugin-jwt) | [](https://www.npmjs.com/package/eslint-plugin-jwt) | JWT security & best practices. |
|
|
146
164
|
| [`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
165
|
| [`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. |
|
|
@@ -151,10 +169,19 @@ Part of the **Interlace ESLint Ecosystem** — AI-native security plugins with L
|
|
|
151
169
|
| [`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
170
|
| [`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. |
|
|
153
171
|
|
|
172
|
+
<!-- INTERLACE:STAR_CTA:START -->
|
|
173
|
+
## ⭐ Support & follow
|
|
174
|
+
|
|
175
|
+
If this plugin caught a real bug for you, **[star the repo](https://github.com/ofri-peretz/eslint)** — stars are the signal that keeps the Interlace ESLint ecosystem maintained — and **[follow the writeups on Dev.to](https://dev.to/ofri-peretz)** for the benchmarks and security research behind these rules.
|
|
176
|
+
|
|
177
|
+
[](https://github.com/ofri-peretz/eslint)
|
|
178
|
+
|
|
179
|
+
<!-- INTERLACE:STAR_CTA:END -->
|
|
180
|
+
|
|
154
181
|
## 📄 License
|
|
155
182
|
|
|
156
183
|
MIT © [Ofri Peretz](https://github.com/ofri-peretz)
|
|
157
184
|
|
|
158
185
|
<p align="center">
|
|
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>
|
|
186
|
+
<a href="https://eslint.interlace.tools/docs/quality/plugin-operability?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-operability"><img src="https://eslint.interlace.tools/images/og-operability.png" alt="ESLint Interlace Plugin" width="100%" /></a>
|
|
160
187
|
</p>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-operability",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.6",
|
|
4
4
|
"description": "ESLint rules for production behavior, resource hygiene, and log quality.",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -9,6 +9,10 @@
|
|
|
9
9
|
".": {
|
|
10
10
|
"types": "./src/index.d.ts",
|
|
11
11
|
"default": "./src/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./oxlint": {
|
|
14
|
+
"types": "./src/oxlint.d.ts",
|
|
15
|
+
"default": "./src/oxlint.js"
|
|
12
16
|
}
|
|
13
17
|
},
|
|
14
18
|
"author": "Ofri Peretz <ofriperetzdev@gmail.com>",
|
|
@@ -48,8 +52,21 @@
|
|
|
48
52
|
"url": "https://github.com/ofri-peretz/eslint",
|
|
49
53
|
"directory": "packages/eslint-plugin-operability"
|
|
50
54
|
},
|
|
51
|
-
"homepage": "https://
|
|
55
|
+
"homepage": "https://eslint.interlace.tools/docs/quality/plugin-operability?utm_source=npm&utm_medium=referral&utm_campaign=eslint-plugin-operability",
|
|
52
56
|
"bugs": {
|
|
53
57
|
"url": "https://github.com/ofri-peretz/eslint/issues"
|
|
58
|
+
},
|
|
59
|
+
"scripts": {
|
|
60
|
+
"build": "tsx ../../scripts/build-package.ts",
|
|
61
|
+
"test": "vitest run",
|
|
62
|
+
"test:coverage": "vitest run --coverage",
|
|
63
|
+
"typecheck": "tsc -p tsconfig.lib.json --noEmit"
|
|
64
|
+
},
|
|
65
|
+
"peerDependencies": {
|
|
66
|
+
"eslint": "^8.0.0 || ^9.0.0 || ^10.0.0"
|
|
67
|
+
},
|
|
68
|
+
"funding": {
|
|
69
|
+
"type": "github",
|
|
70
|
+
"url": "https://github.com/ofri-peretz/eslint"
|
|
54
71
|
}
|
|
55
|
-
}
|
|
72
|
+
}
|
package/src/index.d.ts
CHANGED
|
@@ -89,7 +89,7 @@ export declare const plugin: {
|
|
|
89
89
|
export declare const configs: {
|
|
90
90
|
recommended: {
|
|
91
91
|
plugins: {
|
|
92
|
-
|
|
92
|
+
operability: {
|
|
93
93
|
meta: {
|
|
94
94
|
name: string;
|
|
95
95
|
version: string;
|
|
@@ -135,9 +135,9 @@ export declare const configs: {
|
|
|
135
135
|
};
|
|
136
136
|
};
|
|
137
137
|
rules: {
|
|
138
|
-
'
|
|
139
|
-
'
|
|
140
|
-
'
|
|
138
|
+
'operability/no-console-log': "warn";
|
|
139
|
+
'operability/no-debug-code-in-production': "error";
|
|
140
|
+
'operability/no-verbose-error-messages': "warn";
|
|
141
141
|
};
|
|
142
142
|
};
|
|
143
143
|
};
|
package/src/index.js
CHANGED
|
@@ -31,19 +31,19 @@ exports.rules = {
|
|
|
31
31
|
exports.plugin = {
|
|
32
32
|
meta: {
|
|
33
33
|
name: 'eslint-plugin-operability',
|
|
34
|
-
version: '
|
|
34
|
+
version: '3.0.6',
|
|
35
35
|
},
|
|
36
36
|
rules: exports.rules,
|
|
37
37
|
};
|
|
38
38
|
exports.configs = {
|
|
39
39
|
recommended: {
|
|
40
40
|
plugins: {
|
|
41
|
-
'
|
|
41
|
+
'operability': exports.plugin,
|
|
42
42
|
},
|
|
43
43
|
rules: {
|
|
44
|
-
'
|
|
45
|
-
'
|
|
46
|
-
'
|
|
44
|
+
'operability/no-console-log': 'warn',
|
|
45
|
+
'operability/no-debug-code-in-production': 'error',
|
|
46
|
+
'operability/no-verbose-error-messages': 'warn',
|
|
47
47
|
},
|
|
48
48
|
},
|
|
49
49
|
};
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAIH,oBAAoB;AACpB,uEAAkE;AAClE,yEAAoE;AACpE,iGAA0F;AAC1F,6FAAuF;AACvF,6FAAwF;AACxF,6FAAwF;AAE3E,QAAA,KAAK,GAAG;IACnB,gBAAgB,EAAE,6BAAY;IAC9B,iBAAiB,EAAE,+BAAa;IAChC,6BAA6B,EAAE,qDAAuB;IACtD,2BAA2B,EAAE,kDAAsB;IACnD,2BAA2B,EAAE,mDAAuB;IACpD,2BAA2B,EAAE,mDAAuB;IAEpD,oBAAoB;IACpB,4BAA4B,EAAE,6BAAY;IAC1C,6BAA6B,EAAE,+BAAa;IAC5C,yCAAyC,EAAE,qDAAuB;IAClE,uCAAuC,EAAE,kDAAsB;IAC/D,uCAAuC,EAAE,mDAAuB;IAChE,uCAAuC,EAAE,mDAAuB;CACS,CAAC;AAE/D,QAAA,MAAM,GAAG;IACpB,IAAI,EAAE;QACJ,IAAI,EAAE,2BAA2B;QACjC,OAAO,EAAE,OAAO;KACjB;IACD,KAAK,EAAL,aAAK;CAC+B,CAAC;AAE1B,QAAA,OAAO,GAAG;IACrB,WAAW,EAAE;QACX,OAAO,EAAE;YACP,aAAa,EAAE,cAAM;SACtB;QACD,KAAK,EAAE;YACL,4BAA4B,EAAE,MAAM;YACpC,yCAAyC,EAAE,OAAO;YAClD,uCAAuC,EAAE,MAAM;SAChD;KACmC;CACc,CAAC;AAEvD,kBAAe,cAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eslint-plugin-operability.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"eslint-plugin-operability.js","sourceRoot":"","sources":["../../../src/lib/eslint-plugin-operability.ts"],"names":[],"mappings":";;AAAA,0DAEC;AAFD,SAAgB,uBAAuB;IACrC,OAAO,2BAA2B,CAAC;AACrC,CAAC"}
|
package/src/oxlint.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Ofri Peretz
|
|
3
|
+
* Licensed under the MIT License. Use of this source code is governed by the
|
|
4
|
+
* MIT license that can be found in the LICENSE file.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* oxlint sub-export.
|
|
8
|
+
*
|
|
9
|
+
* Consumers wire oxlint to this entry via:
|
|
10
|
+
* { "jsPlugins": ["eslint-plugin-operability/oxlint"] }
|
|
11
|
+
*
|
|
12
|
+
* oxlint's JS plugin loader does `require('eslint-plugin-operability/oxlint')` and reads
|
|
13
|
+
* `.rules` off the result. The compiled output of `export = plugin` is
|
|
14
|
+
* `module.exports = plugin`, which gives oxlint the plugin object directly
|
|
15
|
+
* (`{ meta, rules }`) — no wrapper, no `.default` indirection.
|
|
16
|
+
*
|
|
17
|
+
* Generated by scripts/generate-oxlint-shims.mjs. Do not edit by hand.
|
|
18
|
+
*/
|
|
19
|
+
import { plugin } from './index';
|
|
20
|
+
export = plugin;
|
package/src/oxlint.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2025 Ofri Peretz
|
|
4
|
+
* Licensed under the MIT License. Use of this source code is governed by the
|
|
5
|
+
* MIT license that can be found in the LICENSE file.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* oxlint sub-export.
|
|
9
|
+
*
|
|
10
|
+
* Consumers wire oxlint to this entry via:
|
|
11
|
+
* { "jsPlugins": ["eslint-plugin-operability/oxlint"] }
|
|
12
|
+
*
|
|
13
|
+
* oxlint's JS plugin loader does `require('eslint-plugin-operability/oxlint')` and reads
|
|
14
|
+
* `.rules` off the result. The compiled output of `export = plugin` is
|
|
15
|
+
* `module.exports = plugin`, which gives oxlint the plugin object directly
|
|
16
|
+
* (`{ meta, rules }`) — no wrapper, no `.default` indirection.
|
|
17
|
+
*
|
|
18
|
+
* Generated by scripts/generate-oxlint-shims.mjs. Do not edit by hand.
|
|
19
|
+
*/
|
|
20
|
+
const index_1 = require("./index");
|
|
21
|
+
module.exports = index_1.plugin;
|
|
22
|
+
//# sourceMappingURL=oxlint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oxlint.js","sourceRoot":"","sources":["../../src/oxlint.ts"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH;;;;;;;;;;;;GAYG;AAEH,mCAAiC;AAEjC,iBAAS,cAAM,CAAC"}
|
|
@@ -19,7 +19,10 @@ exports.noConsoleLog = (0, eslint_devkit_2.createRule)({
|
|
|
19
19
|
meta: {
|
|
20
20
|
type: 'problem',
|
|
21
21
|
docs: {
|
|
22
|
+
url: 'https://github.com/ofri-peretz/eslint/blob/main/packages/eslint-plugin-operability/docs/rules/no-console-log.md',
|
|
22
23
|
description: 'Disallow console.log with configurable remediation strategies',
|
|
24
|
+
cwe: 'CWE-532',
|
|
25
|
+
cvss: 5,
|
|
23
26
|
},
|
|
24
27
|
fixable: 'code',
|
|
25
28
|
hasSuggestions: false,
|
|
@@ -142,8 +145,9 @@ exports.noConsoleLog = (0, eslint_devkit_2.createRule)({
|
|
|
142
145
|
const { strategy = 'remove', ignorePaths = [], loggerName, maxOccurrences, severityMap = {}, autoDetectLogger = true, sourcePatterns = ['console'], } = options;
|
|
143
146
|
/** Merge user's severityMap with defaults to determine method mappings */
|
|
144
147
|
const effectiveSeverityMap = { ...DEFAULT_SEVERITY_MAP, ...severityMap };
|
|
145
|
-
const filename = context.filename
|
|
146
|
-
|
|
148
|
+
const filename = context.filename;
|
|
149
|
+
// oxlint-disable-next-line no-shadow
|
|
150
|
+
const sourceCode = context.sourceCode;
|
|
147
151
|
const occurrences = [];
|
|
148
152
|
/**
|
|
149
153
|
* Auto-detect logger in file by scanning imports.
|
|
@@ -206,11 +210,20 @@ exports.noConsoleLog = (0, eslint_devkit_2.createRule)({
|
|
|
206
210
|
/** Directory match */
|
|
207
211
|
if (normalizedPath.startsWith(normalizedPattern + '/'))
|
|
208
212
|
return true;
|
|
209
|
-
/**
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
213
|
+
/**
|
|
214
|
+
* Glob-like pattern support. Escape ALL regex metacharacters (the
|
|
215
|
+
* previous logic only escaped `.`, so `(`, `)`, `+`, `[`, `]`, `\`
|
|
216
|
+
* etc. were interpreted as regex syntax). CodeQL specifically flagged
|
|
217
|
+
* the unescaped backslash as `js/incomplete-sanitization`. The escape
|
|
218
|
+
* set MUST include `*` and `?` so the subsequent replaces can find
|
|
219
|
+
* the escaped tokens and translate them to glob equivalents — without
|
|
220
|
+
* that, raw `*` / `?` reach `new RegExp()` and the pattern matching
|
|
221
|
+
* is silently broken.
|
|
222
|
+
*/
|
|
223
|
+
const escaped = normalizedPattern.replace(/[.+^${}()|[\]\\*?]/g, '\\$&');
|
|
224
|
+
const regexPattern = escaped
|
|
225
|
+
.replace(/\\\*/g, '.*')
|
|
226
|
+
.replace(/\\\?/g, '.');
|
|
214
227
|
return new RegExp(regexPattern).test(normalizedPath);
|
|
215
228
|
});
|
|
216
229
|
};
|
|
@@ -249,7 +262,6 @@ exports.noConsoleLog = (0, eslint_devkit_2.createRule)({
|
|
|
249
262
|
typeof maxOccurrences === 'number' &&
|
|
250
263
|
maxOccurrences > 0 &&
|
|
251
264
|
occurrences.length > maxOccurrences;
|
|
252
|
-
const sourceCode = context.sourceCode || context.sourceCode;
|
|
253
265
|
const relativePath = (0, eslint_devkit_3.getRelativePath)(process.cwd(), filename);
|
|
254
266
|
/**
|
|
255
267
|
* Determine the target logger method to use based on severityMap.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"no-console-log.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"no-console-log.js","sourceRoot":"","sources":["../../../../src/rules/operability/no-console-log.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAOH,4DAA0E;AAC1E,4DAAsD;AACtD,4DAA0E;AAgC1E,iFAAiF;AACjF,0EAA0E;AAC1E,MAAM,oBAAoB,GAAoB;IAC5C,GAA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C,OAAO,CAAC,IAAI,KAAK,iBAAiB;YAClC,OAAO,CAAC,IAAI,KAAK,qBAAqB,EACtC,CAAC;YACD,OAAO,OAA6B,CAAC;QACvC,CAAC;QACD,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC;IAC3B,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -17,7 +17,10 @@ exports.noDebugCodeInProduction = (0, eslint_devkit_1.createRule)({
|
|
|
17
17
|
meta: {
|
|
18
18
|
type: 'problem',
|
|
19
19
|
docs: {
|
|
20
|
+
url: 'https://github.com/ofri-peretz/eslint/blob/main/packages/eslint-plugin-operability/docs/rules/no-debug-code-in-production.md',
|
|
20
21
|
description: 'Detect debug code in production',
|
|
22
|
+
cwe: 'CWE-489',
|
|
23
|
+
cvss: 7.5,
|
|
21
24
|
},
|
|
22
25
|
messages: {
|
|
23
26
|
violationDetected: (0, eslint_devkit_1.formatLLMMessage)({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"no-debug-code-in-production.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"no-debug-code-in-production.js","sourceRoot":"","sources":["../../../../src/rules/operability/no-debug-code-in-production.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH;;;;GAIG;AAEH,4DAKkC;AAUrB,QAAA,uBAAuB,GAAG,IAAA,0BAAU,EAA0B;IACzE,IAAI,EAAE,6BAA6B;IACnC,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACJ,GAAG,EAAE,8HAA8H;YACnI,WAAW,EAAE,iCAAiC;YAC9C,GAAG,EAAE,SAAS;YACd,IAAI,EAAE,GAAG;SACV;QACD,QAAQ,EAAE;YACR,iBAAiB,EAAE,IAAA,gCAAgB,EAAC;gBAClC,IAAI,EAAE,4BAAY,CAAC,QAAQ;gBAC3B,SAAS,EAAE,oBAAoB;gBAC/B,GAAG,EAAE,SAAS;gBACd,WAAW,EACT,oEAAoE;gBACtE,QAAQ,EAAE,MAAM;gBAChB,GAAG,EAAE,mCAAmC;gBACxC,iBAAiB,EAAE,iDAAiD;aACrE,CAAC;SACH;QACD,MAAM,EAAE,EAAE;KACX;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,CAAC,OAAO;QACZ,OAAO;YACL,UAAU,CAAC,IAAyB;gBAClC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;oBAC7C,OAAO,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC,CAAC;gBAC3D,CAAC;YACH,CAAC;YACD,cAAc,CAAC,IAA6B;gBAC1C,IACE,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,8BAAc,CAAC,gBAAgB;oBACpD,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,8BAAc,CAAC,UAAU;oBACrD,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,SAAS;oBACrC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,KAAK,8BAAc,CAAC,UAAU;oBACvD,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,KAAK,KAAK,EACnC,CAAC;oBACD,OAAO,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC,CAAC;gBAC3D,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -13,6 +13,7 @@ exports.noProcessExit = (0, eslint_devkit_1.createRule)({
|
|
|
13
13
|
meta: {
|
|
14
14
|
type: 'problem',
|
|
15
15
|
docs: {
|
|
16
|
+
url: 'https://github.com/ofri-peretz/eslint/blob/main/packages/eslint-plugin-operability/docs/rules/no-process-exit.md',
|
|
16
17
|
description: 'Prevent usage of process.exit() which can terminate the process unexpectedly',
|
|
17
18
|
},
|
|
18
19
|
hasSuggestions: false,
|
|
@@ -42,12 +43,14 @@ exports.noProcessExit = (0, eslint_devkit_1.createRule)({
|
|
|
42
43
|
},
|
|
43
44
|
defaultOptions: [{ allow: [] }],
|
|
44
45
|
create(context) {
|
|
46
|
+
// oxlint-disable-next-line consistent-function-scoping
|
|
45
47
|
function isInAllowedContext() {
|
|
46
48
|
// For simplicity, we'll skip the allow option for now
|
|
47
49
|
return false;
|
|
48
50
|
}
|
|
49
51
|
function isProcessExitCall(node) {
|
|
50
52
|
// Check if this is a call to process.exit
|
|
53
|
+
// oxlint-disable-next-line consistent-function-scoping
|
|
51
54
|
function isProcessExitMember(callee) {
|
|
52
55
|
if (callee.type === 'MemberExpression' &&
|
|
53
56
|
callee.object.type === 'Identifier' &&
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"no-process-exit.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"no-process-exit.js","sourceRoot":"","sources":["../../../../src/rules/operability/no-process-exit.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAOH,4DAAsD;AACtD,4DAA0E;AAW7D,QAAA,aAAa,GAAG,IAAA,0BAAU,EAA0B;IAC/D,IAAI,EAAE,iBAAiB;IACvB,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACJ,GAAG,EAAE,kHAAkH;YACvH,WAAW,EACT,8EAA8E;SACjF;QACD,cAAc,EAAE,KAAK;QACrB,QAAQ,EAAE;YACR,aAAa,EAAE,IAAA,gCAAgB,EAAC;gBAC9B,IAAI,EAAE,4BAAY,CAAC,OAAO;gBAC1B,SAAS,EAAE,cAAc;gBACzB,WAAW,EAAE,4BAA4B;gBACzC,QAAQ,EAAE,MAAM;gBAChB,GAAG,EAAE,6CAA6C;gBAClD,iBAAiB,EACf,+FAA+F;aAClG,CAAC;SACH;QACD,MAAM,EAAE;YACN;gBACE,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,KAAK,EAAE;wBACL,I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|
17
17
|
meta: {
|
|
18
18
|
type: 'problem',
|
|
19
19
|
docs: {
|
|
20
|
+
url: 'https://github.com/ofri-peretz/eslint/blob/main/packages/eslint-plugin-operability/docs/rules/no-verbose-error-messages.md',
|
|
20
21
|
description: 'Prevent exposing stack traces to users',
|
|
22
|
+
cwe: 'CWE-209',
|
|
23
|
+
cvss: 5,
|
|
21
24
|
},
|
|
22
25
|
messages: {
|
|
23
26
|
violationDetected: (0, eslint_devkit_1.formatLLMMessage)({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"no-verbose-error-messages.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"no-verbose-error-messages.js","sourceRoot":"","sources":["../../../../src/rules/operability/no-verbose-error-messages.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH;;;;GAIG;AAEH,4DAKkC;AAUrB,QAAA,sBAAsB,GAAG,IAAA,0BAAU,EAA0B;IACxE,IAAI,EAAE,2BAA2B;IACjC,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACJ,GAAG,EAAE,4HAA4H;YACjI,WAAW,EAAE,wCAAwC;YACrD,GAAG,EAAE,SAAS;YACd,IAAI,EAAE,CAAC;SACR;QACD,QAAQ,EAAE;YACR,iBAAiB,EAAE,IAAA,gCAAgB,EAAC;gBAClC,IAAI,EAAE,4BAAY,CAAC,QAAQ;gBAC3B,SAAS,EAAE,oBAAoB;gBAC/B,GAAG,EAAE,SAAS;gBACd,WAAW,EACT,2EAA2E;gBAC7E,QAAQ,EAAE,QAAQ;gBAClB,GAAG,EAAE,mCAAmC;gBACxC,iBAAiB,EAAE,iDAAiD;aACrE,CAAC;SACH;QACD,MAAM,EAAE,EAAE;KACX;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,CAAC,OAAO;QACZ,SAAS,MAAM,CAAC,IAAmB;YACjC,OAAO,CAAC,MAAM,CAAC;gBACb,IAAI;gBACJ,SAAS,EAAE,mBAAmB;aAC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,QAAQ,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAC1C,CAAC;wBACF,IAAI,SAAS,EAAE,CAAC;4BACd,MAAM,CAAC,IAAI,CAAC,CAAC;wBACf,CAAC;oBACH,CAAC;gBACH,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -17,7 +17,10 @@ exports.requireCodeMinification = (0, eslint_devkit_1.createRule)({
|
|
|
17
17
|
meta: {
|
|
18
18
|
type: 'problem',
|
|
19
19
|
docs: {
|
|
20
|
+
url: 'https://github.com/ofri-peretz/eslint/blob/main/packages/eslint-plugin-operability/docs/rules/require-code-minification.md',
|
|
20
21
|
description: 'Require minification configuration',
|
|
22
|
+
cwe: 'CWE-656',
|
|
23
|
+
cvss: 2.5,
|
|
21
24
|
},
|
|
22
25
|
messages: {
|
|
23
26
|
violationDetected: (0, eslint_devkit_1.formatLLMMessage)({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"require-code-minification.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"require-code-minification.js","sourceRoot":"","sources":["../../../../src/rules/operability/require-code-minification.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH;;;;GAIG;AAEH,4DAIkC;AAUrB,QAAA,uBAAuB,GAAG,IAAA,0BAAU,EAA0B;IACzE,IAAI,EAAE,2BAA2B;IACjC,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACJ,GAAG,EAAE,4HAA4H;YACjI,WAAW,EAAE,oCAAoC;YACjD,GAAG,EAAE,SAAS;YACd,IAAI,EAAE,GAAG;SACV;QACD,QAAQ,EAAE;YACR,iBAAiB,EAAE,IAAA,gCAAgB,EAAC;gBAClC,IAAI,EAAE,4BAAY,CAAC,QAAQ;gBAC3B,SAAS,EAAE,oBAAoB;gBAC/B,GAAG,EAAE,SAAS;gBACd,WAAW,EACT,iFAAiF;gBACnF,QAAQ,EAAE,KAAK;gBACf,GAAG,EAAE,mCAAmC;gBACxC,iBAAiB,EAAE,iDAAiD;aACrE,CAAC;SACH;QACD,MAAM,EAAE,EAAE;KACX;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,CAAC,OAAO;QACZ,OAAO;YACL,QAAQ,CAAC,IAAuB;gBAC9B,IACE,IAAI,CAAC,GAAG,CAAC,IAAI,KAAK,YAAY;oBAC9B,IAAI,CAAC,GAAG,CAAC,IAAI,KAAK,UAAU;oBAC5B,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,SAAS;oBAC7B,IAAI,CAAC,KAAK,CAAC,KAAK,KAAK,KAAK,EAC1B,CAAC;oBACD,OAAO,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC,CAAC;gBAC3D,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -17,7 +17,10 @@ exports.requireDataMinimization = (0, eslint_devkit_1.createRule)({
|
|
|
17
17
|
meta: {
|
|
18
18
|
type: 'suggestion',
|
|
19
19
|
docs: {
|
|
20
|
+
url: 'https://github.com/ofri-peretz/eslint/blob/main/packages/eslint-plugin-operability/docs/rules/require-data-minimization.md',
|
|
20
21
|
description: 'Identify excessive data collection patterns',
|
|
22
|
+
cwe: 'CWE-213',
|
|
23
|
+
cvss: 5,
|
|
21
24
|
},
|
|
22
25
|
messages: {
|
|
23
26
|
violationDetected: (0, eslint_devkit_1.formatLLMMessage)({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"require-data-minimization.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"require-data-minimization.js","sourceRoot":"","sources":["../../../../src/rules/operability/require-data-minimization.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH;;;;GAIG;AAEH,4DAKkC;AAUrB,QAAA,uBAAuB,GAAG,IAAA,0BAAU,EAA0B;IACzE,IAAI,EAAE,2BAA2B;IACjC,IAAI,E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