flatlint 1.53.0 → 1.54.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.01.16, v1.54.0
2
+
3
+ feature:
4
+ - b48b034 flatlint: add-missing-assing: add
5
+
1
6
  2025.01.16, v1.53.0
2
7
 
3
8
  feature:
package/README.md CHANGED
@@ -66,7 +66,16 @@ const m = {
66
66
  }
67
67
  ```
68
68
 
69
- </details>
69
+ </details>
70
+
71
+ <details><summary>add missing assign</summary>
72
+
73
+ ```diff
74
+ -const a 5;
75
+ +const a = 5;
76
+ ```
77
+
78
+ </details>
70
79
 
71
80
  <details><summary>add missing comma</summary>
72
81
 
@@ -0,0 +1,13 @@
1
+ import {isOneOfKeywords} from '#types';
2
+
3
+ export const report = () => 'Add missing assign';
4
+
5
+ export const match = () => ({
6
+ '__x __a __b': ({__x}) => {
7
+ return isOneOfKeywords(__x, ['const', 'let', 'var']);
8
+ },
9
+ });
10
+
11
+ export const replace = () => ({
12
+ '__x __a __b': '__x __a = __b',
13
+ });
package/lib/plugins.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import * as addMissingArrow from './plugins/add-missing-arrow/index.js';
2
+ import * as addMissingAssign from './plugins/add-missing-assign/index.js';
2
3
  import * as addMissingRoundBrace from './plugins/add-missing-round-brace/index.js';
3
4
  import * as addMissingSquireBrace from './plugins/add-missing-square-brace/index.js';
4
5
  import * as addMissingQuote from './plugins/add-missing-quote/index.js';
@@ -14,6 +15,7 @@ import * as wrapAssignmentInParens from './plugins/wrap-assignment-in-parens/ind
14
15
 
15
16
  export const plugins = [
16
17
  ['add-missing-arrow', addMissingArrow],
18
+ ['add-missing-assign', addMissingAssign],
17
19
  ['add-missing-round-brace', addMissingRoundBrace],
18
20
  ['add-missing-squire-brace', addMissingSquireBrace],
19
21
  ['add-missing-semicolon', addMissingSemicolon],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flatlint",
3
- "version": "1.53.0",
3
+ "version": "1.54.0",
4
4
  "description": "JavaScript tokens-based linter",
5
5
  "main": "lib/flatlint.js",
6
6
  "type": "module",