flatlint 2.9.0 → 2.11.0

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
+ 2025.03.15, v2.11.0
2
+
3
+ feature:
4
+ - 879cc06 flatlint: add-missing-comma: object
5
+
6
+ 2025.03.14, v2.10.0
7
+
8
+ feature:
9
+ - 1ee9694 flatlint: add-missing-round-brace: if-member
10
+
1
11
  2025.03.14, v2.9.0
2
12
 
3
13
  feature:
@@ -9,6 +9,9 @@ export const report = () => 'Add missing comma';
9
9
 
10
10
  export const match = () => ({
11
11
  '"__a"': (vars, path) => {
12
+ if (path.isNextPunctuator(quote))
13
+ return true;
14
+
12
15
  if (path.isNextKeyword())
13
16
  return false;
14
17
 
@@ -85,6 +85,7 @@ export const match = () => ({
85
85
 
86
86
  return path.isNextCompare('__a(');
87
87
  },
88
+ 'if (!__a.__b(__args)': (vars, path) => !path.isNextPunctuator(closeRoundBrace),
88
89
  });
89
90
 
90
91
  export const replace = () => ({
@@ -93,6 +94,7 @@ export const replace = () => ({
93
94
  'if (__a.__b(__args) {': 'if (__a.__b(__args)) {',
94
95
  'if (__a(__args) {': 'if (__a(__args)) {',
95
96
  'if (__a(__args)': 'if (__a(__args))',
97
+ 'if (!__a.__b(__args)': 'if (!__a.__b(__args))',
96
98
  '"__a"': '"__a")',
97
99
  '{__a} = __expr;': '({__a} = __expr);',
98
100
  '{__a} = __expr': '({__a} = __expr)',
@@ -78,4 +78,3 @@ export const replace = () => ({
78
78
  ');': '),',
79
79
  '__a];': '__a],',
80
80
  });
81
-
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flatlint",
3
- "version": "2.9.0",
3
+ "version": "2.11.0",
4
4
  "description": "JavaScript tokens-based linter",
5
5
  "main": "lib/flatlint.js",
6
6
  "type": "module",