@blumintinc/eslint-plugin-blumint 1.20.13 → 1.20.14
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/global-const-style.js +10 -0
- package/package.json +1 -1
- package/release-manifest.json +14 -0
package/lib/index.js
CHANGED
|
@@ -242,6 +242,16 @@ exports.default = (0, createRule_1.createRule)({
|
|
|
242
242
|
return false;
|
|
243
243
|
}
|
|
244
244
|
const target = unwrapAssertions(node);
|
|
245
|
+
// Skip an initializer already wrapped in a non-`const` assertion
|
|
246
|
+
// (`{...} as T`, `<T>{...}`, `{...} as unknown as T`). A `const`
|
|
247
|
+
// assertion may only be applied to a literal, so appending one
|
|
248
|
+
// after an assertion chain is TS1355 — the same failure mode the
|
|
249
|
+
// regex/null/boolean carve-outs below exist for. Such a cast is
|
|
250
|
+
// also the author pinning the type deliberately, exactly like the
|
|
251
|
+
// `id.typeAnnotation` case skipped next.
|
|
252
|
+
if (target !== node) {
|
|
253
|
+
return false;
|
|
254
|
+
}
|
|
245
255
|
// Skip if there's an explicit type annotation
|
|
246
256
|
if (declaration.id.typeAnnotation) {
|
|
247
257
|
return false;
|
package/package.json
CHANGED
package/release-manifest.json
CHANGED
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"version": "1.20.14",
|
|
4
|
+
"date": "2026-07-29T06:45:40.321Z",
|
|
5
|
+
"rules": [
|
|
6
|
+
{
|
|
7
|
+
"name": "global-const-style",
|
|
8
|
+
"changeType": "fix",
|
|
9
|
+
"issues": [
|
|
10
|
+
1375
|
|
11
|
+
],
|
|
12
|
+
"summary": "stop appending as const after a type assertion (closes #1375)"
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
},
|
|
2
16
|
{
|
|
3
17
|
"version": "1.20.13",
|
|
4
18
|
"date": "2026-07-29T06:26:25.973Z",
|