flatlint 4.5.2 → 4.5.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.29, v4.5.3
2
+
3
+ feature:
4
+ - f65e2a5 flatlint: add-missing-square-race: simplify
5
+
1
6
  2026.01.29, v4.5.2
2
7
 
3
8
  feature:
@@ -1,28 +1,14 @@
1
- import {
2
- closeCurlyBrace,
3
- closeSquareBrace,
4
- isSquireBracesBalanced,
5
- } from '#types';
6
-
7
1
  export const report = () => 'Add missing square brace';
8
2
 
9
3
  export const match = () => ({
10
4
  '["__a"': (vars, path) => !path.isNext(),
11
- ')': (vars, path) => {
12
- if (path.isNextPunctuator(closeSquareBrace))
13
- return false;
14
-
15
- if (path.isPrevPunctuator(closeCurlyBrace))
16
- return false;
17
-
18
- const balance = isSquireBracesBalanced(path);
19
-
20
- return balance > 0;
21
- },
22
5
  });
23
6
  export const replace = () => ({
24
7
  '[__array;': '[__array];',
25
8
  '["__a"': '["__a"];',
26
9
  '[;': '[];',
27
- ')': '])',
10
+ '(__a, ["__b")': '(__a, ["__b"])',
11
+ '(__a, ["__b", "__c")': '(__a, ["__b", "__c"])',
12
+ '(__a, [__b)': '(__a, [__b])',
13
+ '(__a, [__b, __c)': '(__a, [__b, __c])',
28
14
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flatlint",
3
- "version": "4.5.2",
3
+ "version": "4.5.3",
4
4
  "description": "JavaScript tokens-based linter",
5
5
  "main": "lib/flatlint.js",
6
6
  "type": "module",