flatlint 4.7.1 → 4.8.0

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,13 @@
1
+ 2026.02.04, v4.8.0
2
+
3
+ feature:
4
+ - c705791 flatlint: add-missing-round-brace: malformed
5
+
6
+ 2026.02.03, v4.7.2
7
+
8
+ feature:
9
+ - 001da6e convert-semicolon-to-coma: false positive
10
+
1
11
  2026.02.03, v4.7.1
2
12
 
3
13
  feature:
@@ -101,4 +101,5 @@ export const replace = () => ({
101
101
  '__a;': '__a);',
102
102
  '}': '})',
103
103
  '__a(__b(__c);': '__a(__b(__c));',
104
+ '__a([__b, __c]) =>': '__a(([__b, __c]) =>',
104
105
  });
@@ -64,14 +64,15 @@ export const match = () => ({
64
64
  if (path.isNextKeyword())
65
65
  return false;
66
66
 
67
- const isNextCall = path.isNextCompareAll(['__a(', '__a.__b(']);
67
+ if (path.isNextCompare('};'))
68
+ return false;
68
69
 
70
+ const isNextCall = path.isNextCompareAll(['__a(', '__a.__b(']);
69
71
  const isNextClose = path.isNextCompare('},}');
70
72
 
73
+ const is = false;
74
+
71
75
  for (const token of path.getAllPrev()) {
72
- if (isOneOfIdentifiers(token, keywords))
73
- return false;
74
-
75
76
  if (isPunctuator(token, [
76
77
  assign,
77
78
  bitwiseAnd,
@@ -79,13 +80,13 @@ export const match = () => ({
79
80
  semicolon,
80
81
  closeSquareBrace,
81
82
  ]))
82
- return false;
83
+ break;
83
84
 
84
85
  if (isPunctuator(token, colon) && !isNextCall && !isNextClose)
85
86
  return true;
86
87
  }
87
88
 
88
- return false;
89
+ return is;
89
90
  },
90
91
  '__a];': (vars, path) => {
91
92
  return path.isNextPunctuator(closeSquareBrace);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flatlint",
3
- "version": "4.7.1",
3
+ "version": "4.8.0",
4
4
  "description": "JavaScript tokens-based linter",
5
5
  "main": "lib/flatlint.js",
6
6
  "type": "module",