flatlint 1.109.0 → 1.111.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.02.13, v1.111.0
2
+
3
+ feature:
4
+ - 938ce57 flatlint: add-missing-round-brace: if condition
5
+
6
+ 2025.02.11, v1.110.0
7
+
8
+ fix:
9
+ - a2d6d4b flatlint: convert-semicolon-to-comma: before if
10
+
1
11
  2025.02.11, v1.109.0
2
12
 
3
13
  fix:
@@ -47,6 +47,9 @@ export const match = () => ({
47
47
 
48
48
  return balance;
49
49
  },
50
+ '"__a"': (vars, path) => {
51
+ return path.isNextKeyword();
52
+ },
50
53
  });
51
54
 
52
55
  export const replace = () => ({
@@ -55,6 +58,7 @@ export const replace = () => ({
55
58
  'if (__a.__b(__args) {': 'if (__a.__b(__args)) {',
56
59
  'if (__a(__args) {': 'if (__a(__args)) {',
57
60
  'if (__a(__args)': 'if (__a(__args))',
61
+ '"__a"': '"__a")',
58
62
  '{__a} = __expr;': '({__a} = __expr);',
59
63
  '{__a} = __expr': '({__a} = __expr)',
60
64
  '__a;': '__a);',
@@ -8,6 +8,9 @@ export const report = () => `Use ',' instead of ';'`;
8
8
 
9
9
  export const match = () => ({
10
10
  '__a;': (vars, path) => {
11
+ if (path.isNextKeyword())
12
+ return false;
13
+
11
14
  for (const token of path.getAllPrev()) {
12
15
  if (isOneOfKeywords(token, [
13
16
  'readonly',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flatlint",
3
- "version": "1.109.0",
3
+ "version": "1.111.0",
4
4
  "description": "JavaScript tokens-based linter",
5
5
  "main": "lib/flatlint.js",
6
6
  "type": "module",