Skip to content

Commit fadad0b

Browse files
committed
Ignore export const case
1 parent 87d558e commit fadad0b

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

.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)