eslint-plugin-yml 1.13.0 → 1.13.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/lib/configs/flat/base.d.ts +8 -3
- package/lib/configs/flat/base.js +3 -1
- package/lib/configs/flat/prettier.d.ts +6 -1
- package/lib/configs/flat/recommended.d.ts +6 -1
- package/lib/configs/flat/standard.d.ts +6 -1
- package/lib/index.d.ts +37 -15
- package/lib/index.js +1 -1
- package/lib/meta.d.ts +2 -2
- package/lib/meta.js +1 -1
- package/lib/rules/sort-keys.js +1 -1
- package/package.json +8 -7
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import type { ESLint } from "eslint";
|
|
2
2
|
import * as parser from "yaml-eslint-parser";
|
|
3
|
-
declare const _default: {
|
|
4
|
-
files: string[];
|
|
3
|
+
declare const _default: ({
|
|
5
4
|
plugins: {
|
|
6
5
|
readonly yml: ESLint.Plugin;
|
|
7
6
|
};
|
|
7
|
+
files?: undefined;
|
|
8
|
+
languageOptions?: undefined;
|
|
9
|
+
rules?: undefined;
|
|
10
|
+
} | {
|
|
11
|
+
files: string[];
|
|
8
12
|
languageOptions: {
|
|
9
13
|
parser: typeof parser;
|
|
10
14
|
};
|
|
@@ -13,5 +17,6 @@ declare const _default: {
|
|
|
13
17
|
"no-unused-vars": string;
|
|
14
18
|
"spaced-comment": string;
|
|
15
19
|
};
|
|
16
|
-
|
|
20
|
+
plugins?: undefined;
|
|
21
|
+
})[];
|
|
17
22
|
export default _default;
|
package/lib/configs/flat/base.js
CHANGED
|
@@ -26,12 +26,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
26
26
|
const parser = __importStar(require("yaml-eslint-parser"));
|
|
27
27
|
exports.default = [
|
|
28
28
|
{
|
|
29
|
-
files: ["*.yaml", "**/*.yaml", "*.yml", "**/*.yml"],
|
|
30
29
|
plugins: {
|
|
31
30
|
get yml() {
|
|
32
31
|
return require("../../index");
|
|
33
32
|
},
|
|
34
33
|
},
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
files: ["*.yaml", "**/*.yaml", "*.yml", "**/*.yml"],
|
|
35
37
|
languageOptions: {
|
|
36
38
|
parser,
|
|
37
39
|
},
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
declare const _default: ({
|
|
2
|
-
files: string[];
|
|
3
2
|
plugins: {
|
|
4
3
|
readonly yml: import("eslint").ESLint.Plugin;
|
|
5
4
|
};
|
|
5
|
+
files?: undefined;
|
|
6
|
+
languageOptions?: undefined;
|
|
7
|
+
rules?: undefined;
|
|
8
|
+
} | {
|
|
9
|
+
files: string[];
|
|
6
10
|
languageOptions: {
|
|
7
11
|
parser: typeof import("yaml-eslint-parser");
|
|
8
12
|
};
|
|
@@ -11,6 +15,7 @@ declare const _default: ({
|
|
|
11
15
|
"no-unused-vars": string;
|
|
12
16
|
"spaced-comment": string;
|
|
13
17
|
};
|
|
18
|
+
plugins?: undefined;
|
|
14
19
|
} | {
|
|
15
20
|
rules: {
|
|
16
21
|
"yml/block-mapping-colon-indicator-newline": string;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
declare const _default: ({
|
|
2
|
-
files: string[];
|
|
3
2
|
plugins: {
|
|
4
3
|
readonly yml: import("eslint").ESLint.Plugin;
|
|
5
4
|
};
|
|
5
|
+
files?: undefined;
|
|
6
|
+
languageOptions?: undefined;
|
|
7
|
+
rules?: undefined;
|
|
8
|
+
} | {
|
|
9
|
+
files: string[];
|
|
6
10
|
languageOptions: {
|
|
7
11
|
parser: typeof import("yaml-eslint-parser");
|
|
8
12
|
};
|
|
@@ -11,6 +15,7 @@ declare const _default: ({
|
|
|
11
15
|
"no-unused-vars": string;
|
|
12
16
|
"spaced-comment": string;
|
|
13
17
|
};
|
|
18
|
+
plugins?: undefined;
|
|
14
19
|
} | {
|
|
15
20
|
rules: {
|
|
16
21
|
"yml/no-empty-document": string;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
declare const _default: ({
|
|
2
|
-
files: string[];
|
|
3
2
|
plugins: {
|
|
4
3
|
readonly yml: import("eslint").ESLint.Plugin;
|
|
5
4
|
};
|
|
5
|
+
files?: undefined;
|
|
6
|
+
languageOptions?: undefined;
|
|
7
|
+
rules?: undefined;
|
|
8
|
+
} | {
|
|
9
|
+
files: string[];
|
|
6
10
|
languageOptions: {
|
|
7
11
|
parser: typeof import("yaml-eslint-parser");
|
|
8
12
|
};
|
|
@@ -11,6 +15,7 @@ declare const _default: ({
|
|
|
11
15
|
"no-unused-vars": string;
|
|
12
16
|
"spaced-comment": string;
|
|
13
17
|
};
|
|
18
|
+
plugins?: undefined;
|
|
14
19
|
} | {
|
|
15
20
|
rules: {
|
|
16
21
|
"yml/block-mapping-question-indicator-newline": string;
|
package/lib/index.d.ts
CHANGED
|
@@ -69,23 +69,34 @@ declare const _default: {
|
|
|
69
69
|
"yml/quotes": string;
|
|
70
70
|
};
|
|
71
71
|
};
|
|
72
|
-
"flat/base": {
|
|
73
|
-
plugins:
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
"spaced-comment": string;
|
|
81
|
-
};
|
|
82
|
-
}[];
|
|
83
|
-
};
|
|
84
|
-
"flat/recommended": ({
|
|
72
|
+
"flat/base": ({
|
|
73
|
+
plugins: {
|
|
74
|
+
readonly yml: import("eslint").ESLint.Plugin;
|
|
75
|
+
};
|
|
76
|
+
files?: undefined;
|
|
77
|
+
languageOptions?: undefined;
|
|
78
|
+
rules?: undefined;
|
|
79
|
+
} | {
|
|
85
80
|
files: string[];
|
|
81
|
+
languageOptions: {
|
|
82
|
+
parser: typeof import("yaml-eslint-parser");
|
|
83
|
+
};
|
|
84
|
+
rules: {
|
|
85
|
+
"no-irregular-whitespace": string;
|
|
86
|
+
"no-unused-vars": string;
|
|
87
|
+
"spaced-comment": string;
|
|
88
|
+
};
|
|
89
|
+
plugins?: undefined;
|
|
90
|
+
})[];
|
|
91
|
+
"flat/recommended": ({
|
|
86
92
|
plugins: {
|
|
87
93
|
readonly yml: import("eslint").ESLint.Plugin;
|
|
88
94
|
};
|
|
95
|
+
files?: undefined;
|
|
96
|
+
languageOptions?: undefined;
|
|
97
|
+
rules?: undefined;
|
|
98
|
+
} | {
|
|
99
|
+
files: string[];
|
|
89
100
|
languageOptions: {
|
|
90
101
|
parser: typeof import("yaml-eslint-parser");
|
|
91
102
|
};
|
|
@@ -94,6 +105,7 @@ declare const _default: {
|
|
|
94
105
|
"no-unused-vars": string;
|
|
95
106
|
"spaced-comment": string;
|
|
96
107
|
};
|
|
108
|
+
plugins?: undefined;
|
|
97
109
|
} | {
|
|
98
110
|
rules: {
|
|
99
111
|
"yml/no-empty-document": string;
|
|
@@ -106,10 +118,14 @@ declare const _default: {
|
|
|
106
118
|
};
|
|
107
119
|
})[];
|
|
108
120
|
"flat/standard": ({
|
|
109
|
-
files: string[];
|
|
110
121
|
plugins: {
|
|
111
122
|
readonly yml: import("eslint").ESLint.Plugin;
|
|
112
123
|
};
|
|
124
|
+
files?: undefined;
|
|
125
|
+
languageOptions?: undefined;
|
|
126
|
+
rules?: undefined;
|
|
127
|
+
} | {
|
|
128
|
+
files: string[];
|
|
113
129
|
languageOptions: {
|
|
114
130
|
parser: typeof import("yaml-eslint-parser");
|
|
115
131
|
};
|
|
@@ -118,6 +134,7 @@ declare const _default: {
|
|
|
118
134
|
"no-unused-vars": string;
|
|
119
135
|
"spaced-comment": string;
|
|
120
136
|
};
|
|
137
|
+
plugins?: undefined;
|
|
121
138
|
} | {
|
|
122
139
|
rules: {
|
|
123
140
|
"yml/block-mapping-question-indicator-newline": string;
|
|
@@ -143,10 +160,14 @@ declare const _default: {
|
|
|
143
160
|
};
|
|
144
161
|
})[];
|
|
145
162
|
"flat/prettier": ({
|
|
146
|
-
files: string[];
|
|
147
163
|
plugins: {
|
|
148
164
|
readonly yml: import("eslint").ESLint.Plugin;
|
|
149
165
|
};
|
|
166
|
+
files?: undefined;
|
|
167
|
+
languageOptions?: undefined;
|
|
168
|
+
rules?: undefined;
|
|
169
|
+
} | {
|
|
170
|
+
files: string[];
|
|
150
171
|
languageOptions: {
|
|
151
172
|
parser: typeof import("yaml-eslint-parser");
|
|
152
173
|
};
|
|
@@ -155,6 +176,7 @@ declare const _default: {
|
|
|
155
176
|
"no-unused-vars": string;
|
|
156
177
|
"spaced-comment": string;
|
|
157
178
|
};
|
|
179
|
+
plugins?: undefined;
|
|
158
180
|
} | {
|
|
159
181
|
rules: {
|
|
160
182
|
"yml/block-mapping-colon-indicator-newline": string;
|
package/lib/index.js
CHANGED
|
@@ -30,7 +30,7 @@ const base_1 = __importDefault(require("./configs/base"));
|
|
|
30
30
|
const recommended_1 = __importDefault(require("./configs/recommended"));
|
|
31
31
|
const standard_1 = __importDefault(require("./configs/standard"));
|
|
32
32
|
const prettier_1 = __importDefault(require("./configs/prettier"));
|
|
33
|
-
const base_2 = __importDefault(require("./configs/base"));
|
|
33
|
+
const base_2 = __importDefault(require("./configs/flat/base"));
|
|
34
34
|
const recommended_2 = __importDefault(require("./configs/flat/recommended"));
|
|
35
35
|
const standard_2 = __importDefault(require("./configs/flat/standard"));
|
|
36
36
|
const prettier_2 = __importDefault(require("./configs/flat/prettier"));
|
package/lib/meta.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const name
|
|
2
|
-
export declare const version
|
|
1
|
+
export declare const name = "eslint-plugin-yml";
|
|
2
|
+
export declare const version = "1.13.2";
|
package/lib/meta.js
CHANGED
package/lib/rules/sort-keys.js
CHANGED
|
@@ -491,7 +491,7 @@ exports.default = (0, utils_1.createRule)("sort-keys", {
|
|
|
491
491
|
else {
|
|
492
492
|
const diffIndent = nodeLocs.indentColumn - moveTargetLocs.indentColumn;
|
|
493
493
|
const insertCode = `${sourceCode.text.slice(nodeLocs.range[0] + diffIndent, nodeLocs.range[1])}\n${sourceCode.text.slice(nodeLocs.range[0], nodeLocs.range[0] + diffIndent)}`;
|
|
494
|
-
yield fixer.insertTextBeforeRange(moveTargetLocs.range,
|
|
494
|
+
yield fixer.insertTextBeforeRange(moveTargetLocs.range, insertCode);
|
|
495
495
|
const removeRange = [
|
|
496
496
|
getNewlineStartIndex(nodeLocs.range[0]),
|
|
497
497
|
nodeLocs.range[1],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-yml",
|
|
3
|
-
"version": "1.13.
|
|
3
|
+
"version": "1.13.2",
|
|
4
4
|
"description": "This ESLint plugin provides linting rules for YAML.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"files": [
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"clean": "rimraf .nyc_output dist coverage",
|
|
18
18
|
"lint": "eslint . --ext .js,.vue,.ts,.json,.md,.yml,.yaml",
|
|
19
19
|
"eslint-fix": "eslint . --ext .js,.vue,.ts,.json,.md,.yml,.yaml --fix",
|
|
20
|
+
"eslint-test-fix": "eslint tests/src/rules/*.ts --fix -c .eslintrc.for-vscode.js",
|
|
20
21
|
"pretest:base": "cross-env DEBUG=eslint-plugin-yml*",
|
|
21
22
|
"test:base": "npm run mocha -- \"tests/src/**/*.ts\" --reporter dot --timeout 60000",
|
|
22
23
|
"test": "npm run test:base",
|
|
@@ -73,15 +74,15 @@
|
|
|
73
74
|
"@types/debug": "^4.1.5",
|
|
74
75
|
"@types/eslint": "^8.0.0",
|
|
75
76
|
"@types/eslint-scope": "^3.7.0",
|
|
76
|
-
"@types/eslint-visitor-keys": "^
|
|
77
|
+
"@types/eslint-visitor-keys": "^3.0.0",
|
|
77
78
|
"@types/estree": "^1.0.0",
|
|
78
79
|
"@types/lodash": "^4.14.158",
|
|
79
80
|
"@types/mocha": "^10.0.0",
|
|
80
81
|
"@types/natural-compare": "^1.4.0",
|
|
81
82
|
"@types/node": "^20.0.0",
|
|
82
83
|
"@types/semver": "^7.3.1",
|
|
83
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
84
|
-
"@typescript-eslint/parser": "^
|
|
84
|
+
"@typescript-eslint/eslint-plugin": "^7.0.0",
|
|
85
|
+
"@typescript-eslint/parser": "^7.0.0",
|
|
85
86
|
"cross-env": "^7.0.2",
|
|
86
87
|
"env-cmd": "^10.1.0",
|
|
87
88
|
"esbuild": "^0.20.0",
|
|
@@ -90,7 +91,7 @@
|
|
|
90
91
|
"eslint-config-prettier": "^9.0.0",
|
|
91
92
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
92
93
|
"eslint-plugin-eslint-plugin": "^5.0.0",
|
|
93
|
-
"eslint-plugin-eslint-rule-tester": "^0.
|
|
94
|
+
"eslint-plugin-eslint-rule-tester": "^0.6.0",
|
|
94
95
|
"eslint-plugin-json-schema-validator": "^4.7.4",
|
|
95
96
|
"eslint-plugin-jsonc": "^2.0.0",
|
|
96
97
|
"eslint-plugin-markdown": "^3.0.0",
|
|
@@ -103,7 +104,7 @@
|
|
|
103
104
|
"espree": "^10.0.0",
|
|
104
105
|
"events": "^3.3.0",
|
|
105
106
|
"mocha": "^10.0.0",
|
|
106
|
-
"monaco-editor": "^0.
|
|
107
|
+
"monaco-editor": "^0.47.0",
|
|
107
108
|
"nyc": "^15.1.0",
|
|
108
109
|
"pako": "^2.1.0",
|
|
109
110
|
"prettier": "^3.0.3",
|
|
@@ -113,7 +114,7 @@
|
|
|
113
114
|
"stylelint-config-standard": "^36.0.0",
|
|
114
115
|
"stylelint-config-standard-vue": "^1.0.0",
|
|
115
116
|
"stylelint-stylus": "^1.0.0",
|
|
116
|
-
"typescript": "~5.
|
|
117
|
+
"typescript": "~5.4.0",
|
|
117
118
|
"vite-plugin-eslint4b": "^0.2.3",
|
|
118
119
|
"vitepress": "^1.0.0-rc.17",
|
|
119
120
|
"vue-eslint-parser": "^9.0.0",
|