@blumintinc/eslint-plugin-blumint 1.18.2 → 1.18.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/lib/index.js
CHANGED
|
@@ -23,7 +23,11 @@ exports.avoidUtilsDirectory = (0, createRule_1.createRule)({
|
|
|
23
23
|
create(context) {
|
|
24
24
|
return {
|
|
25
25
|
Program(node) {
|
|
26
|
-
|
|
26
|
+
// Normalize Windows backslash separators so the forward-slash `utils/`
|
|
27
|
+
// regex below matches on every platform. Without this, `getFilename()`
|
|
28
|
+
// returns `C:\repo\src\utils\foo.ts` on Windows, the regex never
|
|
29
|
+
// matches, and the rule silently reports nothing (issue #1270).
|
|
30
|
+
const filename = context.getFilename().replace(/\\/g, '/');
|
|
27
31
|
const relativePath = path_1.default.isAbsolute(filename)
|
|
28
32
|
? path_1.default.relative(process.cwd(), filename) || filename
|
|
29
33
|
: filename;
|
|
@@ -24,7 +24,13 @@ exports.enforceIdentifiableFirestoreType = (0, createRule_1.createRule)({
|
|
|
24
24
|
},
|
|
25
25
|
defaultOptions: [],
|
|
26
26
|
create(context) {
|
|
27
|
-
|
|
27
|
+
// Normalize Windows backslash separators so the forward-slash pattern below
|
|
28
|
+
// matches on every platform. Without this, `getFilename()` returns
|
|
29
|
+
// `C:\repo\functions\src\types\firestore\...\index.ts` on Windows, the
|
|
30
|
+
// pattern never matches, the guard bails, and the rule silently enforces
|
|
31
|
+
// nothing (issue #1271). Forward slashes are valid separators for the
|
|
32
|
+
// path.basename/path.dirname calls below on all platforms.
|
|
33
|
+
const filename = context.getFilename().replace(/\\/g, '/');
|
|
28
34
|
const firestoreTypesPattern = /functions\/src\/types\/firestore\/.*\/index\.ts$/;
|
|
29
35
|
// Only apply rule to index.ts files in the firestore types directory
|
|
30
36
|
if (!firestoreTypesPattern.test(filename)) {
|
package/package.json
CHANGED
package/release-manifest.json
CHANGED
|
@@ -1,4 +1,26 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"version": "1.18.3",
|
|
4
|
+
"date": "2026-07-06T05:16:06.067Z",
|
|
5
|
+
"rules": [
|
|
6
|
+
{
|
|
7
|
+
"name": "avoid-utils-directory",
|
|
8
|
+
"changeType": "fix",
|
|
9
|
+
"issues": [
|
|
10
|
+
1270
|
|
11
|
+
],
|
|
12
|
+
"summary": "normalize Windows path separators before regex match (closes #1270)"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"name": "enforce-identifiable-firestore-type",
|
|
16
|
+
"changeType": "fix",
|
|
17
|
+
"issues": [
|
|
18
|
+
1271
|
|
19
|
+
],
|
|
20
|
+
"summary": "normalize Windows path separators before regex match (closes #1271)"
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
},
|
|
2
24
|
{
|
|
3
25
|
"version": "1.18.2",
|
|
4
26
|
"date": "2026-07-06T05:00:28.741Z",
|