flatlint 4.0.1 → 4.0.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.01.01, v4.0.2
2
+
3
+ fix:
4
+ - b3fe87a flatlint: convert-semicolon-to-comma: false positive
5
+
1
6
  2026.01.01, v4.0.1
2
7
 
3
8
  fix:
@@ -63,7 +63,10 @@ export const match = () => ({
63
63
  if (path.isNextKeyword())
64
64
  return false;
65
65
 
66
- const isNextCall = path.isNextCompare('__a.__b(');
66
+ const isNextCall = path.isNextCompareAll([
67
+ '__a(',
68
+ '__a.__b(',
69
+ ]);
67
70
  const isNextClose = path.isNextCompare('},}');
68
71
 
69
72
  for (const token of path.getAllPrev()) {
@@ -51,6 +51,10 @@ export const createPath = ({tokens, start, end}) => ({
51
51
  tokens,
52
52
  end,
53
53
  }),
54
+ isNextCompareAll: createIsNextCompareAll({
55
+ tokens,
56
+ end,
57
+ }),
54
58
  isNextDeclarationKeyword: createIsNextDeclarationKeyword({
55
59
  tokens,
56
60
  end,
@@ -233,6 +237,17 @@ const createGetAllNext = ({tokens, end}) => function*() {
233
237
  }
234
238
  };
235
239
 
240
+ const createIsNextCompareAll = ({tokens, end}) => (templates) => {
241
+ const isNextCompare = createIsNextCompare({tokens, end});
242
+
243
+ for (const template of templates) {
244
+ if (isNextCompare(template))
245
+ return true;
246
+ }
247
+
248
+ return false;
249
+ };
250
+
236
251
  const createIsNextCompare = ({tokens, end}) => (template) => {
237
252
  const getAllNext = createGetAllNext({
238
253
  tokens,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flatlint",
3
- "version": "4.0.1",
3
+ "version": "4.0.2",
4
4
  "description": "JavaScript tokens-based linter",
5
5
  "main": "lib/flatlint.js",
6
6
  "type": "module",