flatlint 4.8.2 → 4.9.1

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,14 @@
1
+ 2026.02.11, v4.9.1
2
+
3
+ feature:
4
+ - 8a4c5d9 flatlint: eslint v10.0.0
5
+ - 1e6424f flatlint: convert-semicolon-to-comma: call with arg object: false positive
6
+
7
+ 2026.02.11, v4.9.0
8
+
9
+ feature:
10
+ - 96857d5 flatlint: convert-semicolon-to-comma: chain
11
+
1
12
  2026.02.11, v4.8.2
2
13
 
3
14
  feature:
@@ -67,8 +67,12 @@ export const match = () => ({
67
67
  if (path.isNextCompare('};'))
68
68
  return false;
69
69
 
70
+ if (path.isNextIdentifier())
71
+ return false;
72
+
70
73
  const isNextCall = path.isNextCompareAll(['__a(', '__a.__b(']);
71
74
  const isNextClose = path.isNextCompare('},}');
75
+ const isNextCurlyRound = path.isNextCompare('})');
72
76
 
73
77
  const is = false;
74
78
 
@@ -82,7 +86,7 @@ export const match = () => ({
82
86
  ]))
83
87
  break;
84
88
 
85
- if (isPunctuator(token, colon) && !isNextCall && !isNextClose)
89
+ if (isPunctuator(token, colon) && !isNextCall && !isNextClose && isNextCurlyRound)
86
90
  return true;
87
91
  }
88
92
 
@@ -97,6 +101,9 @@ export const match = () => ({
97
101
  '";': (vars, path) => {
98
102
  return path.isNextPunctuator(quote);
99
103
  },
104
+ ';': (vars, path) => {
105
+ return path.isNextPunctuator(dot);
106
+ },
100
107
  });
101
108
 
102
109
  export const replace = () => ({
@@ -106,4 +113,5 @@ export const replace = () => ({
106
113
  '__a];': '__a],',
107
114
  '=> __a.__b(__c, __d);': '=> __a.__b(__c, __d),',
108
115
  '";': '",',
116
+ ';': '',
109
117
  });
@@ -243,12 +243,16 @@ const createIsNextCompareAll = ({tokens, end}) => (templates) => {
243
243
  end,
244
244
  });
245
245
 
246
+ let is = false;
247
+
246
248
  for (const template of templates) {
247
- if (isNextCompare(template))
248
- return true;
249
+ if (isNextCompare(template)) {
250
+ is = true;
251
+ break;
252
+ }
249
253
  }
250
254
 
251
- return false;
255
+ return is;
252
256
  };
253
257
 
254
258
  const createIsNextCompare = ({tokens, end}) => (template) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flatlint",
3
- "version": "4.8.2",
3
+ "version": "4.9.1",
4
4
  "description": "JavaScript tokens-based linter",
5
5
  "main": "lib/flatlint.js",
6
6
  "type": "module",
@@ -67,7 +67,7 @@
67
67
  "devDependencies": {
68
68
  "@putout/test": "^15.0.0",
69
69
  "c8": "^10.1.2",
70
- "eslint": "^9.7.0",
70
+ "eslint": "^10.0.0",
71
71
  "eslint-plugin-putout": "^30.0.1",
72
72
  "madrun": "^12.1.0",
73
73
  "mock-require": "^3.0.3",