flatlint 1.78.0 → 1.79.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,8 @@
1
+ 2025.01.22, v1.79.0
2
+
3
+ feature:
4
+ - 3af1666 flatlint: convert-comma-to-semicolon: exclude: openCurlyBrace
5
+
1
6
  2025.01.22, v1.78.0
2
7
 
3
8
  feature:
@@ -6,6 +6,7 @@ import {
6
6
  isOneOfKeywords,
7
7
  isOneOfPunctuators,
8
8
  isPunctuator,
9
+ openCurlyBrace,
9
10
  openRoundBrace,
10
11
  openSquireBrace,
11
12
  quote,
@@ -38,9 +39,7 @@ export const match = () => ({
38
39
 
39
40
  return !path.isNextPunctuator(quote);
40
41
  },
41
- '__a.__b = __expr,': ({__expr}, path) => {
42
- return !path.isNextPunctuator(quote);
43
- },
42
+ '__a.__b = __expr,': ({}, path) => !path.isNextPunctuator([quote, openCurlyBrace]),
44
43
  });
45
44
 
46
45
  export const replace = () => ({
@@ -52,7 +51,7 @@ export const replace = () => ({
52
51
  '__a.__b = __expr,': '__a.__b = __expr;',
53
52
  });
54
53
 
55
- const check = ({__x, __a}, path) => {
54
+ const check = ({__x}, path) => {
56
55
  if (!isOneOfKeywords(__x, ['var', 'let', 'const']))
57
56
  return false;
58
57
 
@@ -64,4 +63,3 @@ const check = ({__x, __a}, path) => {
64
63
 
65
64
  return path.isNextKeyword() && !path.isNextIdentifier('new');
66
65
  };
67
-
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flatlint",
3
- "version": "1.78.0",
3
+ "version": "1.79.0",
4
4
  "description": "JavaScript tokens-based linter",
5
5
  "main": "lib/flatlint.js",
6
6
  "type": "module",