@blumintinc/eslint-plugin-blumint 1.20.16 → 1.20.17
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 +1 -1
- package/lib/rules/no-mock-firebase-admin.js +7 -0
- package/package.json +1 -1
- package/release-manifest.json +14 -0
package/lib/index.js
CHANGED
|
@@ -83,6 +83,13 @@ exports.noMockFirebaseAdmin = (0, createRule_1.createRule)({
|
|
|
83
83
|
node.arguments[0].type === utils_1.AST_NODE_TYPES.TemplateLiteral)) {
|
|
84
84
|
let mockPath = '';
|
|
85
85
|
if (node.arguments[0].type === utils_1.AST_NODE_TYPES.TemplateLiteral) {
|
|
86
|
+
// An interpolated specifier names a module only known at runtime:
|
|
87
|
+
// `../../config/firebaseAdmin${env}` targets firebaseAdminStaging,
|
|
88
|
+
// not firebaseAdmin. Reading the leading quasi alone would attribute
|
|
89
|
+
// it to whichever module the static prefix happens to spell.
|
|
90
|
+
if (node.arguments[0].expressions.length > 0) {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
86
93
|
mockPath = node.arguments[0].quasis[0].value.raw;
|
|
87
94
|
}
|
|
88
95
|
else if (node.arguments[0].type === utils_1.AST_NODE_TYPES.Literal) {
|
package/package.json
CHANGED
package/release-manifest.json
CHANGED
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"version": "1.20.17",
|
|
4
|
+
"date": "2026-07-29T10:47:56.581Z",
|
|
5
|
+
"rules": [
|
|
6
|
+
{
|
|
7
|
+
"name": "no-mock-firebase-admin",
|
|
8
|
+
"changeType": "fix",
|
|
9
|
+
"issues": [
|
|
10
|
+
1386
|
|
11
|
+
],
|
|
12
|
+
"summary": "skip interpolated jest.mock specifiers (closes #1386)"
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
},
|
|
2
16
|
{
|
|
3
17
|
"version": "1.20.16",
|
|
4
18
|
"date": "2026-07-29T10:30:50.111Z",
|