@blumintinc/eslint-plugin-blumint 1.20.78 → 1.20.79
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/lib/index.js
CHANGED
|
@@ -14,12 +14,17 @@ exports.enforceFirestorePathUtils = (0, createRule_1.createRule)({
|
|
|
14
14
|
},
|
|
15
15
|
schema: [],
|
|
16
16
|
messages: {
|
|
17
|
-
requirePathUtil: 'Use a utility function for Firestore paths to ensure type safety and maintainability. Instead of `doc("users/" + userId)`, create and use a utility function: `const toUserPath = (id: string) => `users/${id}`; doc(toUserPath(userId))`.',
|
|
17
|
+
requirePathUtil: 'Use a utility function for Firestore paths to ensure type safety and maintainability. Instead of `db.doc("users/" + userId)`, create and use a utility function: `const toUserPath = (id: string) => `users/${id}`; db.doc(toUserPath(userId))`.',
|
|
18
18
|
},
|
|
19
19
|
},
|
|
20
20
|
defaultOptions: [],
|
|
21
21
|
create(context) {
|
|
22
22
|
function isFirestoreCall(node) {
|
|
23
|
+
// Requiring an explicit receiver keeps unrelated `doc(...)`/`collection(...)`
|
|
24
|
+
// calls out of scope, at the cost of not covering the modular SDK, whose
|
|
25
|
+
// path sits in the second argument. The requirePathUtil example is written
|
|
26
|
+
// with a receiver for the same reason: a bare call is never reportable, so
|
|
27
|
+
// an example without one points at code this rule does not govern.
|
|
23
28
|
if (node.callee.type !== utils_1.AST_NODE_TYPES.MemberExpression) {
|
|
24
29
|
return false;
|
|
25
30
|
}
|
package/package.json
CHANGED
package/release-manifest.json
CHANGED
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"version": "1.20.79",
|
|
4
|
+
"date": "2026-08-02T08:54:03.464Z",
|
|
5
|
+
"rules": [
|
|
6
|
+
{
|
|
7
|
+
"name": "enforce-firestore-path-utils",
|
|
8
|
+
"changeType": "fix",
|
|
9
|
+
"issues": [
|
|
10
|
+
1613
|
|
11
|
+
],
|
|
12
|
+
"summary": "cite a reportable example in the message (closes #1613)"
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
},
|
|
2
16
|
{
|
|
3
17
|
"version": "1.20.78",
|
|
4
18
|
"date": "2026-08-02T08:45:25.049Z",
|