flatlint 5.6.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,15 @@
1
+ 2026.06.04, v5.7.1
2
+
3
+ feature:
4
+ - e7fe2a5 convert-comma-to-semicolon: no next
5
+
6
+ 2026.06.03, v5.7.0
7
+
8
+ feature:
9
+ - 3736e1b flatlint: supertape v13.2.0
10
+ - bec8705 flatlint: montag v2.0.1
11
+ - 3693318 flatlint: add-missing-round-brace: nested array
12
+
1
13
  2026.04.19, v5.6.0
2
14
 
3
15
  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
-
@@ -19,6 +19,7 @@ export const match = () => ({
19
19
 
20
20
  return !path.isNextPunctuator(closeRoundBrace);
21
21
  },
22
+ '__a(__b, __array]': (vars, path) => !path.isNextPunctuator([closeRoundBrace, comma]),
22
23
  'if (__a(__args)': (vars, path) => {
23
24
  return path.isNextKeyword();
24
25
  },
@@ -94,6 +95,7 @@ export const match = () => ({
94
95
 
95
96
  export const replace = () => ({
96
97
  'if __a > __b': 'if (__a > __b)',
98
+ '__a(__b, __array]': '__a(__b, __array])',
97
99
  '__a(__args': '__a(__args)',
98
100
  'if (__a.__b(__args) {': 'if (__a.__b(__args)) {',
99
101
  'if (__a(__args) {': 'if (__a(__args)) {',
@@ -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";',
@@ -1,4 +1,4 @@
1
- import montag from 'montag';
1
+ import {montag} from 'montag';
2
2
 
3
3
  export const report = () => 'Remove useless curly braces from ImportDeclaration';
4
4
 
@@ -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.6.0",
3
+ "version": "5.7.1",
4
4
  "description": "JavaScript tokens-based linter",
5
5
  "main": "lib/flatlint.js",
6
6
  "type": "module",
@@ -63,7 +63,7 @@
63
63
  "@putout/engine-loader": "^17.0.4",
64
64
  "@putout/operator-keyword": "^5.0.0",
65
65
  "js-tokens": "^10.0.0",
66
- "montag": "^1.2.1",
66
+ "montag": "^2.0.1",
67
67
  "obug": "^2.1.1"
68
68
  },
69
69
  "devDependencies": {
@@ -75,7 +75,7 @@
75
75
  "nodemon": "^3.0.1",
76
76
  "putout": "^42.0.3",
77
77
  "superc8": "^12.3.1",
78
- "supertape": "^12.0.0"
78
+ "supertape": "^13.2.0"
79
79
  },
80
80
  "engines": {
81
81
  "node": ">=22"