eslint-plugin-yml 3.6.0 → 3.6.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.
- package/lib/index.mjs +9 -3
- package/package.json +4 -4
package/lib/index.mjs
CHANGED
|
@@ -4426,7 +4426,10 @@ var sort_keys_default = createRule("sort-keys", {
|
|
|
4426
4426
|
yield fixer.removeRange(removeRange);
|
|
4427
4427
|
yield fixer.insertTextAfterRange(moveTargetRange, `${isAtFileStart ? "\n" : ""}${insertCode}`);
|
|
4428
4428
|
} else {
|
|
4429
|
-
const nextToken = sourceCode.getTokenAfter(data.node, {
|
|
4429
|
+
const nextToken = sourceCode.getTokenAfter(data.node, {
|
|
4430
|
+
includeComments: true,
|
|
4431
|
+
filter: (t) => !isCommentToken(t) || data.node.loc.end.line < t.loc.start.line
|
|
4432
|
+
});
|
|
4430
4433
|
const removeRange = [data.node.range[0], nextToken.range[0]];
|
|
4431
4434
|
yield fixer.removeRange(removeRange);
|
|
4432
4435
|
const insertCode = `\n${sourceCode.text.slice(sourceCode.getIndexFromLoc({
|
|
@@ -4495,7 +4498,10 @@ var sort_keys_default = createRule("sort-keys", {
|
|
|
4495
4498
|
};
|
|
4496
4499
|
const beforeToken = sourceCode.getTokenBefore(node);
|
|
4497
4500
|
if (beforeToken) {
|
|
4498
|
-
const next = sourceCode.getTokenAfter(beforeToken, {
|
|
4501
|
+
const next = sourceCode.getTokenAfter(beforeToken, {
|
|
4502
|
+
includeComments: true,
|
|
4503
|
+
filter: (t) => !isCommentToken(t) || beforeToken.loc.end.line < t.loc.start.line
|
|
4504
|
+
});
|
|
4499
4505
|
if (beforeToken.loc.end.line < next.loc.start.line || beforeToken.loc.end.line < node.loc.start.line) {
|
|
4500
4506
|
const start = {
|
|
4501
4507
|
line: beforeToken.loc.end.line < next.loc.start.line ? next.loc.start.line : node.loc.start.line,
|
|
@@ -5420,7 +5426,7 @@ var prettier_default = [...base_default, { rules: {
|
|
|
5420
5426
|
//#endregion
|
|
5421
5427
|
//#region package.json
|
|
5422
5428
|
var name$1 = "eslint-plugin-yml";
|
|
5423
|
-
var version$1 = "3.6.
|
|
5429
|
+
var version$1 = "3.6.1";
|
|
5424
5430
|
//#endregion
|
|
5425
5431
|
//#region src/meta.ts
|
|
5426
5432
|
var meta_exports = /* @__PURE__ */ __exportAll({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-yml",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.1",
|
|
4
4
|
"description": "This ESLint plugin provides linting rules for YAML.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.mjs",
|
|
@@ -89,8 +89,8 @@
|
|
|
89
89
|
"@types/natural-compare": "^1.4.0",
|
|
90
90
|
"@types/node": "^24.0.0",
|
|
91
91
|
"@types/semver": "^7.3.1",
|
|
92
|
-
"@typescript-eslint/eslint-plugin": "~8.
|
|
93
|
-
"@typescript-eslint/parser": "~8.
|
|
92
|
+
"@typescript-eslint/eslint-plugin": "~8.65.0",
|
|
93
|
+
"@typescript-eslint/parser": "~8.65.0",
|
|
94
94
|
"cross-env": "^10.0.0",
|
|
95
95
|
"env-cmd": "^11.0.0",
|
|
96
96
|
"eslint": "^10.0.0",
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
"eslint-plugin-yml": "^3.0.0",
|
|
110
110
|
"events": "^3.3.0",
|
|
111
111
|
"mocha": "^11.0.0",
|
|
112
|
-
"monaco-editor": "^0.
|
|
112
|
+
"monaco-editor": "^0.56.0",
|
|
113
113
|
"nyc": "^18.0.0",
|
|
114
114
|
"pako": "^3.0.0",
|
|
115
115
|
"prettier": "^3.0.3",
|