flatlint 1.58.1 → 1.60.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,13 @@
1
+ 2025.01.18, v1.60.0
2
+
3
+ feature:
4
+ - 9ffbcaa flatlint: logical
5
+
6
+ 2025.01.18, v1.59.0
7
+
8
+ feature:
9
+ - d956ebe flatlint: add-missing-curly-brace: add
10
+
1
11
  2025.01.18, v1.58.1
2
12
 
3
13
  fix:
package/README.md CHANGED
@@ -49,6 +49,15 @@ module.exports = 2;
49
49
 
50
50
  </details>
51
51
 
52
+ <details><summary>add missing curly brace</summary>
53
+
54
+ ```diff
55
+ -function a({b, c) {}
56
+ -function a({b, c}) {}
57
+ ```
58
+
59
+ </details>
60
+
52
61
  <details><summary>add missing round brace</summary>
53
62
 
54
63
  ```diff
@@ -0,0 +1,5 @@
1
+ export const report = () => 'Add missing curly brace';
2
+
3
+ export const replace = () => ({
4
+ '({__args)': '({__args})',
5
+ });
@@ -8,6 +8,7 @@ import {
8
8
  dot,
9
9
  question,
10
10
  openRoundBrace,
11
+ or,
11
12
  } from '#types';
12
13
 
13
14
  export const report = () => 'Add missing semicolon';
@@ -44,6 +45,7 @@ export const match = () => ({
44
45
  openRoundBrace,
45
46
  dot,
46
47
  question,
48
+ or,
47
49
  ];
48
50
 
49
51
  if (path.isNextPunctuator(punctuators))
package/lib/plugins.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import * as addMissingArrow from './plugins/add-missing-arrow/index.js';
2
2
  import * as addMissingAssign from './plugins/add-missing-assign/index.js';
3
+ import * as addMissingCurlyBrace from './plugins/add-missing-curly-brace/index.js';
3
4
  import * as addMissingRoundBrace from './plugins/add-missing-round-brace/index.js';
4
5
  import * as addMissingSquireBrace from './plugins/add-missing-square-brace/index.js';
5
6
  import * as addMissingQuote from './plugins/add-missing-quote/index.js';
@@ -17,6 +18,7 @@ import * as wrapAssignmentInParens from './plugins/wrap-assignment-in-parens/ind
17
18
  export const plugins = [
18
19
  ['add-missing-arrow', addMissingArrow],
19
20
  ['add-missing-assign', addMissingAssign],
21
+ ['add-missing-curly-brace', addMissingCurlyBrace],
20
22
  ['add-missing-round-brace', addMissingRoundBrace],
21
23
  ['add-missing-squire-brace', addMissingSquireBrace],
22
24
  ['add-missing-semicolon', addMissingSemicolon],
@@ -136,6 +136,7 @@ export const question = Punctuator('?');
136
136
  export const more = Punctuator('>');
137
137
  export const assign = Punctuator('=');
138
138
  export const openRoundBrace = Punctuator('(');
139
+ export const or = Punctuator('||');
139
140
  export const semicolon = Punctuator(';');
140
141
  export const openCurlyBrace = Punctuator('{');
141
142
  export const closeCurlyBrace = Punctuator('}');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flatlint",
3
- "version": "1.58.1",
3
+ "version": "1.60.0",
4
4
  "description": "JavaScript tokens-based linter",
5
5
  "main": "lib/flatlint.js",
6
6
  "type": "module",
@@ -68,9 +68,7 @@
68
68
  "parallel",
69
69
  "serial",
70
70
  "run",
71
- "tool",
72
- "commandline",
73
- "command"
71
+ "commandline"
74
72
  ],
75
73
  "author": "coderaiser <mnemonic.enemy@gmail.com> (http://coderaiser.github.io/)",
76
74
  "bugs": {