flatlint 3.9.0 → 3.10.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.12.30, v3.10.1
2
+
3
+ feature:
4
+ - 7a2aa2a flalint: add-mising-assing: false positive
5
+
6
+ 2025.12.30, v3.10.0
7
+
8
+ feature:
9
+ - 85beee6 flatlint: convert-colon-to-as: add
10
+
1
11
  2025.12.29, v3.9.0
2
12
 
3
13
  feature:
package/README.md CHANGED
@@ -96,6 +96,15 @@ export const rules = [
96
96
 
97
97
  </details>
98
98
 
99
+ <details><summary>convert colon to <code>as</code></summary>
100
+
101
+ ```diff
102
+ -import {simpleImport: _simpleImport} from './simple-import.js';
103
+ +import {simpleImport as _simpleImport} from './simple-import.js';
104
+ ```
105
+
106
+ </details>
107
+
99
108
  <details><summary>convert <code>from</code> to <code>require</code></summary>
100
109
 
101
110
  ```diff
@@ -3,6 +3,7 @@ import {
3
3
  isDeclarationKeyword,
4
4
  isKeyword,
5
5
  isPunctuator,
6
+ question,
6
7
  semicolon,
7
8
  } from '#types';
8
9
 
@@ -24,7 +25,10 @@ export const match = () => ({
24
25
  if (path.isNextPunctuator() && !path.isNextPunctuator(semicolon))
25
26
  return false;
26
27
 
27
- return !isPunctuator(assign, __expr);
28
+ if (isPunctuator(assign, __expr))
29
+ return false;
30
+
31
+ return !isPunctuator(question, __expr);
28
32
  },
29
33
  });
30
34
 
@@ -0,0 +1,4 @@
1
+ export const report = () => `Use 'as' instead of ':'`;
2
+ export const replace = () => ({
3
+ 'import {__a: __b} from "__c"': 'import {__a as __b} from "__c"',
4
+ });
package/lib/plugins.js CHANGED
@@ -19,6 +19,7 @@ import * as removeUselessRoundBrace from './plugins/remove-useless-round-brace/i
19
19
  import * as convertSemicolonToComma from './plugins/convert-semicolon-to-comma/index.js';
20
20
  import * as convertColonToComma from './plugins/convert-colon-to-comma/index.js';
21
21
  import * as convertColonToSemicolon from './plugins/convert-colon-to-semicolon/index.js';
22
+ import * as convertColonToAs from './plugins/convert-colon-to-as/index.js';
22
23
  import * as wrapAssignmentInParens from './plugins/wrap-assignment-in-parens/index.js';
23
24
 
24
25
  export const plugins = [
@@ -36,6 +37,7 @@ export const plugins = [
36
37
  ['convert-assert-to-with', convertAssertToWith],
37
38
  ['convert-comma-to-semicolon', convertCommaToSemicolon],
38
39
  ['convert-colon-to-comma', convertColonToComma],
40
+ ['convert-colon-to-as', convertColonToAs],
39
41
  ['convert-colon-to-semicolon', convertColonToSemicolon],
40
42
  ['convert-semicolon-to-comma', convertSemicolonToComma],
41
43
  ['convert-from-to-require', convertFromToRequire],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flatlint",
3
- "version": "3.9.0",
3
+ "version": "3.10.1",
4
4
  "description": "JavaScript tokens-based linter",
5
5
  "main": "lib/flatlint.js",
6
6
  "type": "module",