flatlint 2.7.0 → 2.8.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.8.0
2
+
3
+ feature:
4
+ - 1142f23 add-missing-arrow: improve
5
+
1
6
  2025.03.14, v2.7.0
2
7
 
3
8
  feature:
@@ -46,6 +46,8 @@ export const compare = (source, template, {index = 0} = {}) => {
46
46
  nextTemplateToken: templateTokens[templateIndex + 1],
47
47
  });
48
48
 
49
+ delta = 0;
50
+
49
51
  if (!ok) {
50
52
  ++skip;
51
53
  } else if (templateIndex === templateTokensLength - 1) {
@@ -58,4 +58,3 @@ export function parseStringLiteral({i, token, tokens}) {
58
58
 
59
59
  return i;
60
60
  }
61
-
@@ -1,7 +1,6 @@
1
1
  import {
2
2
  colon,
3
3
  isIdentifier,
4
- isKeyword,
5
4
  isOneOfKeywords,
6
5
  isPunctuator,
7
6
  openCurlyBrace,
@@ -19,11 +18,6 @@ export const match = () => ({
19
18
  if (isIdentifier(current))
20
19
  return false;
21
20
 
22
- for (const token of path.getAllPrev()) {
23
- if (isKeyword(token, 'class'))
24
- return false;
25
- }
26
-
27
21
  if (isPunctuator(current, colon))
28
22
  return true;
29
23
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flatlint",
3
- "version": "2.7.0",
3
+ "version": "2.8.0",
4
4
  "description": "JavaScript tokens-based linter",
5
5
  "main": "lib/flatlint.js",
6
6
  "type": "module",