eslint-plugin-prisma-security 2.0.3 → 2.0.5

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.
Files changed (3) hide show
  1. package/README.md +30 -38
  2. package/package.json +3 -7
  3. package/src/index.js +1 -1
package/README.md CHANGED
@@ -22,7 +22,28 @@
22
22
  <a href="https://scorecard.dev/viewer/?uri=github.com/ofri-peretz/eslint" target="_blank"><img src="https://api.securityscorecards.dev/projects/github.com/ofri-peretz/eslint/badge" alt="OpenSSF Scorecard" /></a>
23
23
  </p>
24
24
 
25
- > ⭐ 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.
25
+ ## Getting Started
26
+
27
+ - To check out the [guide](https://eslint.interlace.tools/docs/security/plugin-prisma-security?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-prisma-security), visit [eslint.interlace.tools](https://eslint.interlace.tools/?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-prisma-security). 📚
28
+
29
+ <!-- AUTO-GENERATED:INSTALL:START - Do not edit manually -->
30
+
31
+ ```bash
32
+ npm install --save-dev eslint eslint-plugin-prisma-security
33
+ ```
34
+
35
+ ```js
36
+ // eslint.config.mjs
37
+ import { configs } from 'eslint-plugin-prisma-security';
38
+
39
+ export default [configs.recommended];
40
+ ```
41
+
42
+ `recommended` is the preset to start with. The others are listed under Configuration Presets below.
43
+
44
+ Using oxlint or Vite+? Install `oxlint-plugin-prisma-security`: the same rules under the same `prisma-security/<rule>` IDs, without ESLint. Its [page](https://www.npmjs.com/package/oxlint-plugin-prisma-security) has the setup.
45
+
46
+ <!-- AUTO-GENERATED:INSTALL:END -->
26
47
 
27
48
  ## Description
28
49
 
@@ -50,40 +71,6 @@ That trade costs recall, and we measure it:
50
71
 
51
72
  <!-- AUTO-GENERATED:DOCTRINE:END -->
52
73
 
53
- ## Getting Started
54
-
55
- - To check out the [guide](https://eslint.interlace.tools/docs/security/plugin-prisma-security?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-prisma-security), visit [eslint.interlace.tools](https://eslint.interlace.tools/?utm_source=github&utm_medium=referral&utm_campaign=eslint-plugin-prisma-security). 📚
56
-
57
- <!-- AUTO-GENERATED:INSTALL:START - Do not edit manually -->
58
-
59
- **oxlint / Vite+** — the same rules under the same `prisma-security/<rule>` IDs, without ESLint:
60
-
61
- ```bash
62
- npm install oxlint-plugin-prisma-security --save-dev
63
- ```
64
-
65
- ```jsonc
66
- // .oxlintrc.json
67
- { "jsPlugins": ["oxlint-plugin-prisma-security"] }
68
- ```
69
-
70
- ```ts
71
- // vite.config.ts
72
- import { defineConfig } from 'vite-plus';
73
-
74
- export default defineConfig({
75
- lint: { jsPlugins: ['oxlint-plugin-prisma-security'] },
76
- });
77
- ```
78
-
79
- **ESLint:**
80
-
81
- ```bash
82
- npm install eslint-plugin-prisma-security --save-dev
83
- ```
84
-
85
- <!-- AUTO-GENERATED:INSTALL:END -->
86
-
87
74
  ## ⚙️ Configuration Presets
88
75
  | Preset | Description |
89
76
  | :------------ | :------------------------------------------------------- |
@@ -134,6 +121,12 @@ src/db.ts
134
121
 
135
122
  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.
136
123
 
124
+ ### Supported library versions
125
+
126
+ The library ranges the rules were written against, as previously declared in `peerDependencies`. They are documentation only: this package installs and requires none of these libraries, and npm no longer warns on a mismatch.
127
+
128
+ - `@prisma/client`: `^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0`
129
+
137
130
  ## Rules
138
131
 
139
132
  **Legend**
@@ -206,11 +199,10 @@ Part of the **Interlace ESLint ecosystem** — AI-native rules with LLM-optimize
206
199
  <!-- AUTO-GENERATED:ECOSYSTEM_TABLE:END -->
207
200
 
208
201
  <!-- INTERLACE:STAR_CTA:START -->
209
- ## ⭐ Support & follow
210
202
 
211
- 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.
203
+ ## Support
212
204
 
213
- [![GitHub stars](https://img.shields.io/github/stars/ofri-peretz/eslint?style=social)](https://github.com/ofri-peretz/eslint)
205
+ Found a false positive? [Open an issue](https://github.com/ofri-peretz/eslint/issues): that is a bug. If the plugin helped, a star on [ofri-peretz/eslint](https://github.com/ofri-peretz/eslint) helps others find it.
214
206
 
215
207
  <!-- INTERLACE:STAR_CTA:END -->
216
208
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-prisma-security",
3
- "version": "2.0.3",
3
+ "version": "2.0.5",
4
4
  "description": "ESLint Prisma security rules for @prisma/client — detects SQL injection in raw queries built with string concatenation or template literals.",
5
5
  "type": "commonjs",
6
6
  "sideEffects": false,
@@ -69,19 +69,15 @@
69
69
  "node": ">=22.13.0"
70
70
  },
71
71
  "peerDependencies": {
72
- "eslint": "^8.40.0 || ^9.0.0 || ^10.0.0",
73
- "@prisma/client": "^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0"
72
+ "eslint": "^8.40.0 || ^9.0.0 || ^10.0.0"
74
73
  },
75
74
  "peerDependenciesMeta": {
76
75
  "eslint": {
77
76
  "optional": true
78
- },
79
- "@prisma/client": {
80
- "optional": true
81
77
  }
82
78
  },
83
79
  "dependencies": {
84
- "@interlace/eslint-devkit": "^2.0.4"
80
+ "@interlace/eslint-devkit": "^2.5.0"
85
81
  },
86
82
  "interlace": {
87
83
  "surface": {
package/src/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.configs=exports.plugin=exports.rules=void 0;const eslint_devkit_1=require("@interlace/eslint-devkit");exports.rules={get"no-mass-assignment"(){return require("./rules/no-mass-assignment").noMassAssignment},get"no-raw-identifier-interpolation"(){return require("./rules/no-raw-identifier-interpolation").noRawIdentifierInterpolation},get"no-unsafe-query"(){return require("./rules/no-unsafe-query").noUnsafeQuery},get"no-unscoped-mutation"(){return require("./rules/no-unscoped-mutation").noUnscopedMutation}};(0,eslint_devkit_1.withCanonicalDocsUrls)("plugin-prisma-security",exports.rules);exports.plugin={meta:{name:"eslint-plugin-prisma-security",version:"2.0.3"},rules:exports.rules};exports.configs={flagship:{plugins:{"prisma-security":exports.plugin},rules:{"prisma-security/no-unsafe-query":"error"}},recommended:{plugins:{"prisma-security":exports.plugin},rules:{"prisma-security/no-unsafe-query":"error"}},strict:{plugins:{"prisma-security":exports.plugin},rules:Object.fromEntries(Object.keys(exports.rules).map(ruleName=>[`prisma-security/${ruleName}`,"error"]))}};exports.default=exports.plugin;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.configs=exports.plugin=exports.rules=void 0;const eslint_devkit_1=require("@interlace/eslint-devkit");exports.rules={get"no-mass-assignment"(){return require("./rules/no-mass-assignment").noMassAssignment},get"no-raw-identifier-interpolation"(){return require("./rules/no-raw-identifier-interpolation").noRawIdentifierInterpolation},get"no-unsafe-query"(){return require("./rules/no-unsafe-query").noUnsafeQuery},get"no-unscoped-mutation"(){return require("./rules/no-unscoped-mutation").noUnscopedMutation}};(0,eslint_devkit_1.withCanonicalDocsUrls)("plugin-prisma-security",exports.rules);exports.plugin={meta:{name:"eslint-plugin-prisma-security",version:"2.0.5"},rules:exports.rules};exports.configs={flagship:{plugins:{"prisma-security":exports.plugin},rules:{"prisma-security/no-unsafe-query":"error"}},recommended:{plugins:{"prisma-security":exports.plugin},rules:{"prisma-security/no-unsafe-query":"error"}},strict:{plugins:{"prisma-security":exports.plugin},rules:Object.fromEntries(Object.keys(exports.rules).map(ruleName=>[`prisma-security/${ruleName}`,"error"]))}};exports.default=exports.plugin;