flatlint 1.103.0 → 1.104.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,11 @@
|
|
|
1
|
+
2025.02.05, v1.104.0
|
|
2
|
+
|
|
3
|
+
feature:
|
|
4
|
+
- 9dfac2e flatlint: add-missing-comma: declare
|
|
5
|
+
- 2819e82 flatlint: convert-semicolon-to-comma: exclude interface
|
|
6
|
+
- 97a4a43 flatlint: add-missing-comma: exclude interface
|
|
7
|
+
- 775ead0 flatlint: add-missing-round-brace: exclude interface
|
|
8
|
+
|
|
1
9
|
2025.02.05, v1.103.0
|
|
2
10
|
|
|
3
11
|
feature:
|
|
@@ -29,24 +29,23 @@ export const match = () => ({
|
|
|
29
29
|
return path.isNextKeyword();
|
|
30
30
|
},
|
|
31
31
|
'__a;': (vars, path) => {
|
|
32
|
-
let result = false;
|
|
33
|
-
|
|
34
32
|
if (path.isPrevPunctuator(colon))
|
|
35
33
|
return false;
|
|
36
34
|
|
|
35
|
+
let balance = 1;
|
|
36
|
+
|
|
37
37
|
for (const current of path.getAllPrev()) {
|
|
38
|
-
if (isPunctuator(current, openRoundBrace))
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
if (isPunctuator(current, openRoundBrace))
|
|
39
|
+
++balance;
|
|
40
|
+
|
|
41
|
+
if (isPunctuator(current, openRoundBrace))
|
|
42
|
+
--balance;
|
|
42
43
|
|
|
43
|
-
if (isKeyword(current))
|
|
44
|
-
|
|
45
|
-
break;
|
|
46
|
-
}
|
|
44
|
+
if (isKeyword(current))
|
|
45
|
+
return false;
|
|
47
46
|
}
|
|
48
47
|
|
|
49
|
-
return
|
|
48
|
+
return balance;
|
|
50
49
|
},
|
|
51
50
|
});
|
|
52
51
|
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
closeSquareBrace,
|
|
3
|
-
isIdentifier,
|
|
4
3
|
isOneOfKeywords,
|
|
5
|
-
isOneOfPunctuators,
|
|
6
4
|
isPunctuator,
|
|
7
|
-
more,
|
|
8
5
|
} from '#types';
|
|
9
6
|
|
|
10
7
|
export const report = () => `Use ',' instead of ';'`;
|
|
@@ -12,7 +9,12 @@ export const report = () => `Use ',' instead of ';'`;
|
|
|
12
9
|
export const match = () => ({
|
|
13
10
|
'__a;': (vars, path) => {
|
|
14
11
|
for (const token of path.getAllPrev()) {
|
|
15
|
-
if (isOneOfKeywords(token, [
|
|
12
|
+
if (isOneOfKeywords(token, [
|
|
13
|
+
'readonly',
|
|
14
|
+
'static',
|
|
15
|
+
'implements',
|
|
16
|
+
'interface',
|
|
17
|
+
]))
|
|
16
18
|
return false;
|
|
17
19
|
}
|
|
18
20
|
|
|
@@ -21,7 +23,7 @@ export const match = () => ({
|
|
|
21
23
|
return true;
|
|
22
24
|
}
|
|
23
25
|
},
|
|
24
|
-
'__a: __expr;': (
|
|
26
|
+
'__a: __expr;': (vars, path) => {
|
|
25
27
|
for (const token of path.getAllPrev()) {
|
|
26
28
|
if (isOneOfKeywords(token, ['readonly', 'static', 'implements']))
|
|
27
29
|
return false;
|