flatlint 4.0.2 → 4.0.3

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.01.01, v4.0.3
2
+
3
+ fix:
4
+ - 2d02de1 flatlint: remove-useless-comma: false positive
5
+
1
6
  2026.01.01, v4.0.2
2
7
 
3
8
  fix:
@@ -63,10 +63,8 @@ export const match = () => ({
63
63
  if (path.isNextKeyword())
64
64
  return false;
65
65
 
66
- const isNextCall = path.isNextCompareAll([
67
- '__a(',
68
- '__a.__b(',
69
- ]);
66
+ const isNextCall = path.isNextCompareAll(['__a(', '__a.__b(']);
67
+
70
68
  const isNextClose = path.isNextCompare('},}');
71
69
 
72
70
  for (const token of path.getAllPrev()) {
@@ -49,10 +49,7 @@ export const match = () => ({
49
49
  return false;
50
50
 
51
51
  for (const current of path.getAllPrev()) {
52
- if (isPunctuator(current, colon))
53
- return false;
54
-
55
- if (isPunctuator(current, spread))
52
+ if (isPunctuator(current, [openSquireBrace, colon, spread]))
56
53
  return false;
57
54
 
58
55
  if (isKeyword(current, 'if'))
@@ -238,7 +238,10 @@ const createGetAllNext = ({tokens, end}) => function*() {
238
238
  };
239
239
 
240
240
  const createIsNextCompareAll = ({tokens, end}) => (templates) => {
241
- const isNextCompare = createIsNextCompare({tokens, end});
241
+ const isNextCompare = createIsNextCompare({
242
+ tokens,
243
+ end,
244
+ });
242
245
 
243
246
  for (const template of templates) {
244
247
  if (isNextCompare(template))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flatlint",
3
- "version": "4.0.2",
3
+ "version": "4.0.3",
4
4
  "description": "JavaScript tokens-based linter",
5
5
  "main": "lib/flatlint.js",
6
6
  "type": "module",