eslint-plugin-yml 1.14.0 → 1.16.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/lib/meta.d.ts +1 -1
- package/lib/meta.js +1 -1
- package/lib/rules/block-mapping-colon-indicator-newline.js +4 -3
- package/lib/rules/block-mapping-question-indicator-newline.js +4 -3
- package/lib/rules/block-mapping.js +4 -3
- package/lib/rules/block-sequence-hyphen-indicator-newline.js +6 -6
- package/lib/rules/block-sequence.js +4 -3
- package/lib/rules/file-extension.js +6 -6
- package/lib/rules/flow-mapping-curly-newline.js +4 -3
- package/lib/rules/flow-mapping-curly-spacing.js +4 -3
- package/lib/rules/flow-sequence-bracket-newline.js +4 -3
- package/lib/rules/flow-sequence-bracket-spacing.js +4 -3
- package/lib/rules/indent.js +4 -3
- package/lib/rules/key-name-casing.js +4 -3
- package/lib/rules/key-spacing.js +4 -3
- package/lib/rules/no-empty-document.js +4 -3
- package/lib/rules/no-empty-key.js +4 -3
- package/lib/rules/no-empty-mapping-value.js +4 -3
- package/lib/rules/no-empty-sequence-entry.js +4 -3
- package/lib/rules/no-irregular-whitespace.js +4 -3
- package/lib/rules/no-multiple-empty-lines.js +7 -7
- package/lib/rules/no-tab-indent.js +4 -3
- package/lib/rules/no-trailing-zeros.js +4 -3
- package/lib/rules/plain-scalar.js +51 -12
- package/lib/rules/quotes.js +4 -3
- package/lib/rules/require-string-key.js +4 -3
- package/lib/rules/sort-keys.js +4 -3
- package/lib/rules/sort-sequence-values.js +4 -3
- package/lib/rules/spaced-comment.js +4 -3
- package/lib/rules/vue-custom-block/no-parsing-error.js +2 -2
- package/lib/types.d.ts +1 -1
- package/lib/utils/ast-utils.js +10 -11
- package/lib/utils/casing.js +14 -14
- package/lib/utils/compat.js +2 -3
- package/lib/utils/index.js +3 -3
- package/lib/utils/yaml.js +13 -14
- package/package.json +28 -23
package/lib/meta.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const name = "eslint-plugin-yml";
|
|
2
|
-
export declare const version = "1.
|
|
2
|
+
export declare const version = "1.16.0";
|
package/lib/meta.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const index_1 = require("../utils/index");
|
|
4
4
|
const ast_utils_1 = require("../utils/ast-utils");
|
|
5
5
|
const compat_1 = require("../utils/compat");
|
|
6
|
-
exports.default = (0,
|
|
6
|
+
exports.default = (0, index_1.createRule)("block-mapping-colon-indicator-newline", {
|
|
7
7
|
meta: {
|
|
8
8
|
docs: {
|
|
9
9
|
description: "enforce consistent line breaks after `:` indicator",
|
|
@@ -24,8 +24,9 @@ exports.default = (0, utils_1.createRule)("block-mapping-colon-indicator-newline
|
|
|
24
24
|
type: "layout",
|
|
25
25
|
},
|
|
26
26
|
create(context) {
|
|
27
|
+
var _a;
|
|
27
28
|
const sourceCode = (0, compat_1.getSourceCode)(context);
|
|
28
|
-
if (!sourceCode.parserServices.isYAML) {
|
|
29
|
+
if (!((_a = sourceCode.parserServices) === null || _a === void 0 ? void 0 : _a.isYAML)) {
|
|
29
30
|
return {};
|
|
30
31
|
}
|
|
31
32
|
const option = context.options[0] || "never";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const index_1 = require("../utils/index");
|
|
4
4
|
const ast_utils_1 = require("../utils/ast-utils");
|
|
5
5
|
const compat_1 = require("../utils/compat");
|
|
6
|
-
exports.default = (0,
|
|
6
|
+
exports.default = (0, index_1.createRule)("block-mapping-question-indicator-newline", {
|
|
7
7
|
meta: {
|
|
8
8
|
docs: {
|
|
9
9
|
description: "enforce consistent line breaks after `?` indicator",
|
|
@@ -24,8 +24,9 @@ exports.default = (0, utils_1.createRule)("block-mapping-question-indicator-newl
|
|
|
24
24
|
type: "layout",
|
|
25
25
|
},
|
|
26
26
|
create(context) {
|
|
27
|
+
var _a;
|
|
27
28
|
const sourceCode = (0, compat_1.getSourceCode)(context);
|
|
28
|
-
if (!sourceCode.parserServices.isYAML) {
|
|
29
|
+
if (!((_a = sourceCode.parserServices) === null || _a === void 0 ? void 0 : _a.isYAML)) {
|
|
29
30
|
return {};
|
|
30
31
|
}
|
|
31
32
|
const option = context.options[0] || "never";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const index_1 = require("../utils/index");
|
|
4
4
|
const ast_utils_1 = require("../utils/ast-utils");
|
|
5
5
|
const yaml_1 = require("../utils/yaml");
|
|
6
6
|
const compat_1 = require("../utils/compat");
|
|
@@ -26,7 +26,7 @@ function parseOptions(option) {
|
|
|
26
26
|
}
|
|
27
27
|
return opt;
|
|
28
28
|
}
|
|
29
|
-
exports.default = (0,
|
|
29
|
+
exports.default = (0, index_1.createRule)("block-mapping", {
|
|
30
30
|
meta: {
|
|
31
31
|
docs: {
|
|
32
32
|
description: "require or disallow block style mappings.",
|
|
@@ -57,8 +57,9 @@ exports.default = (0, utils_1.createRule)("block-mapping", {
|
|
|
57
57
|
type: "layout",
|
|
58
58
|
},
|
|
59
59
|
create(context) {
|
|
60
|
+
var _a;
|
|
60
61
|
const sourceCode = (0, compat_1.getSourceCode)(context);
|
|
61
|
-
if (!sourceCode.parserServices.isYAML) {
|
|
62
|
+
if (!((_a = sourceCode.parserServices) === null || _a === void 0 ? void 0 : _a.isYAML)) {
|
|
62
63
|
return {};
|
|
63
64
|
}
|
|
64
65
|
const options = parseOptions(context.options[0]);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const index_1 = require("../utils/index");
|
|
4
4
|
const ast_utils_1 = require("../utils/ast-utils");
|
|
5
5
|
const compat_1 = require("../utils/compat");
|
|
6
|
-
exports.default = (0,
|
|
6
|
+
exports.default = (0, index_1.createRule)("block-sequence-hyphen-indicator-newline", {
|
|
7
7
|
meta: {
|
|
8
8
|
docs: {
|
|
9
9
|
description: "enforce consistent line breaks after `-` indicator",
|
|
@@ -30,14 +30,14 @@ exports.default = (0, utils_1.createRule)("block-sequence-hyphen-indicator-newli
|
|
|
30
30
|
type: "layout",
|
|
31
31
|
},
|
|
32
32
|
create(context) {
|
|
33
|
-
var _a, _b;
|
|
33
|
+
var _a, _b, _c;
|
|
34
34
|
const sourceCode = (0, compat_1.getSourceCode)(context);
|
|
35
|
-
if (!sourceCode.parserServices.isYAML) {
|
|
35
|
+
if (!((_a = sourceCode.parserServices) === null || _a === void 0 ? void 0 : _a.isYAML)) {
|
|
36
36
|
return {};
|
|
37
37
|
}
|
|
38
38
|
const style = context.options[0] || "never";
|
|
39
|
-
const nestedHyphenStyle = ((
|
|
40
|
-
const blockMappingStyle = ((
|
|
39
|
+
const nestedHyphenStyle = ((_b = context.options[1]) === null || _b === void 0 ? void 0 : _b.nestedHyphen) || "always";
|
|
40
|
+
const blockMappingStyle = ((_c = context.options[1]) === null || _c === void 0 ? void 0 : _c.blockMapping) || style;
|
|
41
41
|
function getStyleOption(hyphen, entry) {
|
|
42
42
|
const next = sourceCode.getTokenAfter(hyphen);
|
|
43
43
|
if (next && (0, ast_utils_1.isHyphen)(next)) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const index_1 = require("../utils/index");
|
|
4
4
|
const yaml_1 = require("../utils/yaml");
|
|
5
5
|
const ast_utils_1 = require("../utils/ast-utils");
|
|
6
6
|
const compat_1 = require("../utils/compat");
|
|
@@ -26,7 +26,7 @@ function parseOptions(option) {
|
|
|
26
26
|
}
|
|
27
27
|
return opt;
|
|
28
28
|
}
|
|
29
|
-
exports.default = (0,
|
|
29
|
+
exports.default = (0, index_1.createRule)("block-sequence", {
|
|
30
30
|
meta: {
|
|
31
31
|
docs: {
|
|
32
32
|
description: "require or disallow block style sequences.",
|
|
@@ -57,8 +57,9 @@ exports.default = (0, utils_1.createRule)("block-sequence", {
|
|
|
57
57
|
type: "layout",
|
|
58
58
|
},
|
|
59
59
|
create(context) {
|
|
60
|
+
var _a;
|
|
60
61
|
const sourceCode = (0, compat_1.getSourceCode)(context);
|
|
61
|
-
if (!sourceCode.parserServices.isYAML) {
|
|
62
|
+
if (!((_a = sourceCode.parserServices) === null || _a === void 0 ? void 0 : _a.isYAML)) {
|
|
62
63
|
return {};
|
|
63
64
|
}
|
|
64
65
|
const options = parseOptions(context.options[0]);
|
|
@@ -4,9 +4,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const path_1 = __importDefault(require("path"));
|
|
7
|
-
const
|
|
7
|
+
const index_1 = require("../utils/index");
|
|
8
8
|
const compat_1 = require("../utils/compat");
|
|
9
|
-
exports.default = (0,
|
|
9
|
+
exports.default = (0, index_1.createRule)("file-extension", {
|
|
10
10
|
meta: {
|
|
11
11
|
docs: {
|
|
12
12
|
description: "enforce YAML file extension",
|
|
@@ -34,13 +34,13 @@ exports.default = (0, utils_1.createRule)("file-extension", {
|
|
|
34
34
|
type: "suggestion",
|
|
35
35
|
},
|
|
36
36
|
create(context) {
|
|
37
|
-
var _a, _b, _c;
|
|
37
|
+
var _a, _b, _c, _d;
|
|
38
38
|
const sourceCode = (0, compat_1.getSourceCode)(context);
|
|
39
|
-
if (!sourceCode.parserServices.isYAML) {
|
|
39
|
+
if (!((_a = sourceCode.parserServices) === null || _a === void 0 ? void 0 : _a.isYAML)) {
|
|
40
40
|
return {};
|
|
41
41
|
}
|
|
42
|
-
const expected = ((
|
|
43
|
-
const caseSensitive = (
|
|
42
|
+
const expected = ((_b = context.options[0]) === null || _b === void 0 ? void 0 : _b.extension) || "yaml";
|
|
43
|
+
const caseSensitive = (_d = (_c = context.options[0]) === null || _c === void 0 ? void 0 : _c.caseSensitive) !== null && _d !== void 0 ? _d : true;
|
|
44
44
|
return {
|
|
45
45
|
Program(node) {
|
|
46
46
|
const filename = (0, compat_1.getFilename)(context);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const index_1 = require("../utils/index");
|
|
4
4
|
const ast_utils_1 = require("../utils/ast-utils");
|
|
5
5
|
const yaml_1 = require("../utils/yaml");
|
|
6
6
|
const compat_1 = require("../utils/compat");
|
|
@@ -57,7 +57,7 @@ function areLineBreaksRequired(node, options, first, last) {
|
|
|
57
57
|
objectProperties.length > 0 &&
|
|
58
58
|
first.loc.start.line !== last.loc.end.line));
|
|
59
59
|
}
|
|
60
|
-
exports.default = (0,
|
|
60
|
+
exports.default = (0, index_1.createRule)("flow-mapping-curly-newline", {
|
|
61
61
|
meta: {
|
|
62
62
|
docs: {
|
|
63
63
|
description: "enforce consistent line breaks inside braces",
|
|
@@ -76,8 +76,9 @@ exports.default = (0, utils_1.createRule)("flow-mapping-curly-newline", {
|
|
|
76
76
|
type: "layout",
|
|
77
77
|
},
|
|
78
78
|
create(context) {
|
|
79
|
+
var _a;
|
|
79
80
|
const sourceCode = (0, compat_1.getSourceCode)(context);
|
|
80
|
-
if (!sourceCode.parserServices.isYAML) {
|
|
81
|
+
if (!((_a = sourceCode.parserServices) === null || _a === void 0 ? void 0 : _a.isYAML)) {
|
|
81
82
|
return {};
|
|
82
83
|
}
|
|
83
84
|
const options = normalizeOptionValue(context.options[0]);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const index_1 = require("../utils/index");
|
|
4
4
|
const compat_1 = require("../utils/compat");
|
|
5
5
|
const ast_utils_1 = require("../utils/ast-utils");
|
|
6
|
-
exports.default = (0,
|
|
6
|
+
exports.default = (0, index_1.createRule)("flow-mapping-curly-spacing", {
|
|
7
7
|
meta: {
|
|
8
8
|
docs: {
|
|
9
9
|
description: "enforce consistent spacing inside braces",
|
|
@@ -39,8 +39,9 @@ exports.default = (0, utils_1.createRule)("flow-mapping-curly-spacing", {
|
|
|
39
39
|
},
|
|
40
40
|
},
|
|
41
41
|
create(context) {
|
|
42
|
+
var _a;
|
|
42
43
|
const sourceCode = (0, compat_1.getSourceCode)(context);
|
|
43
|
-
if (!sourceCode.parserServices.isYAML) {
|
|
44
|
+
if (!((_a = sourceCode.parserServices) === null || _a === void 0 ? void 0 : _a.isYAML)) {
|
|
44
45
|
return {};
|
|
45
46
|
}
|
|
46
47
|
const spaced = context.options[0] === "always";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const index_1 = require("../utils/index");
|
|
4
4
|
const yaml_1 = require("../utils/yaml");
|
|
5
5
|
const ast_utils_1 = require("../utils/ast-utils");
|
|
6
6
|
const compat_1 = require("../utils/compat");
|
|
7
|
-
exports.default = (0,
|
|
7
|
+
exports.default = (0, index_1.createRule)("flow-sequence-bracket-newline", {
|
|
8
8
|
meta: {
|
|
9
9
|
docs: {
|
|
10
10
|
description: "enforce linebreaks after opening and before closing flow sequence brackets",
|
|
@@ -44,8 +44,9 @@ exports.default = (0, utils_1.createRule)("flow-sequence-bracket-newline", {
|
|
|
44
44
|
type: "layout",
|
|
45
45
|
},
|
|
46
46
|
create(context) {
|
|
47
|
+
var _a;
|
|
47
48
|
const sourceCode = (0, compat_1.getSourceCode)(context);
|
|
48
|
-
if (!sourceCode.parserServices.isYAML) {
|
|
49
|
+
if (!((_a = sourceCode.parserServices) === null || _a === void 0 ? void 0 : _a.isYAML)) {
|
|
49
50
|
return {};
|
|
50
51
|
}
|
|
51
52
|
function normalizeOptionValue(option) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const index_1 = require("../utils/index");
|
|
4
4
|
const compat_1 = require("../utils/compat");
|
|
5
5
|
const ast_utils_1 = require("../utils/ast-utils");
|
|
6
|
-
exports.default = (0,
|
|
6
|
+
exports.default = (0, index_1.createRule)("flow-sequence-bracket-spacing", {
|
|
7
7
|
meta: {
|
|
8
8
|
docs: {
|
|
9
9
|
description: "enforce consistent spacing inside flow sequence brackets",
|
|
@@ -42,8 +42,9 @@ exports.default = (0, utils_1.createRule)("flow-sequence-bracket-spacing", {
|
|
|
42
42
|
},
|
|
43
43
|
},
|
|
44
44
|
create(context) {
|
|
45
|
+
var _a;
|
|
45
46
|
const sourceCode = (0, compat_1.getSourceCode)(context);
|
|
46
|
-
if (!sourceCode.parserServices.isYAML) {
|
|
47
|
+
if (!((_a = sourceCode.parserServices) === null || _a === void 0 ? void 0 : _a.isYAML)) {
|
|
47
48
|
return {};
|
|
48
49
|
}
|
|
49
50
|
const spaced = context.options[0] === "always";
|
package/lib/rules/indent.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const index_1 = require("../utils/index");
|
|
4
4
|
const yaml_1 = require("../utils/yaml");
|
|
5
5
|
const ast_utils_1 = require("../utils/ast-utils");
|
|
6
6
|
const compat_1 = require("../utils/compat");
|
|
@@ -26,7 +26,7 @@ function parseOptions(context) {
|
|
|
26
26
|
indicatorValueIndent,
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
|
-
exports.default = (0,
|
|
29
|
+
exports.default = (0, index_1.createRule)("indent", {
|
|
30
30
|
meta: {
|
|
31
31
|
docs: {
|
|
32
32
|
description: "enforce consistent indentation",
|
|
@@ -58,8 +58,9 @@ exports.default = (0, utils_1.createRule)("indent", {
|
|
|
58
58
|
type: "layout",
|
|
59
59
|
},
|
|
60
60
|
create(context) {
|
|
61
|
+
var _a;
|
|
61
62
|
const sourceCode = (0, compat_1.getSourceCode)(context);
|
|
62
|
-
if (!sourceCode.parserServices.isYAML) {
|
|
63
|
+
if (!((_a = sourceCode.parserServices) === null || _a === void 0 ? void 0 : _a.isYAML)) {
|
|
63
64
|
return {};
|
|
64
65
|
}
|
|
65
66
|
if ((0, yaml_1.hasTabIndent)(context)) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const yaml_eslint_parser_1 = require("yaml-eslint-parser");
|
|
4
|
-
const
|
|
4
|
+
const index_1 = require("../utils/index");
|
|
5
5
|
const casing_1 = require("../utils/casing");
|
|
6
6
|
const casing_2 = require("../utils/casing");
|
|
7
7
|
const compat_1 = require("../utils/compat");
|
|
8
|
-
exports.default = (0,
|
|
8
|
+
exports.default = (0, index_1.createRule)("key-name-casing", {
|
|
9
9
|
meta: {
|
|
10
10
|
docs: {
|
|
11
11
|
description: "enforce naming convention to key names",
|
|
@@ -55,8 +55,9 @@ exports.default = (0, utils_1.createRule)("key-name-casing", {
|
|
|
55
55
|
type: "suggestion",
|
|
56
56
|
},
|
|
57
57
|
create(context) {
|
|
58
|
+
var _a;
|
|
58
59
|
const sourceCode = (0, compat_1.getSourceCode)(context);
|
|
59
|
-
if (!sourceCode.parserServices.isYAML) {
|
|
60
|
+
if (!((_a = sourceCode.parserServices) === null || _a === void 0 ? void 0 : _a.isYAML)) {
|
|
60
61
|
return {};
|
|
61
62
|
}
|
|
62
63
|
const option = Object.assign({}, context.options[0]);
|
package/lib/rules/key-spacing.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const index_1 = require("../utils/index");
|
|
4
4
|
const ast_utils_1 = require("../utils/ast-utils");
|
|
5
5
|
const compat_1 = require("../utils/compat");
|
|
6
6
|
function containsLineTerminator(str) {
|
|
@@ -101,7 +101,7 @@ const ALIGN_OBJECT_SCHEMA = {
|
|
|
101
101
|
properties: Object.assign({ on: ON_SCHEMA }, OBJECT_WITHOUT_ON_SCHEMA.properties),
|
|
102
102
|
additionalProperties: false,
|
|
103
103
|
};
|
|
104
|
-
exports.default = (0,
|
|
104
|
+
exports.default = (0, index_1.createRule)("key-spacing", {
|
|
105
105
|
meta: {
|
|
106
106
|
docs: {
|
|
107
107
|
description: "enforce consistent spacing between keys and values in mapping pairs",
|
|
@@ -157,8 +157,9 @@ exports.default = (0, utils_1.createRule)("key-spacing", {
|
|
|
157
157
|
create,
|
|
158
158
|
});
|
|
159
159
|
function create(context) {
|
|
160
|
+
var _a;
|
|
160
161
|
const sourceCode = (0, compat_1.getSourceCode)(context);
|
|
161
|
-
if (!sourceCode.parserServices.isYAML) {
|
|
162
|
+
if (!((_a = sourceCode.parserServices) === null || _a === void 0 ? void 0 : _a.isYAML)) {
|
|
162
163
|
return {};
|
|
163
164
|
}
|
|
164
165
|
const options = context.options[0] || {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const index_1 = require("../utils/index");
|
|
4
4
|
const compat_1 = require("../utils/compat");
|
|
5
|
-
exports.default = (0,
|
|
5
|
+
exports.default = (0, index_1.createRule)("no-empty-document", {
|
|
6
6
|
meta: {
|
|
7
7
|
docs: {
|
|
8
8
|
description: "disallow empty document",
|
|
@@ -17,8 +17,9 @@ exports.default = (0, utils_1.createRule)("no-empty-document", {
|
|
|
17
17
|
type: "suggestion",
|
|
18
18
|
},
|
|
19
19
|
create(context) {
|
|
20
|
+
var _a;
|
|
20
21
|
const sourceCode = (0, compat_1.getSourceCode)(context);
|
|
21
|
-
if (!sourceCode.parserServices.isYAML) {
|
|
22
|
+
if (!((_a = sourceCode.parserServices) === null || _a === void 0 ? void 0 : _a.isYAML)) {
|
|
22
23
|
return {};
|
|
23
24
|
}
|
|
24
25
|
function isEmptyNode(node) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const index_1 = require("../utils/index");
|
|
4
4
|
const compat_1 = require("../utils/compat");
|
|
5
|
-
exports.default = (0,
|
|
5
|
+
exports.default = (0, index_1.createRule)("no-empty-key", {
|
|
6
6
|
meta: {
|
|
7
7
|
docs: {
|
|
8
8
|
description: "disallow empty mapping keys",
|
|
@@ -17,8 +17,9 @@ exports.default = (0, utils_1.createRule)("no-empty-key", {
|
|
|
17
17
|
type: "suggestion",
|
|
18
18
|
},
|
|
19
19
|
create(context) {
|
|
20
|
+
var _a;
|
|
20
21
|
const sourceCode = (0, compat_1.getSourceCode)(context);
|
|
21
|
-
if (!sourceCode.parserServices.isYAML) {
|
|
22
|
+
if (!((_a = sourceCode.parserServices) === null || _a === void 0 ? void 0 : _a.isYAML)) {
|
|
22
23
|
return {};
|
|
23
24
|
}
|
|
24
25
|
function isEmptyNode(node) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const index_1 = require("../utils/index");
|
|
4
4
|
const compat_1 = require("../utils/compat");
|
|
5
|
-
exports.default = (0,
|
|
5
|
+
exports.default = (0, index_1.createRule)("no-empty-mapping-value", {
|
|
6
6
|
meta: {
|
|
7
7
|
docs: {
|
|
8
8
|
description: "disallow empty mapping values",
|
|
@@ -17,8 +17,9 @@ exports.default = (0, utils_1.createRule)("no-empty-mapping-value", {
|
|
|
17
17
|
type: "suggestion",
|
|
18
18
|
},
|
|
19
19
|
create(context) {
|
|
20
|
+
var _a;
|
|
20
21
|
const sourceCode = (0, compat_1.getSourceCode)(context);
|
|
21
|
-
if (!sourceCode.parserServices.isYAML) {
|
|
22
|
+
if (!((_a = sourceCode.parserServices) === null || _a === void 0 ? void 0 : _a.isYAML)) {
|
|
22
23
|
return {};
|
|
23
24
|
}
|
|
24
25
|
function isEmptyNode(node) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const index_1 = require("../utils/index");
|
|
4
4
|
const ast_utils_1 = require("../utils/ast-utils");
|
|
5
5
|
const compat_1 = require("../utils/compat");
|
|
6
|
-
exports.default = (0,
|
|
6
|
+
exports.default = (0, index_1.createRule)("no-empty-sequence-entry", {
|
|
7
7
|
meta: {
|
|
8
8
|
docs: {
|
|
9
9
|
description: "disallow empty sequence entries",
|
|
@@ -18,8 +18,9 @@ exports.default = (0, utils_1.createRule)("no-empty-sequence-entry", {
|
|
|
18
18
|
type: "suggestion",
|
|
19
19
|
},
|
|
20
20
|
create(context) {
|
|
21
|
+
var _a;
|
|
21
22
|
const sourceCode = (0, compat_1.getSourceCode)(context);
|
|
22
|
-
if (!sourceCode.parserServices.isYAML) {
|
|
23
|
+
if (!((_a = sourceCode.parserServices) === null || _a === void 0 ? void 0 : _a.isYAML)) {
|
|
23
24
|
return {};
|
|
24
25
|
}
|
|
25
26
|
function isEmptyNode(node) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const index_1 = require("../utils/index");
|
|
4
4
|
const compat_1 = require("../utils/compat");
|
|
5
5
|
const ALL_IRREGULARS = /[\v\f\u0085\u00a0\u1680\u180e\u2000-\u200b\u2028\u2029\u202f\u205f\u3000\ufeff]/u;
|
|
6
6
|
const IRREGULAR_WHITESPACE = /[\v\f\u0085\u00a0\u1680\u180e\u2000-\u200b\u202f\u205f\u3000\ufeff]+/gu;
|
|
7
7
|
const IRREGULAR_LINE_TERMINATORS = /[\u2028\u2029]/gu;
|
|
8
|
-
exports.default = (0,
|
|
8
|
+
exports.default = (0, index_1.createRule)("no-irregular-whitespace", {
|
|
9
9
|
meta: {
|
|
10
10
|
docs: {
|
|
11
11
|
description: "disallow irregular whitespace",
|
|
@@ -35,8 +35,9 @@ exports.default = (0, utils_1.createRule)("no-irregular-whitespace", {
|
|
|
35
35
|
type: "problem",
|
|
36
36
|
},
|
|
37
37
|
create(context) {
|
|
38
|
+
var _a;
|
|
38
39
|
const sourceCode = (0, compat_1.getSourceCode)(context);
|
|
39
|
-
if (!sourceCode.parserServices.isYAML) {
|
|
40
|
+
if (!((_a = sourceCode.parserServices) === null || _a === void 0 ? void 0 : _a.isYAML)) {
|
|
40
41
|
return {};
|
|
41
42
|
}
|
|
42
43
|
let errorIndexes = [];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const index_1 = require("../utils/index");
|
|
4
4
|
const compat_1 = require("../utils/compat");
|
|
5
|
-
exports.default = (0,
|
|
5
|
+
exports.default = (0, index_1.createRule)("no-multiple-empty-lines", {
|
|
6
6
|
meta: {
|
|
7
7
|
docs: {
|
|
8
8
|
description: "disallow multiple empty lines",
|
|
@@ -40,16 +40,16 @@ exports.default = (0, utils_1.createRule)("no-multiple-empty-lines", {
|
|
|
40
40
|
type: "layout",
|
|
41
41
|
},
|
|
42
42
|
create(context) {
|
|
43
|
-
var _a, _b, _c, _d, _e, _f;
|
|
43
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
44
44
|
const sourceCode = (0, compat_1.getSourceCode)(context);
|
|
45
|
-
if (!sourceCode.parserServices.isYAML) {
|
|
45
|
+
if (!((_a = sourceCode.parserServices) === null || _a === void 0 ? void 0 : _a.isYAML)) {
|
|
46
46
|
return {};
|
|
47
47
|
}
|
|
48
|
-
const maxOption = (
|
|
48
|
+
const maxOption = (_c = (_b = context.options[0]) === null || _b === void 0 ? void 0 : _b.max) !== null && _c !== void 0 ? _c : 2;
|
|
49
49
|
const options = {
|
|
50
50
|
max: maxOption,
|
|
51
|
-
maxEOF: (
|
|
52
|
-
maxBOF: (
|
|
51
|
+
maxEOF: (_e = (_d = context.options[0]) === null || _d === void 0 ? void 0 : _d.maxEOF) !== null && _e !== void 0 ? _e : maxOption,
|
|
52
|
+
maxBOF: (_g = (_f = context.options[0]) === null || _f === void 0 ? void 0 : _f.maxBOF) !== null && _g !== void 0 ? _g : maxOption,
|
|
53
53
|
};
|
|
54
54
|
const allLines = [...sourceCode.lines];
|
|
55
55
|
if (allLines[allLines.length - 1] === "") {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const index_1 = require("../utils/index");
|
|
4
4
|
const compat_1 = require("../utils/compat");
|
|
5
|
-
exports.default = (0,
|
|
5
|
+
exports.default = (0, index_1.createRule)("no-tab-indent", {
|
|
6
6
|
meta: {
|
|
7
7
|
docs: {
|
|
8
8
|
description: "disallow tabs for indentation.",
|
|
@@ -17,8 +17,9 @@ exports.default = (0, utils_1.createRule)("no-tab-indent", {
|
|
|
17
17
|
type: "problem",
|
|
18
18
|
},
|
|
19
19
|
create(context) {
|
|
20
|
+
var _a;
|
|
20
21
|
const sourceCode = (0, compat_1.getSourceCode)(context);
|
|
21
|
-
if (!sourceCode.parserServices.isYAML) {
|
|
22
|
+
if (!((_a = sourceCode.parserServices) === null || _a === void 0 ? void 0 : _a.isYAML)) {
|
|
22
23
|
return {};
|
|
23
24
|
}
|
|
24
25
|
return {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const index_1 = require("../utils/index");
|
|
4
4
|
const compat_1 = require("../utils/compat");
|
|
5
|
-
exports.default = (0,
|
|
5
|
+
exports.default = (0, index_1.createRule)("no-trailing-zeros", {
|
|
6
6
|
meta: {
|
|
7
7
|
docs: {
|
|
8
8
|
description: "disallow trailing zeros for floats",
|
|
@@ -18,8 +18,9 @@ exports.default = (0, utils_1.createRule)("no-trailing-zeros", {
|
|
|
18
18
|
type: "layout",
|
|
19
19
|
},
|
|
20
20
|
create(context) {
|
|
21
|
+
var _a;
|
|
21
22
|
const sourceCode = (0, compat_1.getSourceCode)(context);
|
|
22
|
-
if (!sourceCode.parserServices.isYAML) {
|
|
23
|
+
if (!((_a = sourceCode.parserServices) === null || _a === void 0 ? void 0 : _a.isYAML)) {
|
|
23
24
|
return {};
|
|
24
25
|
}
|
|
25
26
|
return {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const yaml_eslint_parser_1 = require("yaml-eslint-parser");
|
|
4
|
-
const
|
|
4
|
+
const index_1 = require("../utils/index");
|
|
5
5
|
const compat_1 = require("../utils/compat");
|
|
6
6
|
const SYMBOLS = new Set([
|
|
7
7
|
":",
|
|
@@ -26,7 +26,7 @@ function toRegExps(patterns) {
|
|
|
26
26
|
function isStringScalar(node) {
|
|
27
27
|
return typeof node.value === "string";
|
|
28
28
|
}
|
|
29
|
-
exports.default = (0,
|
|
29
|
+
exports.default = (0, index_1.createRule)("plain-scalar", {
|
|
30
30
|
meta: {
|
|
31
31
|
docs: {
|
|
32
32
|
description: "require or disallow plain style scalar.",
|
|
@@ -44,6 +44,13 @@ exports.default = (0, utils_1.createRule)("plain-scalar", {
|
|
|
44
44
|
type: "array",
|
|
45
45
|
items: { type: "string" },
|
|
46
46
|
},
|
|
47
|
+
overrides: {
|
|
48
|
+
type: "object",
|
|
49
|
+
properties: {
|
|
50
|
+
mappingKey: { enum: ["always", "never", null] },
|
|
51
|
+
},
|
|
52
|
+
additionalProperties: false,
|
|
53
|
+
},
|
|
47
54
|
},
|
|
48
55
|
additionalProperties: false,
|
|
49
56
|
},
|
|
@@ -55,17 +62,37 @@ exports.default = (0, utils_1.createRule)("plain-scalar", {
|
|
|
55
62
|
type: "layout",
|
|
56
63
|
},
|
|
57
64
|
create(context) {
|
|
58
|
-
var _a, _b;
|
|
65
|
+
var _a, _b, _c, _d, _e;
|
|
59
66
|
const sourceCode = (0, compat_1.getSourceCode)(context);
|
|
60
|
-
if (!sourceCode.parserServices.isYAML) {
|
|
67
|
+
if (!((_a = sourceCode.parserServices) === null || _a === void 0 ? void 0 : _a.isYAML)) {
|
|
61
68
|
return {};
|
|
62
69
|
}
|
|
63
|
-
const
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
70
|
+
const valueOption = {
|
|
71
|
+
prefer: context.options[0] || "always",
|
|
72
|
+
ignorePatterns: [],
|
|
73
|
+
};
|
|
74
|
+
const overridesMappingKey = (_c = (_b = context.options[1]) === null || _b === void 0 ? void 0 : _b.overrides) === null || _c === void 0 ? void 0 : _c.mappingKey;
|
|
75
|
+
const keyOption = overridesMappingKey
|
|
76
|
+
? {
|
|
77
|
+
prefer: overridesMappingKey,
|
|
78
|
+
ignorePatterns: [],
|
|
79
|
+
}
|
|
80
|
+
: valueOption;
|
|
81
|
+
if ((_d = context.options[1]) === null || _d === void 0 ? void 0 : _d.ignorePatterns) {
|
|
82
|
+
valueOption.ignorePatterns = toRegExps((_e = context.options[1]) === null || _e === void 0 ? void 0 : _e.ignorePatterns);
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
if (valueOption.prefer === "always") {
|
|
86
|
+
valueOption.ignorePatterns = toRegExps([
|
|
87
|
+
String.raw `[\v\f\u0085\u00a0\u1680\u180e\u2000-\u200b\u2028\u2029\u202f\u205f\u3000\ufeff]`,
|
|
88
|
+
]);
|
|
89
|
+
}
|
|
90
|
+
if (overridesMappingKey && keyOption.prefer === "always") {
|
|
91
|
+
keyOption.ignorePatterns = toRegExps([
|
|
92
|
+
String.raw `[\v\f\u0085\u00a0\u1680\u180e\u2000-\u200b\u2028\u2029\u202f\u205f\u3000\ufeff]`,
|
|
93
|
+
]);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
69
96
|
let currentDocument;
|
|
70
97
|
function canToPlain(node) {
|
|
71
98
|
if (node.value !== node.value.trim()) {
|
|
@@ -146,6 +173,17 @@ exports.default = (0, utils_1.createRule)("plain-scalar", {
|
|
|
146
173
|
},
|
|
147
174
|
});
|
|
148
175
|
}
|
|
176
|
+
function withinKey(node) {
|
|
177
|
+
const parent = node.parent;
|
|
178
|
+
if (parent.type === "YAMLPair" && parent.key === node) {
|
|
179
|
+
return true;
|
|
180
|
+
}
|
|
181
|
+
const grandParent = parent.parent;
|
|
182
|
+
if (grandParent.type === "YAMLWithMeta") {
|
|
183
|
+
return withinKey(grandParent);
|
|
184
|
+
}
|
|
185
|
+
return false;
|
|
186
|
+
}
|
|
149
187
|
return {
|
|
150
188
|
YAMLDocument(node) {
|
|
151
189
|
currentDocument = node;
|
|
@@ -154,10 +192,11 @@ exports.default = (0, utils_1.createRule)("plain-scalar", {
|
|
|
154
192
|
if (!isStringScalar(node)) {
|
|
155
193
|
return;
|
|
156
194
|
}
|
|
157
|
-
|
|
195
|
+
const option = withinKey(node) ? keyOption : valueOption;
|
|
196
|
+
if (option.ignorePatterns.some((p) => p.test(node.value))) {
|
|
158
197
|
return;
|
|
159
198
|
}
|
|
160
|
-
if (option === "always") {
|
|
199
|
+
if (option.prefer === "always") {
|
|
161
200
|
verifyAlways(node);
|
|
162
201
|
}
|
|
163
202
|
else {
|
package/lib/rules/quotes.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const index_1 = require("../utils/index");
|
|
4
4
|
const compat_1 = require("../utils/compat");
|
|
5
|
-
exports.default = (0,
|
|
5
|
+
exports.default = (0, index_1.createRule)("quotes", {
|
|
6
6
|
meta: {
|
|
7
7
|
docs: {
|
|
8
8
|
description: "enforce the consistent use of either double, or single quotes",
|
|
@@ -27,8 +27,9 @@ exports.default = (0, utils_1.createRule)("quotes", {
|
|
|
27
27
|
type: "layout",
|
|
28
28
|
},
|
|
29
29
|
create(context) {
|
|
30
|
+
var _a;
|
|
30
31
|
const sourceCode = (0, compat_1.getSourceCode)(context);
|
|
31
|
-
if (!sourceCode.parserServices.isYAML) {
|
|
32
|
+
if (!((_a = sourceCode.parserServices) === null || _a === void 0 ? void 0 : _a.isYAML)) {
|
|
32
33
|
return {};
|
|
33
34
|
}
|
|
34
35
|
const objectOption = context.options[0] || {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const index_1 = require("../utils/index");
|
|
4
4
|
const compat_1 = require("../utils/compat");
|
|
5
|
-
exports.default = (0,
|
|
5
|
+
exports.default = (0, index_1.createRule)("require-string-key", {
|
|
6
6
|
meta: {
|
|
7
7
|
docs: {
|
|
8
8
|
description: "disallow mapping keys other than strings",
|
|
@@ -17,8 +17,9 @@ exports.default = (0, utils_1.createRule)("require-string-key", {
|
|
|
17
17
|
type: "suggestion",
|
|
18
18
|
},
|
|
19
19
|
create(context) {
|
|
20
|
+
var _a;
|
|
20
21
|
const sourceCode = (0, compat_1.getSourceCode)(context);
|
|
21
|
-
if (!sourceCode.parserServices.isYAML) {
|
|
22
|
+
if (!((_a = sourceCode.parserServices) === null || _a === void 0 ? void 0 : _a.isYAML)) {
|
|
22
23
|
return {};
|
|
23
24
|
}
|
|
24
25
|
let anchors = {};
|
package/lib/rules/sort-keys.js
CHANGED
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const natural_compare_1 = __importDefault(require("natural-compare"));
|
|
7
|
-
const
|
|
7
|
+
const index_1 = require("../utils/index");
|
|
8
8
|
const ast_utils_1 = require("../utils/ast-utils");
|
|
9
9
|
const compat_1 = require("../utils/compat");
|
|
10
10
|
function isNewLine(char) {
|
|
@@ -217,7 +217,7 @@ const ORDER_OBJECT_SCHEMA = {
|
|
|
217
217
|
},
|
|
218
218
|
additionalProperties: false,
|
|
219
219
|
};
|
|
220
|
-
exports.default = (0,
|
|
220
|
+
exports.default = (0, index_1.createRule)("sort-keys", {
|
|
221
221
|
meta: {
|
|
222
222
|
docs: {
|
|
223
223
|
description: "require mapping keys to be sorted",
|
|
@@ -311,8 +311,9 @@ exports.default = (0, utils_1.createRule)("sort-keys", {
|
|
|
311
311
|
type: "suggestion",
|
|
312
312
|
},
|
|
313
313
|
create(context) {
|
|
314
|
+
var _a;
|
|
314
315
|
const sourceCode = (0, compat_1.getSourceCode)(context);
|
|
315
|
-
if (!sourceCode.parserServices.isYAML) {
|
|
316
|
+
if (!((_a = sourceCode.parserServices) === null || _a === void 0 ? void 0 : _a.isYAML)) {
|
|
316
317
|
return {};
|
|
317
318
|
}
|
|
318
319
|
const parsedOptions = parseOptions(context.options, sourceCode);
|
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const natural_compare_1 = __importDefault(require("natural-compare"));
|
|
7
|
-
const
|
|
7
|
+
const index_1 = require("../utils/index");
|
|
8
8
|
const ast_utils_1 = require("../utils/ast-utils");
|
|
9
9
|
const yaml_eslint_parser_1 = require("yaml-eslint-parser");
|
|
10
10
|
const compat_1 = require("../utils/compat");
|
|
@@ -248,7 +248,7 @@ const ORDER_OBJECT_SCHEMA = {
|
|
|
248
248
|
},
|
|
249
249
|
additionalProperties: false,
|
|
250
250
|
};
|
|
251
|
-
exports.default = (0,
|
|
251
|
+
exports.default = (0, index_1.createRule)("sort-sequence-values", {
|
|
252
252
|
meta: {
|
|
253
253
|
docs: {
|
|
254
254
|
description: "require sequence values to be sorted",
|
|
@@ -303,8 +303,9 @@ exports.default = (0, utils_1.createRule)("sort-sequence-values", {
|
|
|
303
303
|
type: "suggestion",
|
|
304
304
|
},
|
|
305
305
|
create(context) {
|
|
306
|
+
var _a;
|
|
306
307
|
const sourceCode = (0, compat_1.getSourceCode)(context);
|
|
307
|
-
if (!sourceCode.parserServices.isYAML) {
|
|
308
|
+
if (!((_a = sourceCode.parserServices) === null || _a === void 0 ? void 0 : _a.isYAML)) {
|
|
308
309
|
return {};
|
|
309
310
|
}
|
|
310
311
|
const parsedOptions = parseOptions(context.options, sourceCode);
|
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const lodash_1 = __importDefault(require("lodash"));
|
|
7
|
-
const
|
|
7
|
+
const index_1 = require("../utils/index");
|
|
8
8
|
const compat_1 = require("../utils/compat");
|
|
9
9
|
function escapeText(s) {
|
|
10
10
|
return `(?:${lodash_1.default.escapeRegExp(s)})`;
|
|
@@ -49,7 +49,7 @@ function createNeverStylePattern(markers) {
|
|
|
49
49
|
const pattern = `^(${markers.map(escapeText).join("|")})?[ \t]+`;
|
|
50
50
|
return new RegExp(pattern, "u");
|
|
51
51
|
}
|
|
52
|
-
exports.default = (0,
|
|
52
|
+
exports.default = (0, index_1.createRule)("spaced-comment", {
|
|
53
53
|
meta: {
|
|
54
54
|
docs: {
|
|
55
55
|
description: "enforce consistent spacing after the `#` in a comment",
|
|
@@ -90,8 +90,9 @@ exports.default = (0, utils_1.createRule)("spaced-comment", {
|
|
|
90
90
|
type: "suggestion",
|
|
91
91
|
},
|
|
92
92
|
create(context) {
|
|
93
|
+
var _a;
|
|
93
94
|
const sourceCode = (0, compat_1.getSourceCode)(context);
|
|
94
|
-
if (!sourceCode.parserServices.isYAML) {
|
|
95
|
+
if (!((_a = sourceCode.parserServices) === null || _a === void 0 ? void 0 : _a.isYAML)) {
|
|
95
96
|
return {};
|
|
96
97
|
}
|
|
97
98
|
const requireSpace = context.options[0] !== "never";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const index_1 = require("../../utils/index");
|
|
4
4
|
const compat_1 = require("../../utils/compat");
|
|
5
|
-
exports.default = (0,
|
|
5
|
+
exports.default = (0, index_1.createRule)("vue-custom-block/no-parsing-error", {
|
|
6
6
|
meta: {
|
|
7
7
|
docs: {
|
|
8
8
|
description: "disallow parsing errors in Vue custom blocks",
|
package/lib/types.d.ts
CHANGED
package/lib/utils/ast-utils.js
CHANGED
|
@@ -1,43 +1,42 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.isCommentToken = isCommentToken;
|
|
4
|
+
exports.isTokenOnSameLine = isTokenOnSameLine;
|
|
5
|
+
exports.isQuestion = isQuestion;
|
|
6
|
+
exports.isHyphen = isHyphen;
|
|
7
|
+
exports.isColon = isColon;
|
|
8
|
+
exports.isComma = isComma;
|
|
9
|
+
exports.isOpeningBracketToken = isOpeningBracketToken;
|
|
10
|
+
exports.isClosingBracketToken = isClosingBracketToken;
|
|
11
|
+
exports.isOpeningBraceToken = isOpeningBraceToken;
|
|
12
|
+
exports.isClosingBraceToken = isClosingBraceToken;
|
|
4
13
|
function isCommentToken(token) {
|
|
5
14
|
return Boolean(token && (token.type === "Block" || token.type === "Line"));
|
|
6
15
|
}
|
|
7
|
-
exports.isCommentToken = isCommentToken;
|
|
8
16
|
function isTokenOnSameLine(left, right) {
|
|
9
17
|
return left.loc.end.line === right.loc.start.line;
|
|
10
18
|
}
|
|
11
|
-
exports.isTokenOnSameLine = isTokenOnSameLine;
|
|
12
19
|
function isQuestion(token) {
|
|
13
20
|
return token != null && token.type === "Punctuator" && token.value === "?";
|
|
14
21
|
}
|
|
15
|
-
exports.isQuestion = isQuestion;
|
|
16
22
|
function isHyphen(token) {
|
|
17
23
|
return token != null && token.type === "Punctuator" && token.value === "-";
|
|
18
24
|
}
|
|
19
|
-
exports.isHyphen = isHyphen;
|
|
20
25
|
function isColon(token) {
|
|
21
26
|
return token != null && token.type === "Punctuator" && token.value === ":";
|
|
22
27
|
}
|
|
23
|
-
exports.isColon = isColon;
|
|
24
28
|
function isComma(token) {
|
|
25
29
|
return token != null && token.type === "Punctuator" && token.value === ",";
|
|
26
30
|
}
|
|
27
|
-
exports.isComma = isComma;
|
|
28
31
|
function isOpeningBracketToken(token) {
|
|
29
32
|
return token != null && token.value === "[" && token.type === "Punctuator";
|
|
30
33
|
}
|
|
31
|
-
exports.isOpeningBracketToken = isOpeningBracketToken;
|
|
32
34
|
function isClosingBracketToken(token) {
|
|
33
35
|
return token != null && token.value === "]" && token.type === "Punctuator";
|
|
34
36
|
}
|
|
35
|
-
exports.isClosingBracketToken = isClosingBracketToken;
|
|
36
37
|
function isOpeningBraceToken(token) {
|
|
37
38
|
return token != null && token.value === "{" && token.type === "Punctuator";
|
|
38
39
|
}
|
|
39
|
-
exports.isOpeningBraceToken = isOpeningBraceToken;
|
|
40
40
|
function isClosingBraceToken(token) {
|
|
41
41
|
return token != null && token.value === "}" && token.type === "Punctuator";
|
|
42
42
|
}
|
|
43
|
-
exports.isClosingBraceToken = isClosingBraceToken;
|
package/lib/utils/casing.js
CHANGED
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.allowedCaseOptions = void 0;
|
|
4
|
+
exports.kebabCase = kebabCase;
|
|
5
|
+
exports.isKebabCase = isKebabCase;
|
|
6
|
+
exports.snakeCase = snakeCase;
|
|
7
|
+
exports.isSnakeCase = isSnakeCase;
|
|
8
|
+
exports.screamingSnakeCase = screamingSnakeCase;
|
|
9
|
+
exports.isScreamingSnakeCase = isScreamingSnakeCase;
|
|
10
|
+
exports.camelCase = camelCase;
|
|
11
|
+
exports.isCamelCase = isCamelCase;
|
|
12
|
+
exports.pascalCase = pascalCase;
|
|
13
|
+
exports.isPascalCase = isPascalCase;
|
|
14
|
+
exports.getChecker = getChecker;
|
|
15
|
+
exports.getConverter = getConverter;
|
|
16
|
+
exports.getExactConverter = getExactConverter;
|
|
4
17
|
exports.allowedCaseOptions = [
|
|
5
18
|
"camelCase",
|
|
6
19
|
"kebab-case",
|
|
@@ -27,7 +40,6 @@ function kebabCase(str) {
|
|
|
27
40
|
}
|
|
28
41
|
return res.toLowerCase();
|
|
29
42
|
}
|
|
30
|
-
exports.kebabCase = kebabCase;
|
|
31
43
|
function isKebabCase(str) {
|
|
32
44
|
if (hasUpper(str) ||
|
|
33
45
|
hasSymbols(str) ||
|
|
@@ -37,7 +49,6 @@ function isKebabCase(str) {
|
|
|
37
49
|
}
|
|
38
50
|
return true;
|
|
39
51
|
}
|
|
40
|
-
exports.isKebabCase = isKebabCase;
|
|
41
52
|
function snakeCase(str) {
|
|
42
53
|
let res = str.replace(/-/gu, "_");
|
|
43
54
|
if (hasLower(res)) {
|
|
@@ -45,14 +56,12 @@ function snakeCase(str) {
|
|
|
45
56
|
}
|
|
46
57
|
return res.toLowerCase();
|
|
47
58
|
}
|
|
48
|
-
exports.snakeCase = snakeCase;
|
|
49
59
|
function isSnakeCase(str) {
|
|
50
60
|
if (hasUpper(str) || hasSymbols(str) || /-|__|\s/u.test(str)) {
|
|
51
61
|
return false;
|
|
52
62
|
}
|
|
53
63
|
return true;
|
|
54
64
|
}
|
|
55
|
-
exports.isSnakeCase = isSnakeCase;
|
|
56
65
|
function screamingSnakeCase(str) {
|
|
57
66
|
let res = str.replace(/-/gu, "_");
|
|
58
67
|
if (hasLower(res)) {
|
|
@@ -60,14 +69,12 @@ function screamingSnakeCase(str) {
|
|
|
60
69
|
}
|
|
61
70
|
return res.toUpperCase();
|
|
62
71
|
}
|
|
63
|
-
exports.screamingSnakeCase = screamingSnakeCase;
|
|
64
72
|
function isScreamingSnakeCase(str) {
|
|
65
73
|
if (hasLower(str) || hasSymbols(str) || /-|__|\s/u.test(str)) {
|
|
66
74
|
return false;
|
|
67
75
|
}
|
|
68
76
|
return true;
|
|
69
77
|
}
|
|
70
|
-
exports.isScreamingSnakeCase = isScreamingSnakeCase;
|
|
71
78
|
function camelCase(str) {
|
|
72
79
|
if (isPascalCase(str)) {
|
|
73
80
|
return str.charAt(0).toLowerCase() + str.slice(1);
|
|
@@ -78,7 +85,6 @@ function camelCase(str) {
|
|
|
78
85
|
}
|
|
79
86
|
return s.replace(/[-_](\w)/gu, (_, c) => (c ? c.toUpperCase() : ""));
|
|
80
87
|
}
|
|
81
|
-
exports.camelCase = camelCase;
|
|
82
88
|
function isCamelCase(str) {
|
|
83
89
|
if (hasSymbols(str) ||
|
|
84
90
|
/^[A-Z]/u.test(str) ||
|
|
@@ -87,11 +93,9 @@ function isCamelCase(str) {
|
|
|
87
93
|
}
|
|
88
94
|
return true;
|
|
89
95
|
}
|
|
90
|
-
exports.isCamelCase = isCamelCase;
|
|
91
96
|
function pascalCase(str) {
|
|
92
97
|
return capitalize(camelCase(str));
|
|
93
98
|
}
|
|
94
|
-
exports.pascalCase = pascalCase;
|
|
95
99
|
function isPascalCase(str) {
|
|
96
100
|
if (hasSymbols(str) ||
|
|
97
101
|
/^[a-z]/u.test(str) ||
|
|
@@ -100,7 +104,6 @@ function isPascalCase(str) {
|
|
|
100
104
|
}
|
|
101
105
|
return true;
|
|
102
106
|
}
|
|
103
|
-
exports.isPascalCase = isPascalCase;
|
|
104
107
|
const convertersMap = {
|
|
105
108
|
"kebab-case": kebabCase,
|
|
106
109
|
snake_case: snakeCase,
|
|
@@ -118,11 +121,9 @@ const checkersMap = {
|
|
|
118
121
|
function getChecker(name) {
|
|
119
122
|
return checkersMap[name] || isPascalCase;
|
|
120
123
|
}
|
|
121
|
-
exports.getChecker = getChecker;
|
|
122
124
|
function getConverter(name) {
|
|
123
125
|
return convertersMap[name] || pascalCase;
|
|
124
126
|
}
|
|
125
|
-
exports.getConverter = getConverter;
|
|
126
127
|
function getExactConverter(name) {
|
|
127
128
|
const converter = getConverter(name);
|
|
128
129
|
const checker = getChecker(name);
|
|
@@ -131,4 +132,3 @@ function getExactConverter(name) {
|
|
|
131
132
|
return checker(result) ? result : str;
|
|
132
133
|
};
|
|
133
134
|
}
|
|
134
|
-
exports.getExactConverter = getExactConverter;
|
package/lib/utils/compat.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getSourceCode = getSourceCode;
|
|
4
|
+
exports.getFilename = getFilename;
|
|
4
5
|
const eslint_compat_utils_1 = require("eslint-compat-utils");
|
|
5
6
|
function getSourceCode(context) {
|
|
6
7
|
return (0, eslint_compat_utils_1.getSourceCode)(context);
|
|
7
8
|
}
|
|
8
|
-
exports.getSourceCode = getSourceCode;
|
|
9
9
|
function getFilename(context) {
|
|
10
10
|
return (0, eslint_compat_utils_1.getFilename)(context);
|
|
11
11
|
}
|
|
12
|
-
exports.getFilename = getFilename;
|
package/lib/utils/index.js
CHANGED
|
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.createRule =
|
|
29
|
+
exports.createRule = createRule;
|
|
30
30
|
const yamlESLintParser = __importStar(require("yaml-eslint-parser"));
|
|
31
31
|
const path_1 = __importDefault(require("path"));
|
|
32
32
|
const compat_1 = require("./compat");
|
|
@@ -34,8 +34,9 @@ function createRule(ruleName, rule) {
|
|
|
34
34
|
return {
|
|
35
35
|
meta: Object.assign(Object.assign({}, rule.meta), { docs: Object.assign(Object.assign({}, rule.meta.docs), { url: `https://ota-meshi.github.io/eslint-plugin-yml/rules/${ruleName}.html`, ruleId: `yml/${ruleName}`, ruleName }) }),
|
|
36
36
|
create(context) {
|
|
37
|
+
var _a;
|
|
37
38
|
const sourceCode = (0, compat_1.getSourceCode)(context);
|
|
38
|
-
if (typeof sourceCode.parserServices.defineCustomBlocksVisitor ===
|
|
39
|
+
if (typeof ((_a = sourceCode.parserServices) === null || _a === void 0 ? void 0 : _a.defineCustomBlocksVisitor) ===
|
|
39
40
|
"function" &&
|
|
40
41
|
path_1.default.extname((0, compat_1.getFilename)(context)) === ".vue") {
|
|
41
42
|
return sourceCode.parserServices.defineCustomBlocksVisitor(context, yamlESLintParser, {
|
|
@@ -53,4 +54,3 @@ function createRule(ruleName, rule) {
|
|
|
53
54
|
},
|
|
54
55
|
};
|
|
55
56
|
}
|
|
56
|
-
exports.createRule = createRule;
|
package/lib/utils/yaml.js
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.hasTabIndent = hasTabIndent;
|
|
4
|
+
exports.calcExpectIndentForPairs = calcExpectIndentForPairs;
|
|
5
|
+
exports.calcExpectIndentForEntries = calcExpectIndentForEntries;
|
|
6
|
+
exports.getActualIndent = getActualIndent;
|
|
7
|
+
exports.getActualIndentFromLine = getActualIndentFromLine;
|
|
8
|
+
exports.incIndent = incIndent;
|
|
9
|
+
exports.decIndent = decIndent;
|
|
10
|
+
exports.getNumOfIndent = getNumOfIndent;
|
|
11
|
+
exports.compareIndent = compareIndent;
|
|
12
|
+
exports.isKeyNode = isKeyNode;
|
|
13
|
+
exports.unwrapMeta = unwrapMeta;
|
|
14
|
+
exports.processIndentFix = processIndentFix;
|
|
15
|
+
exports.fixIndent = fixIndent;
|
|
4
16
|
const ast_utils_1 = require("./ast-utils");
|
|
5
17
|
const compat_1 = require("./compat");
|
|
6
18
|
function hasTabIndent(context) {
|
|
@@ -14,7 +26,6 @@ function hasTabIndent(context) {
|
|
|
14
26
|
}
|
|
15
27
|
return false;
|
|
16
28
|
}
|
|
17
|
-
exports.hasTabIndent = hasTabIndent;
|
|
18
29
|
function calcExpectIndentForPairs(mapping, context) {
|
|
19
30
|
const sourceCode = (0, compat_1.getSourceCode)(context);
|
|
20
31
|
let parentNode = mapping.parent;
|
|
@@ -57,7 +68,6 @@ function calcExpectIndentForPairs(mapping, context) {
|
|
|
57
68
|
}
|
|
58
69
|
return calcExpectIndentFromBaseNode(parentNode, mapping.pairs[0], context);
|
|
59
70
|
}
|
|
60
|
-
exports.calcExpectIndentForPairs = calcExpectIndentForPairs;
|
|
61
71
|
function calcExpectIndentForEntries(sequence, context) {
|
|
62
72
|
const sourceCode = (0, compat_1.getSourceCode)(context);
|
|
63
73
|
let parentNode = sequence.parent;
|
|
@@ -100,7 +110,6 @@ function calcExpectIndentForEntries(sequence, context) {
|
|
|
100
110
|
}
|
|
101
111
|
return calcExpectIndentFromBaseNode(parentNode, sequence.entries[0], context);
|
|
102
112
|
}
|
|
103
|
-
exports.calcExpectIndentForEntries = calcExpectIndentForEntries;
|
|
104
113
|
function calcExpectIndentFromBaseNode(baseNode, node, context) {
|
|
105
114
|
const baseIndent = getActualIndent(baseNode, context);
|
|
106
115
|
if (baseIndent == null) {
|
|
@@ -120,13 +129,11 @@ function getActualIndent(node, context) {
|
|
|
120
129
|
}
|
|
121
130
|
return null;
|
|
122
131
|
}
|
|
123
|
-
exports.getActualIndent = getActualIndent;
|
|
124
132
|
function getActualIndentFromLine(line, context) {
|
|
125
133
|
const sourceCode = (0, compat_1.getSourceCode)(context);
|
|
126
134
|
const lineText = sourceCode.getLines()[line - 1];
|
|
127
135
|
return /^[^\S\n\r\u2028\u2029]*/u.exec(lineText)[0];
|
|
128
136
|
}
|
|
129
|
-
exports.getActualIndentFromLine = getActualIndentFromLine;
|
|
130
137
|
function incIndent(indent, context) {
|
|
131
138
|
const numOfIndent = getNumOfIndent(context);
|
|
132
139
|
const add = numOfIndent === 2
|
|
@@ -136,18 +143,15 @@ function incIndent(indent, context) {
|
|
|
136
143
|
: " ".repeat(numOfIndent);
|
|
137
144
|
return `${indent}${add}`;
|
|
138
145
|
}
|
|
139
|
-
exports.incIndent = incIndent;
|
|
140
146
|
function decIndent(indent, context) {
|
|
141
147
|
const numOfIndent = getNumOfIndent(context);
|
|
142
148
|
return " ".repeat(indent.length - numOfIndent);
|
|
143
149
|
}
|
|
144
|
-
exports.decIndent = decIndent;
|
|
145
150
|
function getNumOfIndent(context, optionValue) {
|
|
146
151
|
var _a, _b;
|
|
147
152
|
const num = optionValue !== null && optionValue !== void 0 ? optionValue : (_b = (_a = context.settings) === null || _a === void 0 ? void 0 : _a.yml) === null || _b === void 0 ? void 0 : _b.indent;
|
|
148
153
|
return num == null || num < 2 ? 2 : num;
|
|
149
154
|
}
|
|
150
|
-
exports.getNumOfIndent = getNumOfIndent;
|
|
151
155
|
function compareIndent(a, b) {
|
|
152
156
|
const minLen = Math.min(a.length, b.length);
|
|
153
157
|
for (let index = 0; index < minLen; index++) {
|
|
@@ -157,14 +161,12 @@ function compareIndent(a, b) {
|
|
|
157
161
|
}
|
|
158
162
|
return a.length > b.length ? 1 : a.length < b.length ? -1 : 0;
|
|
159
163
|
}
|
|
160
|
-
exports.compareIndent = compareIndent;
|
|
161
164
|
function isKeyNode(node) {
|
|
162
165
|
if (node.parent.type === "YAMLWithMeta") {
|
|
163
166
|
return isKeyNode(node.parent);
|
|
164
167
|
}
|
|
165
168
|
return node.parent.type === "YAMLPair" && node.parent.key === node;
|
|
166
169
|
}
|
|
167
|
-
exports.isKeyNode = isKeyNode;
|
|
168
170
|
function unwrapMeta(node) {
|
|
169
171
|
if (!node) {
|
|
170
172
|
return node;
|
|
@@ -174,7 +176,6 @@ function unwrapMeta(node) {
|
|
|
174
176
|
}
|
|
175
177
|
return node;
|
|
176
178
|
}
|
|
177
|
-
exports.unwrapMeta = unwrapMeta;
|
|
178
179
|
function* processIndentFix(fixer, baseIndent, targetNode, context) {
|
|
179
180
|
const sourceCode = (0, compat_1.getSourceCode)(context);
|
|
180
181
|
if (targetNode.type === "YAMLWithMeta") {
|
|
@@ -256,11 +257,9 @@ function* processIndentFix(fixer, baseIndent, targetNode, context) {
|
|
|
256
257
|
}
|
|
257
258
|
}
|
|
258
259
|
}
|
|
259
|
-
exports.processIndentFix = processIndentFix;
|
|
260
260
|
function fixIndent(fixer, sourceCode, indent, node) {
|
|
261
261
|
const prevToken = sourceCode.getTokenBefore(node, {
|
|
262
262
|
includeComments: true,
|
|
263
263
|
});
|
|
264
264
|
return fixer.replaceTextRange([prevToken.range[1], node.range[0]], `\n${indent}`);
|
|
265
265
|
}
|
|
266
|
-
exports.fixIndent = fixIndent;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-yml",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.16.0",
|
|
4
4
|
"description": "This ESLint plugin provides linting rules for YAML.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"files": [
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"build:meta": "npm run ts -- ./tools/update-meta.ts",
|
|
16
16
|
"build:ts": "tsc --project ./tsconfig.build.json",
|
|
17
17
|
"clean": "rimraf .nyc_output dist coverage",
|
|
18
|
-
"lint": "eslint .
|
|
19
|
-
"eslint-fix": "eslint . --
|
|
18
|
+
"lint": "eslint .",
|
|
19
|
+
"eslint-fix": "eslint . --fix",
|
|
20
20
|
"eslint-test-fix": "eslint tests/src/rules/*.ts --fix -c .eslintrc.for-vscode.js",
|
|
21
21
|
"pretest:base": "cross-env DEBUG=eslint-plugin-yml*",
|
|
22
22
|
"test:base": "npm run mocha -- \"tests/src/**/*.ts\" --reporter dot --timeout 60000",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"homepage": "https://ota-meshi.github.io/eslint-plugin-yml/",
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"debug": "^4.3.2",
|
|
61
|
-
"eslint-compat-utils": "^0.
|
|
61
|
+
"eslint-compat-utils": "^0.6.0",
|
|
62
62
|
"lodash": "^4.17.21",
|
|
63
63
|
"natural-compare": "^1.4.0",
|
|
64
64
|
"yaml-eslint-parser": "^1.2.1"
|
|
@@ -69,43 +69,46 @@
|
|
|
69
69
|
"devDependencies": {
|
|
70
70
|
"@changesets/changelog-github": "^0.5.0",
|
|
71
71
|
"@changesets/cli": "^2.24.2",
|
|
72
|
-
"@
|
|
73
|
-
"@
|
|
72
|
+
"@eslint-community/eslint-plugin-eslint-comments": "^4.3.0",
|
|
73
|
+
"@eslint/eslintrc": "^3.1.0",
|
|
74
|
+
"@eslint/js": "^9.5.0",
|
|
75
|
+
"@eslint/json": "^0.8.0",
|
|
76
|
+
"@ota-meshi/eslint-plugin": "^0.17.3",
|
|
77
|
+
"@ota-meshi/site-kit-eslint-editor-vue": "^0.2.0",
|
|
74
78
|
"@types/debug": "^4.1.5",
|
|
75
|
-
"@types/eslint": "^
|
|
79
|
+
"@types/eslint": "^9.0.0",
|
|
76
80
|
"@types/eslint-scope": "^3.7.0",
|
|
77
81
|
"@types/eslint-visitor-keys": "^3.0.0",
|
|
78
82
|
"@types/estree": "^1.0.0",
|
|
79
83
|
"@types/lodash": "^4.14.158",
|
|
80
84
|
"@types/mocha": "^10.0.0",
|
|
81
85
|
"@types/natural-compare": "^1.4.0",
|
|
82
|
-
"@types/node": "^
|
|
86
|
+
"@types/node": "^22.0.0",
|
|
83
87
|
"@types/semver": "^7.3.1",
|
|
84
|
-
"@typescript-eslint/eslint-plugin": "
|
|
85
|
-
"@typescript-eslint/parser": "
|
|
88
|
+
"@typescript-eslint/eslint-plugin": "~8.16.0",
|
|
89
|
+
"@typescript-eslint/parser": "~8.16.0",
|
|
86
90
|
"cross-env": "^7.0.2",
|
|
87
91
|
"env-cmd": "^10.1.0",
|
|
88
|
-
"esbuild": "^0.
|
|
92
|
+
"esbuild": "^0.24.0",
|
|
89
93
|
"esbuild-register": "^3.2.0",
|
|
90
|
-
"eslint": "^
|
|
94
|
+
"eslint": "^9.16.0",
|
|
91
95
|
"eslint-config-prettier": "^9.0.0",
|
|
92
|
-
"eslint-plugin-eslint-
|
|
93
|
-
"eslint-plugin-eslint-plugin": "^5.0.0",
|
|
96
|
+
"eslint-plugin-eslint-plugin": "^6.0.0",
|
|
94
97
|
"eslint-plugin-eslint-rule-tester": "^0.6.0",
|
|
98
|
+
"eslint-plugin-jsdoc": "^50.0.0",
|
|
95
99
|
"eslint-plugin-json-schema-validator": "^5.0.0",
|
|
96
100
|
"eslint-plugin-jsonc": "^2.0.0",
|
|
97
|
-
"eslint-plugin-markdown": "^
|
|
98
|
-
"eslint-plugin-n": "^
|
|
99
|
-
"eslint-plugin-node-dependencies": "^0.
|
|
101
|
+
"eslint-plugin-markdown": "^5.0.0",
|
|
102
|
+
"eslint-plugin-n": "^17.0.0",
|
|
103
|
+
"eslint-plugin-node-dependencies": "^0.12.0",
|
|
100
104
|
"eslint-plugin-prettier": "^5.0.0",
|
|
101
105
|
"eslint-plugin-regexp": "^2.0.0",
|
|
102
106
|
"eslint-plugin-vue": "^9.0.0",
|
|
103
107
|
"eslint-plugin-yml": "^1.0.0",
|
|
104
|
-
"espree": "^10.0.0",
|
|
105
108
|
"events": "^3.3.0",
|
|
106
109
|
"mocha": "^10.0.0",
|
|
107
|
-
"monaco-editor": "^0.
|
|
108
|
-
"nyc": "^
|
|
110
|
+
"monaco-editor": "^0.52.0",
|
|
111
|
+
"nyc": "^17.0.0",
|
|
109
112
|
"pako": "^2.1.0",
|
|
110
113
|
"prettier": "^3.0.3",
|
|
111
114
|
"semver": "^7.3.2",
|
|
@@ -114,13 +117,15 @@
|
|
|
114
117
|
"stylelint-config-standard": "^36.0.0",
|
|
115
118
|
"stylelint-config-standard-vue": "^1.0.0",
|
|
116
119
|
"stylelint-stylus": "^1.0.0",
|
|
117
|
-
"typescript": "~5.
|
|
118
|
-
"
|
|
120
|
+
"typescript": "~5.6.0",
|
|
121
|
+
"typescript-eslint": "^8.0.0",
|
|
122
|
+
"vite-plugin-eslint4b": "^0.5.0",
|
|
119
123
|
"vitepress": "^1.0.0-rc.17",
|
|
120
124
|
"vue-eslint-parser": "^9.0.0",
|
|
121
125
|
"yaml": "^2.1.1"
|
|
122
126
|
},
|
|
123
127
|
"publishConfig": {
|
|
124
128
|
"access": "public"
|
|
125
|
-
}
|
|
129
|
+
},
|
|
130
|
+
"packageManager": "npm@10.9.1"
|
|
126
131
|
}
|