@virmator/lint 14.35.0 → 14.35.1
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.
|
@@ -15,7 +15,12 @@ function getParameterText({ node, sourceCode, }) {
|
|
|
15
15
|
return '()';
|
|
16
16
|
}
|
|
17
17
|
const openParen = sourceCode.getTokenBefore(firstParam);
|
|
18
|
-
|
|
18
|
+
/** The parameter list may end with a trailing comma, which sits between the last param and `)`. */
|
|
19
|
+
const closeParen = sourceCode.getTokenAfter(lastParam, {
|
|
20
|
+
filter(token) {
|
|
21
|
+
return token.value !== ',';
|
|
22
|
+
},
|
|
23
|
+
});
|
|
19
24
|
if (openParen?.value === '(' && closeParen?.value === ')') {
|
|
20
25
|
return sourceCode.text.slice(openParen.range[0], closeParen.range[1]);
|
|
21
26
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@virmator/lint",
|
|
3
|
-
"version": "14.35.
|
|
3
|
+
"version": "14.35.1",
|
|
4
4
|
"description": "Default ESLint linting plugin for virmator.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"virmator",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@augment-vir/assert": "^32.2.4",
|
|
36
36
|
"@augment-vir/common": "^32.2.4",
|
|
37
37
|
"@augment-vir/node": "^32.2.4",
|
|
38
|
-
"@virmator/core": "^14.35.
|
|
38
|
+
"@virmator/core": "^14.35.1",
|
|
39
39
|
"globals": "^17.11.0",
|
|
40
40
|
"jiti": "^2.7.0",
|
|
41
41
|
"mri": "^1.2.0"
|
|
@@ -56,7 +56,12 @@ function getParameterText({
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
const openParen = sourceCode.getTokenBefore(firstParam);
|
|
59
|
-
|
|
59
|
+
/** The parameter list may end with a trailing comma, which sits between the last param and `)`. */
|
|
60
|
+
const closeParen = sourceCode.getTokenAfter(lastParam, {
|
|
61
|
+
filter(token) {
|
|
62
|
+
return token.value !== ',';
|
|
63
|
+
},
|
|
64
|
+
});
|
|
60
65
|
|
|
61
66
|
if (openParen?.value === '(' && closeParen?.value === ')') {
|
|
62
67
|
return sourceCode.text.slice(openParen.range[0], closeParen.range[1]);
|