flatlint 2.8.0 → 2.9.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.03.14, v2.9.0
2
+
3
+ feature:
4
+ - 4313bf9 flatlint: convert-semicolon-to-comma: exclude keywords
5
+
1
6
  2025.03.14, v2.8.0
2
7
 
3
8
  feature:
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  closeSquareBrace,
3
3
  colon,
4
+ isKeyword,
4
5
  isOneOfKeywords,
5
6
  isPunctuator,
6
7
  } from '#types';
@@ -18,7 +19,10 @@ const keywords = [
18
19
  export const report = () => `Use ',' instead of ';'`;
19
20
 
20
21
  export const match = () => ({
21
- '__a;': (vars, path) => {
22
+ '__a;': ({__a}, path) => {
23
+ if (isKeyword(__a))
24
+ return false;
25
+
22
26
  if (path.isNextKeyword())
23
27
  return false;
24
28
 
@@ -74,3 +78,4 @@ export const replace = () => ({
74
78
  ');': '),',
75
79
  '__a];': '__a],',
76
80
  });
81
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flatlint",
3
- "version": "2.8.0",
3
+ "version": "2.9.0",
4
4
  "description": "JavaScript tokens-based linter",
5
5
  "main": "lib/flatlint.js",
6
6
  "type": "module",