flatlint 1.112.0 → 1.114.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.15, v1.114.0
2
+
3
+ feature:
4
+ - 6a002f3 flatlint: add-missing-arrow: method (#1)
5
+
6
+ 2025.02.13, v1.113.0
7
+
8
+ feature:
9
+ - 8d7e30d flatlint: add-missing-arrow: exclude private identifier
10
+
1
11
  2025.02.13, v1.112.0
2
12
 
3
13
  feature:
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  colon,
3
3
  isIdentifier,
4
+ isKeyword,
4
5
  isOneOfKeywords,
5
6
  isPunctuator,
6
7
  openCurlyBrace,
@@ -18,6 +19,11 @@ export const match = () => ({
18
19
  if (isIdentifier(current))
19
20
  return false;
20
21
 
22
+ for (const token of path.getAllPrev()) {
23
+ if (isKeyword(token, 'class'))
24
+ return false;
25
+ }
26
+
21
27
  if (isPunctuator(current, colon))
22
28
  return true;
23
29
 
@@ -1,11 +1,9 @@
1
1
  import {
2
2
  closeCurlyBrace,
3
- closeSquareBrace,
4
3
  colon,
5
4
  isIdentifier,
6
5
  isPunctuator,
7
6
  openSquireBrace,
8
- semicolon,
9
7
  spread,
10
8
  } from '#types';
11
9
 
@@ -13,7 +13,7 @@ export const isIdentifier = (token, newToken) => {
13
13
  return false;
14
14
 
15
15
  const {type} = token;
16
- const is = type === 'IdentifierName';
16
+ const is = type === 'IdentifierName' || type === 'PrivateIdentifier';
17
17
 
18
18
  if (!is)
19
19
  return false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flatlint",
3
- "version": "1.112.0",
3
+ "version": "1.114.0",
4
4
  "description": "JavaScript tokens-based linter",
5
5
  "main": "lib/flatlint.js",
6
6
  "type": "module",