flatlint 4.0.1 → 4.0.2
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
|
@@ -63,7 +63,10 @@ export const match = () => ({
|
|
|
63
63
|
if (path.isNextKeyword())
|
|
64
64
|
return false;
|
|
65
65
|
|
|
66
|
-
const isNextCall = path.
|
|
66
|
+
const isNextCall = path.isNextCompareAll([
|
|
67
|
+
'__a(',
|
|
68
|
+
'__a.__b(',
|
|
69
|
+
]);
|
|
67
70
|
const isNextClose = path.isNextCompare('},}');
|
|
68
71
|
|
|
69
72
|
for (const token of path.getAllPrev()) {
|
package/lib/runner/path.js
CHANGED
|
@@ -51,6 +51,10 @@ export const createPath = ({tokens, start, end}) => ({
|
|
|
51
51
|
tokens,
|
|
52
52
|
end,
|
|
53
53
|
}),
|
|
54
|
+
isNextCompareAll: createIsNextCompareAll({
|
|
55
|
+
tokens,
|
|
56
|
+
end,
|
|
57
|
+
}),
|
|
54
58
|
isNextDeclarationKeyword: createIsNextDeclarationKeyword({
|
|
55
59
|
tokens,
|
|
56
60
|
end,
|
|
@@ -233,6 +237,17 @@ const createGetAllNext = ({tokens, end}) => function*() {
|
|
|
233
237
|
}
|
|
234
238
|
};
|
|
235
239
|
|
|
240
|
+
const createIsNextCompareAll = ({tokens, end}) => (templates) => {
|
|
241
|
+
const isNextCompare = createIsNextCompare({tokens, end});
|
|
242
|
+
|
|
243
|
+
for (const template of templates) {
|
|
244
|
+
if (isNextCompare(template))
|
|
245
|
+
return true;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
return false;
|
|
249
|
+
};
|
|
250
|
+
|
|
236
251
|
const createIsNextCompare = ({tokens, end}) => (template) => {
|
|
237
252
|
const getAllNext = createGetAllNext({
|
|
238
253
|
tokens,
|