flatlint 1.43.0 → 1.44.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
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
openCurlyBrace,
|
|
7
7
|
closeRoundBrace,
|
|
8
8
|
dot,
|
|
9
|
+
question,
|
|
9
10
|
} from '#types';
|
|
10
11
|
|
|
11
12
|
export const report = () => 'Add missing semicolon';
|
|
@@ -16,6 +17,7 @@ export const match = () => ({
|
|
|
16
17
|
comma,
|
|
17
18
|
semicolon,
|
|
18
19
|
openCurlyBrace,
|
|
20
|
+
question,
|
|
19
21
|
];
|
|
20
22
|
|
|
21
23
|
if (path.isNextPunctuator(punctuators))
|
|
@@ -36,6 +38,7 @@ export const match = () => ({
|
|
|
36
38
|
closeRoundBrace,
|
|
37
39
|
openCurlyBrace,
|
|
38
40
|
dot,
|
|
41
|
+
question,
|
|
39
42
|
];
|
|
40
43
|
|
|
41
44
|
if (path.isNextPunctuator(punctuators))
|
package/lib/types/types.js
CHANGED
|
@@ -28,6 +28,7 @@ export const isKeyword = (token) => {
|
|
|
28
28
|
'import',
|
|
29
29
|
'return',
|
|
30
30
|
'function',
|
|
31
|
+
'of',
|
|
31
32
|
];
|
|
32
33
|
|
|
33
34
|
for (const keyword of keywords) {
|
|
@@ -115,6 +116,7 @@ export const closeSquareBrace = Punctuator(']');
|
|
|
115
116
|
export const colon = Punctuator(':');
|
|
116
117
|
export const comma = Punctuator(',');
|
|
117
118
|
export const dot = Punctuator('.');
|
|
119
|
+
export const question = Punctuator('?');
|
|
118
120
|
export const more = Punctuator('>');
|
|
119
121
|
export const assign = Punctuator('=');
|
|
120
122
|
export const openRoundBrace = Punctuator('(');
|