Skip to content

Commit 2574138

Browse files
authored
Merge pull request #88 from ai/export-const
Ignore export const case
2 parents 87d558e + fadad0b commit 2574138

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.changes/fix-export-const.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"eslint-plugin-prefer-let": patch
3+
---
4+
5+
Ignore `export const` cases

packages/eslint-plugin-prefer-let/lib/rules/prefer-let.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ module.exports = {
132132
}
133133
});
134134
}
135+
} else if (node.parent && node.parent.type === 'ExportNamedDeclaration') {
136+
// ignore `export const` cases
135137
} else {
136138
let constToken = sourceCode.getFirstToken(node);
137139
context.report({

0 commit comments

Comments
 (0)