flatlint 1.30.0 → 1.30.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.09, v1.30.1
2
+
3
+ feature:
4
+ - 45b14e5 flatlint: remove-useless-comma: last
5
+
1
6
  2025.01.09, v1.30.0
2
7
 
3
8
  feature:
@@ -24,6 +24,9 @@ export const match = () => ({
24
24
  return false;
25
25
  }
26
26
 
27
+ if (!path.isNext())
28
+ return true;
29
+
27
30
  if (path.isNextPunctuator(closeRoundBrace))
28
31
  return true;
29
32
 
@@ -25,6 +25,10 @@ export const createPath = ({tokens, start, end}) => ({
25
25
  tokens,
26
26
  end,
27
27
  }),
28
+ isNext: createIsNext({
29
+ tokens,
30
+ end,
31
+ }),
28
32
  isPrevIdentifier: createIsPrevIdentifier({
29
33
  tokens,
30
34
  start,
@@ -54,6 +58,13 @@ const next = ({tokens, end}) => {
54
58
  }
55
59
  };
56
60
 
61
+ const createIsNext = ({tokens, end}) => (value) => {
62
+ return next({
63
+ tokens,
64
+ end,
65
+ });
66
+ };
67
+
57
68
  const createIsNextIdentifier = ({tokens, end}) => (value) => {
58
69
  const current = next({
59
70
  tokens,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flatlint",
3
- "version": "1.30.0",
3
+ "version": "1.30.1",
4
4
  "description": "JavaScript tokens-based linter",
5
5
  "main": "lib/flatlint.js",
6
6
  "type": "module",