flatlint 1.107.0 → 1.108.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
|
@@ -52,11 +52,12 @@ export const match = () => ({
|
|
|
52
52
|
if (path.isNextPunctuator())
|
|
53
53
|
return false;
|
|
54
54
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
return
|
|
55
|
+
if (path.isNextKeyword())
|
|
56
|
+
return true;
|
|
57
|
+
|
|
58
|
+
return path.isPrevKeyword();
|
|
59
59
|
},
|
|
60
|
+
'__a,': (vars, path) => !path.isNext(),
|
|
60
61
|
});
|
|
61
62
|
|
|
62
63
|
export const replace = () => ({
|
package/lib/runner/path.js
CHANGED
|
@@ -36,6 +36,10 @@ export const createPath = ({tokens, start, end}) => ({
|
|
|
36
36
|
tokens,
|
|
37
37
|
start,
|
|
38
38
|
}),
|
|
39
|
+
isPrevKeyword: createIsPrevKeyword({
|
|
40
|
+
tokens,
|
|
41
|
+
start,
|
|
42
|
+
}),
|
|
39
43
|
isNextKeyword: createIsNextKeyword({
|
|
40
44
|
tokens,
|
|
41
45
|
end,
|
|
@@ -101,6 +105,15 @@ const createIsInsideTemplate = ({tokens, end}) => () => {
|
|
|
101
105
|
return isTemplateMiddle(current);
|
|
102
106
|
};
|
|
103
107
|
|
|
108
|
+
const createIsPrevKeyword = ({tokens, start}) => () => {
|
|
109
|
+
const current = getPrev({
|
|
110
|
+
tokens,
|
|
111
|
+
start,
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
return isKeyword(current);
|
|
115
|
+
};
|
|
116
|
+
|
|
104
117
|
const createIsNextKeyword = ({tokens, end}) => () => {
|
|
105
118
|
const current = getNext({
|
|
106
119
|
tokens,
|