flatlint 5.2.1 → 5.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 CHANGED
@@ -1,3 +1,8 @@
1
+ 2026.03.29, v5.2.2
2
+
3
+ feature:
4
+ - 6315ff5 flatlint: convert-comma-to-semicolon: exclude import with
5
+
1
6
  2026.03.14, v5.2.1
2
7
 
3
8
  feature:
@@ -3,6 +3,7 @@ import {
3
3
  closeRoundBrace,
4
4
  closeSquareBrace,
5
5
  colon,
6
+ isBalancedRoundBraces,
6
7
  isOneOfIdentifiers,
7
8
  isPunctuator,
8
9
  openCurlyBrace,
@@ -31,7 +32,19 @@ export const match = () => ({
31
32
 
32
33
  return path.isNextKeyword();
33
34
  },
34
- '__x __a = __expr,': check,
35
+ '__x __a = __expr,': ({__expr}, path) => {
36
+ if (!isBalancedRoundBraces(__expr))
37
+ return false;
38
+
39
+ if (!path.isNext())
40
+ return true;
41
+
42
+ if (path.isNextIdentifier('module'))
43
+ return true;
44
+
45
+ if (path.isNextKeyword() && !path.isNextIdentifier('new'))
46
+ return true;
47
+ },
35
48
  '__x __a,': check,
36
49
  'return __expr,': ({__expr}, path) => {
37
50
  if (isPunctuator(openRoundBrace, __expr) && !isPunctuator(closeRoundBrace, __expr))
@@ -105,11 +118,5 @@ const check = ({__x}, path) => {
105
118
  if (!isOneOfIdentifiers(__x, ['var', 'let', 'const']))
106
119
  return false;
107
120
 
108
- if (!path.isNext())
109
- return true;
110
-
111
- if (path.isNextIdentifier('module'))
112
- return true;
113
-
114
121
  return path.isNextKeyword() && !path.isNextIdentifier('new');
115
122
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flatlint",
3
- "version": "5.2.1",
3
+ "version": "5.2.2",
4
4
  "description": "JavaScript tokens-based linter",
5
5
  "main": "lib/flatlint.js",
6
6
  "type": "module",