@blumintinc/eslint-plugin-blumint 1.20.48 → 1.20.49
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/export-if-in-doubt.js +10 -0
- package/package.json +1 -1
- package/release-manifest.json +14 -0
package/lib/index.js
CHANGED
|
@@ -57,6 +57,16 @@ exports.exportIfInDoubt = (0, createRule_1.createRule)({
|
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
59
|
},
|
|
60
|
+
ExportDefaultDeclaration: (node) => {
|
|
61
|
+
// `export default x` reaches the outside world through the default
|
|
62
|
+
// binding, so the declaration it names is already public API. Only
|
|
63
|
+
// the bare identifier form counts: in `export default wrap(x)` the
|
|
64
|
+
// name itself stays unimportable.
|
|
65
|
+
if (node.declaration.type === 'Identifier' &&
|
|
66
|
+
!exportedIdentifiers.includes(node.declaration.name)) {
|
|
67
|
+
exportedIdentifiers.push(node.declaration.name);
|
|
68
|
+
}
|
|
69
|
+
},
|
|
60
70
|
'Program:exit': () => {
|
|
61
71
|
topLevelDeclarations.forEach((node) => {
|
|
62
72
|
if ('id' in node &&
|
package/package.json
CHANGED
package/release-manifest.json
CHANGED
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"version": "1.20.49",
|
|
4
|
+
"date": "2026-07-31T10:04:24.469Z",
|
|
5
|
+
"rules": [
|
|
6
|
+
{
|
|
7
|
+
"name": "export-if-in-doubt",
|
|
8
|
+
"changeType": "fix",
|
|
9
|
+
"issues": [
|
|
10
|
+
1520
|
|
11
|
+
],
|
|
12
|
+
"summary": "recognize `export default <identifier>` as an export (closes #1520)"
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
},
|
|
2
16
|
{
|
|
3
17
|
"version": "1.20.48",
|
|
4
18
|
"date": "2026-07-31T09:14:53.303Z",
|