flatlint 5.7.0 → 5.7.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,8 @@
1
+ 2026.06.04, v5.7.1
2
+
3
+ feature:
4
+ - e7fe2a5 convert-comma-to-semicolon: no next
5
+
1
6
  2026.06.03, v5.7.0
2
7
 
3
8
  feature:
@@ -18,8 +18,5 @@ export const collect = ({currentTokenIndex, tokens}) => {
18
18
  break;
19
19
  }
20
20
 
21
- return [
22
- OK,
23
- index,
24
- ];
21
+ return [OK, index];
25
22
  };
@@ -100,4 +100,3 @@ function getNamesWithIndexes(waysTo) {
100
100
 
101
101
  return namesWithIndexes;
102
102
  }
103
-
@@ -105,8 +105,8 @@ export const match = () => ({
105
105
 
106
106
  export const replace = () => ({
107
107
  '__x __a,': '__x __a;',
108
- '__x __a = __expr,': '__x __a = __expr;',
109
108
  '__a(__args),': '__a(__args);',
109
+ '__x __a = __expr,': '__x __a = __expr;',
110
110
  'return __expr,': 'return __expr;',
111
111
  '__a.__b = __expr,': '__a.__b = __expr;',
112
112
  '"__a",': '"__a";',
@@ -70,6 +70,9 @@ export const isKeyword = (token, names) => {
70
70
  };
71
71
 
72
72
  export const isDeclarationKeyword = (token, name) => {
73
+ if (!token)
74
+ return false;
75
+
73
76
  const {value} = token;
74
77
 
75
78
  if (!keyword.isDeclarationKeyword(value))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flatlint",
3
- "version": "5.7.0",
3
+ "version": "5.7.1",
4
4
  "description": "JavaScript tokens-based linter",
5
5
  "main": "lib/flatlint.js",
6
6
  "type": "module",