flatlint 1.41.0 → 1.42.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,13 @@
1
+ 2025.01.13, v1.42.1
2
+
3
+ fix:
4
+ - 031ec37 flatlint: add-missing-semicolon: exclude: close round brace
5
+
6
+ 2025.01.13, v1.42.0
7
+
8
+ feature:
9
+ - 1a4e041 flatlint: add-missing-comma: exclude: as, from
10
+
1
11
  2025.01.13, v1.41.0
2
12
 
3
13
  feature:
@@ -7,6 +7,9 @@ export const match = () => ({
7
7
  if (isKeyword(__a))
8
8
  return false;
9
9
 
10
+ if (path.isNextKeyword())
11
+ return false;
12
+
10
13
  return !path.isNextPunctuator();
11
14
  },
12
15
  });
@@ -47,7 +47,7 @@ export const match = () => ({
47
47
  return !path.isPrevIdentifier('function');
48
48
  },
49
49
  '})': (vars, path) => {
50
- const punctuators = [arrow, comma];
50
+ const punctuators = [arrow, comma, closeRoundBrace];
51
51
 
52
52
  if (path.isNextPunctuator(punctuators))
53
53
  return false;
@@ -18,6 +18,7 @@ export const isNewLine = ({type}) => type === 'LineTerminatorSequence';
18
18
  export const notWhiteSpace = (a) => !isWhiteSpace(a);
19
19
  export const isKeyword = (token) => {
20
20
  const keywords = [
21
+ 'as',
21
22
  'await',
22
23
  'var',
23
24
  'let',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flatlint",
3
- "version": "1.41.0",
3
+ "version": "1.42.1",
4
4
  "description": "JavaScript tokens-based linter",
5
5
  "main": "lib/flatlint.js",
6
6
  "type": "module",