flatlint 4.5.3 → 4.6.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,13 @@
1
+ 2026.01.30, v4.6.1
2
+
3
+ feature:
4
+ - 9694cbe flatlint: add-missing-curly-brace: false positive
5
+
6
+ 2026.01.30, v4.6.0
7
+
8
+ feature:
9
+ - 9d64f15 flatlint: remove-useless-round-brace: false positive: arrow
10
+
1
11
  2026.01.29, v4.5.3
2
12
 
3
13
  feature:
@@ -11,7 +11,11 @@ import {
11
11
  } from '#types';
12
12
  import {equal} from './equal.js';
13
13
 
14
- const NOT_OK_PUNCTUATORS = [semicolon, closeRoundBrace];
14
+ const NOT_OK_PUNCTUATORS = [
15
+ semicolon,
16
+ closeCurlyBrace,
17
+ closeRoundBrace,
18
+ ];
15
19
 
16
20
  export const collectArgs = ({currentTokenIndex, tokens}) => {
17
21
  let index = currentTokenIndex;
@@ -1,4 +1,5 @@
1
1
  import {
2
+ arrow,
2
3
  hasRoundBraces,
3
4
  isBalancedRoundBraces,
4
5
  isPunctuator,
@@ -24,7 +25,12 @@ export const match = () => ({
24
25
 
25
26
  return true;
26
27
  },
27
- '})': (vars, path) => !isRoundBracesBalanced(path),
28
+ '})': (vars, path) => {
29
+ if (path.isNextPunctuator(arrow))
30
+ return false;
31
+
32
+ return !isRoundBracesBalanced(path);
33
+ },
28
34
  ')]': (vars, path) => isRoundBracesBalanced(path) < 0,
29
35
  });
30
36
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flatlint",
3
- "version": "4.5.3",
3
+ "version": "4.6.1",
4
4
  "description": "JavaScript tokens-based linter",
5
5
  "main": "lib/flatlint.js",
6
6
  "type": "module",