flatlint 1.45.0 → 1.45.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,8 @@
1
+ 2025.01.14, v1.45.1
2
+
3
+ feature:
4
+ - df7b4e8 flatlint: add-missing-semicolon: exclude destructuring
5
+
1
6
  2025.01.14, v1.45.0
2
7
 
3
8
  feature:
@@ -55,7 +55,7 @@ export const match = () => ({
55
55
  if (path.isNextPunctuator(punctuators))
56
56
  return false;
57
57
 
58
- return !path.isNextPunctuator(semicolon);
58
+ return !path.isNextPunctuator([semicolon, openCurlyBrace]);
59
59
  },
60
60
  });
61
61
 
@@ -138,6 +138,11 @@ const createIsNextPunctuator = ({tokens, end}) => (punctuators) => {
138
138
  if (!current)
139
139
  return false;
140
140
 
141
+ for (const punctuator of maybeArray(punctuators)) {
142
+ if (isPunctuator(current, punctuator))
143
+ return true;
144
+ }
145
+
141
146
  return isPunctuator(current, punctuators);
142
147
  };
143
148
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flatlint",
3
- "version": "1.45.0",
3
+ "version": "1.45.1",
4
4
  "description": "JavaScript tokens-based linter",
5
5
  "main": "lib/flatlint.js",
6
6
  "type": "module",