flatlint 2.0.7 → 2.0.9
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
|
@@ -48,7 +48,9 @@ export function parseStringLiteral({i, token, tokens}) {
|
|
|
48
48
|
++count;
|
|
49
49
|
|
|
50
50
|
const literal = StringLiteral(value.slice(1));
|
|
51
|
-
|
|
51
|
+
|
|
52
|
+
if (literal.value)
|
|
53
|
+
newTokens.splice(1, 0, literal);
|
|
52
54
|
|
|
53
55
|
tokens.splice(i, 1, ...newTokens);
|
|
54
56
|
i += count;
|
|
@@ -69,18 +69,13 @@ export const match = () => ({
|
|
|
69
69
|
'__a,': (vars, path) => !path.isNext(),
|
|
70
70
|
'],': (vars, path) => {
|
|
71
71
|
for (const token of path.getAllPrev()) {
|
|
72
|
-
if (isPunctuator(token, colon))
|
|
72
|
+
if (isPunctuator(token, [colon, openRoundBrace]))
|
|
73
73
|
return false;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
let result = false;
|
|
77
77
|
|
|
78
78
|
for (const token of path.getAllNext()) {
|
|
79
|
-
if (isPunctuator(token, closeSquareBrace)) {
|
|
80
|
-
result = false;
|
|
81
|
-
break;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
79
|
if (isPunctuator(token, semicolon)) {
|
|
85
80
|
result = true;
|
|
86
81
|
break;
|