eslint-plugin-prefer-let 4.2.1 → 4.2.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # eslint-plugin-prefer-let
2
2
 
3
+ ## \[4.2.2]
4
+
5
+ - [`96078a2`](https://github.com/thefrontside/javascript/commit/96078a2e1171c94150a366b30c419d38cfd64eb3) Fix ignoring `export const` cases
6
+
3
7
  ## \[4.2.1]
4
8
 
5
9
  - [`fadad0b`](https://github.com/thefrontside/javascript/commit/fadad0b5cf786b3186d74a35d9933b5e8bea0e34) Ignore `export const` cases
@@ -122,7 +122,7 @@ module.exports = {
122
122
  });
123
123
  } else if (node.kind === 'const') {
124
124
  if (isTopLevelScope(node)) {
125
- if (forceUpperCaseConst && !allDeclaratorsUpperCase(node)) {
125
+ if (forceUpperCaseConst && !allDeclaratorsUpperCase(node) && !(node.parent && node.parent.type === 'ExportNamedDeclaration')) {
126
126
  let constToken = sourceCode.getFirstToken(node);
127
127
  context.report({
128
128
  message: '`const` declaration for non-constant names at top-level scope. Use `let` or rename to UPPER_CASE',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-prefer-let",
3
- "version": "4.2.1",
3
+ "version": "4.2.2",
4
4
  "description": "Rule to prefer using `let` to bind names to values",
5
5
  "repository": {
6
6
  "type": "git",