flatlint 5.2.0 → 5.2.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
+ 2026.03.14, v5.2.1
2
+
3
+ feature:
4
+ - 961c259 flatlint: convert-colon-to-semicolon: type: exclude
5
+
1
6
  2026.03.11, v5.2.0
2
7
 
3
8
  feature:
@@ -22,9 +22,7 @@ export const match = () => ({
22
22
  'if (__a(__args)': (vars, path) => {
23
23
  return path.isNextKeyword();
24
24
  },
25
- '{__a} = __expr;': (vars, path) => {
26
- return !path.isPrevAnyDeclarationKeyword();
27
- },
25
+ '{__a} = __expr;': (vars, path) => !path.isPrevAnyDeclarationKeyword(),
28
26
  '{__a} = __expr': (vars, path) => {
29
27
  return path.isNextKeyword();
30
28
  },
@@ -109,4 +107,3 @@ export const replace = () => ({
109
107
  '__a(__b(__c);': '__a(__b(__c));',
110
108
  '__a([__b, __c]) =>': '__a(([__b, __c]) =>',
111
109
  });
112
-
@@ -1,4 +1,12 @@
1
1
  export const report = () => `Use ';' instead of ':'`;
2
+ export const match = () => ({
3
+ '):': (vars, path) => {
4
+ if (!path.isNext())
5
+ return true;
6
+
7
+ return path.isNextKeyword();
8
+ },
9
+ });
2
10
  export const replace = () => ({
3
11
  '):': ');',
4
12
  });
package/lib/plugins.js CHANGED
@@ -1,3 +1,4 @@
1
+ import * as removeUselessAssign from '#plugin-remove-useless-assign';
1
2
  import * as addMissingArrow from './plugins/add-missing-arrow/index.js';
2
3
  import * as addMissingAssign from './plugins/add-missing-assign/index.js';
3
4
  import * as addMissingCurlyBrace from './plugins/add-missing-curly-brace/index.js';
@@ -15,7 +16,6 @@ import * as convertCommaToSemicolon from './plugins/convert-comma-to-semicolon/i
15
16
  import * as convertFromToRequire from './plugins/convert-from-to-require/index.js';
16
17
  import * as removeUselessComma from './plugins/remove-useless-comma/index.js';
17
18
  import * as removeUselessArrow from './plugins/remove-useless-arrow/index.js';
18
- import * as removeUselessAssign from '#plugin-remove-useless-assign';
19
19
  import * as removeUselessDot from './plugins/remove-useless-dot/index.js';
20
20
  import * as removeInvalidCharacter from './plugins/remove-invalid-character/index.js';
21
21
  import * as removeUselessRoundBrace from './plugins/remove-useless-round-brace/index.js';
@@ -76,7 +76,7 @@ export const isDeclarationKeyword = (token, name) => {
76
76
  return isIdentifier(token, name);
77
77
  };
78
78
 
79
- export const isAnyDeclarationKeyword = (token, name) => {
79
+ export const isAnyDeclarationKeyword = (token) => {
80
80
  if (!token)
81
81
  return false;
82
82
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flatlint",
3
- "version": "5.2.0",
3
+ "version": "5.2.1",
4
4
  "description": "JavaScript tokens-based linter",
5
5
  "main": "lib/flatlint.js",
6
6
  "type": "module",