eslint-plugin-yml 1.13.1 → 1.14.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/README.md +2 -2
- package/lib/configs/flat/base.d.ts +3 -3
- package/lib/configs/flat/prettier.d.ts +15 -15
- package/lib/configs/flat/recommended.d.ts +10 -10
- package/lib/configs/flat/standard.d.ts +23 -23
- package/lib/index.d.ts +51 -51
- package/lib/meta.d.ts +1 -1
- package/lib/meta.js +1 -1
- package/lib/rules/sort-keys.js +1 -1
- package/package.json +5 -4
package/README.md
CHANGED
|
@@ -65,7 +65,7 @@ npm install --save-dev eslint eslint-plugin-yml
|
|
|
65
65
|
|
|
66
66
|
### Configuration
|
|
67
67
|
|
|
68
|
-
#### New
|
|
68
|
+
#### New Config (`eslint.config.js`)
|
|
69
69
|
|
|
70
70
|
Use `eslint.config.js` file to configure rules. See also: <https://eslint.org/docs/latest/use/configure/configuration-files-new>.
|
|
71
71
|
|
|
@@ -95,7 +95,7 @@ This plugin provides configs:
|
|
|
95
95
|
|
|
96
96
|
See [the rule list](https://ota-meshi.github.io/eslint-plugin-yml/rules/) to get the `rules` that this plugin provides.
|
|
97
97
|
|
|
98
|
-
#### Legacy Config (
|
|
98
|
+
#### Legacy Config (`.eslintrc`)
|
|
99
99
|
|
|
100
100
|
Use `.eslintrc.*` file to configure rules. See also: <https://eslint.org/docs/latest/use/configure/>.
|
|
101
101
|
|
|
@@ -13,9 +13,9 @@ declare const _default: ({
|
|
|
13
13
|
parser: typeof parser;
|
|
14
14
|
};
|
|
15
15
|
rules: {
|
|
16
|
-
"no-irregular-whitespace":
|
|
17
|
-
"no-unused-vars":
|
|
18
|
-
"spaced-comment":
|
|
16
|
+
"no-irregular-whitespace": "off";
|
|
17
|
+
"no-unused-vars": "off";
|
|
18
|
+
"spaced-comment": "off";
|
|
19
19
|
};
|
|
20
20
|
plugins?: undefined;
|
|
21
21
|
})[];
|
|
@@ -11,25 +11,25 @@ declare const _default: ({
|
|
|
11
11
|
parser: typeof import("yaml-eslint-parser");
|
|
12
12
|
};
|
|
13
13
|
rules: {
|
|
14
|
-
"no-irregular-whitespace":
|
|
15
|
-
"no-unused-vars":
|
|
16
|
-
"spaced-comment":
|
|
14
|
+
"no-irregular-whitespace": "off";
|
|
15
|
+
"no-unused-vars": "off";
|
|
16
|
+
"spaced-comment": "off";
|
|
17
17
|
};
|
|
18
18
|
plugins?: undefined;
|
|
19
19
|
} | {
|
|
20
20
|
rules: {
|
|
21
|
-
"yml/block-mapping-colon-indicator-newline":
|
|
22
|
-
"yml/block-mapping-question-indicator-newline":
|
|
23
|
-
"yml/block-sequence-hyphen-indicator-newline":
|
|
24
|
-
"yml/flow-mapping-curly-newline":
|
|
25
|
-
"yml/flow-mapping-curly-spacing":
|
|
26
|
-
"yml/flow-sequence-bracket-newline":
|
|
27
|
-
"yml/flow-sequence-bracket-spacing":
|
|
28
|
-
"yml/indent":
|
|
29
|
-
"yml/key-spacing":
|
|
30
|
-
"yml/no-multiple-empty-lines":
|
|
31
|
-
"yml/no-trailing-zeros":
|
|
32
|
-
"yml/quotes":
|
|
21
|
+
"yml/block-mapping-colon-indicator-newline": "off";
|
|
22
|
+
"yml/block-mapping-question-indicator-newline": "off";
|
|
23
|
+
"yml/block-sequence-hyphen-indicator-newline": "off";
|
|
24
|
+
"yml/flow-mapping-curly-newline": "off";
|
|
25
|
+
"yml/flow-mapping-curly-spacing": "off";
|
|
26
|
+
"yml/flow-sequence-bracket-newline": "off";
|
|
27
|
+
"yml/flow-sequence-bracket-spacing": "off";
|
|
28
|
+
"yml/indent": "off";
|
|
29
|
+
"yml/key-spacing": "off";
|
|
30
|
+
"yml/no-multiple-empty-lines": "off";
|
|
31
|
+
"yml/no-trailing-zeros": "off";
|
|
32
|
+
"yml/quotes": "off";
|
|
33
33
|
};
|
|
34
34
|
})[];
|
|
35
35
|
export default _default;
|
|
@@ -11,20 +11,20 @@ declare const _default: ({
|
|
|
11
11
|
parser: typeof import("yaml-eslint-parser");
|
|
12
12
|
};
|
|
13
13
|
rules: {
|
|
14
|
-
"no-irregular-whitespace":
|
|
15
|
-
"no-unused-vars":
|
|
16
|
-
"spaced-comment":
|
|
14
|
+
"no-irregular-whitespace": "off";
|
|
15
|
+
"no-unused-vars": "off";
|
|
16
|
+
"spaced-comment": "off";
|
|
17
17
|
};
|
|
18
18
|
plugins?: undefined;
|
|
19
19
|
} | {
|
|
20
20
|
rules: {
|
|
21
|
-
"yml/no-empty-document":
|
|
22
|
-
"yml/no-empty-key":
|
|
23
|
-
"yml/no-empty-mapping-value":
|
|
24
|
-
"yml/no-empty-sequence-entry":
|
|
25
|
-
"yml/no-irregular-whitespace":
|
|
26
|
-
"yml/no-tab-indent":
|
|
27
|
-
"yml/vue-custom-block/no-parsing-error":
|
|
21
|
+
"yml/no-empty-document": "error";
|
|
22
|
+
"yml/no-empty-key": "error";
|
|
23
|
+
"yml/no-empty-mapping-value": "error";
|
|
24
|
+
"yml/no-empty-sequence-entry": "error";
|
|
25
|
+
"yml/no-irregular-whitespace": "error";
|
|
26
|
+
"yml/no-tab-indent": "error";
|
|
27
|
+
"yml/vue-custom-block/no-parsing-error": "error";
|
|
28
28
|
};
|
|
29
29
|
})[];
|
|
30
30
|
export default _default;
|
|
@@ -11,33 +11,33 @@ declare const _default: ({
|
|
|
11
11
|
parser: typeof import("yaml-eslint-parser");
|
|
12
12
|
};
|
|
13
13
|
rules: {
|
|
14
|
-
"no-irregular-whitespace":
|
|
15
|
-
"no-unused-vars":
|
|
16
|
-
"spaced-comment":
|
|
14
|
+
"no-irregular-whitespace": "off";
|
|
15
|
+
"no-unused-vars": "off";
|
|
16
|
+
"spaced-comment": "off";
|
|
17
17
|
};
|
|
18
18
|
plugins?: undefined;
|
|
19
19
|
} | {
|
|
20
20
|
rules: {
|
|
21
|
-
"yml/block-mapping-question-indicator-newline":
|
|
22
|
-
"yml/block-mapping":
|
|
23
|
-
"yml/block-sequence-hyphen-indicator-newline":
|
|
24
|
-
"yml/block-sequence":
|
|
25
|
-
"yml/flow-mapping-curly-newline":
|
|
26
|
-
"yml/flow-mapping-curly-spacing":
|
|
27
|
-
"yml/flow-sequence-bracket-newline":
|
|
28
|
-
"yml/flow-sequence-bracket-spacing":
|
|
29
|
-
"yml/indent":
|
|
30
|
-
"yml/key-spacing":
|
|
31
|
-
"yml/no-empty-document":
|
|
32
|
-
"yml/no-empty-key":
|
|
33
|
-
"yml/no-empty-mapping-value":
|
|
34
|
-
"yml/no-empty-sequence-entry":
|
|
35
|
-
"yml/no-irregular-whitespace":
|
|
36
|
-
"yml/no-tab-indent":
|
|
37
|
-
"yml/plain-scalar":
|
|
38
|
-
"yml/quotes":
|
|
39
|
-
"yml/spaced-comment":
|
|
40
|
-
"yml/vue-custom-block/no-parsing-error":
|
|
21
|
+
"yml/block-mapping-question-indicator-newline": "error";
|
|
22
|
+
"yml/block-mapping": "error";
|
|
23
|
+
"yml/block-sequence-hyphen-indicator-newline": "error";
|
|
24
|
+
"yml/block-sequence": "error";
|
|
25
|
+
"yml/flow-mapping-curly-newline": "error";
|
|
26
|
+
"yml/flow-mapping-curly-spacing": "error";
|
|
27
|
+
"yml/flow-sequence-bracket-newline": "error";
|
|
28
|
+
"yml/flow-sequence-bracket-spacing": "error";
|
|
29
|
+
"yml/indent": "error";
|
|
30
|
+
"yml/key-spacing": "error";
|
|
31
|
+
"yml/no-empty-document": "error";
|
|
32
|
+
"yml/no-empty-key": "error";
|
|
33
|
+
"yml/no-empty-mapping-value": "error";
|
|
34
|
+
"yml/no-empty-sequence-entry": "error";
|
|
35
|
+
"yml/no-irregular-whitespace": "error";
|
|
36
|
+
"yml/no-tab-indent": "error";
|
|
37
|
+
"yml/plain-scalar": "error";
|
|
38
|
+
"yml/quotes": "error";
|
|
39
|
+
"yml/spaced-comment": "error";
|
|
40
|
+
"yml/vue-custom-block/no-parsing-error": "error";
|
|
41
41
|
};
|
|
42
42
|
})[];
|
|
43
43
|
export default _default;
|
package/lib/index.d.ts
CHANGED
|
@@ -82,9 +82,9 @@ declare const _default: {
|
|
|
82
82
|
parser: typeof import("yaml-eslint-parser");
|
|
83
83
|
};
|
|
84
84
|
rules: {
|
|
85
|
-
"no-irregular-whitespace":
|
|
86
|
-
"no-unused-vars":
|
|
87
|
-
"spaced-comment":
|
|
85
|
+
"no-irregular-whitespace": "off";
|
|
86
|
+
"no-unused-vars": "off";
|
|
87
|
+
"spaced-comment": "off";
|
|
88
88
|
};
|
|
89
89
|
plugins?: undefined;
|
|
90
90
|
})[];
|
|
@@ -101,20 +101,20 @@ declare const _default: {
|
|
|
101
101
|
parser: typeof import("yaml-eslint-parser");
|
|
102
102
|
};
|
|
103
103
|
rules: {
|
|
104
|
-
"no-irregular-whitespace":
|
|
105
|
-
"no-unused-vars":
|
|
106
|
-
"spaced-comment":
|
|
104
|
+
"no-irregular-whitespace": "off";
|
|
105
|
+
"no-unused-vars": "off";
|
|
106
|
+
"spaced-comment": "off";
|
|
107
107
|
};
|
|
108
108
|
plugins?: undefined;
|
|
109
109
|
} | {
|
|
110
110
|
rules: {
|
|
111
|
-
"yml/no-empty-document":
|
|
112
|
-
"yml/no-empty-key":
|
|
113
|
-
"yml/no-empty-mapping-value":
|
|
114
|
-
"yml/no-empty-sequence-entry":
|
|
115
|
-
"yml/no-irregular-whitespace":
|
|
116
|
-
"yml/no-tab-indent":
|
|
117
|
-
"yml/vue-custom-block/no-parsing-error":
|
|
111
|
+
"yml/no-empty-document": "error";
|
|
112
|
+
"yml/no-empty-key": "error";
|
|
113
|
+
"yml/no-empty-mapping-value": "error";
|
|
114
|
+
"yml/no-empty-sequence-entry": "error";
|
|
115
|
+
"yml/no-irregular-whitespace": "error";
|
|
116
|
+
"yml/no-tab-indent": "error";
|
|
117
|
+
"yml/vue-custom-block/no-parsing-error": "error";
|
|
118
118
|
};
|
|
119
119
|
})[];
|
|
120
120
|
"flat/standard": ({
|
|
@@ -130,33 +130,33 @@ declare const _default: {
|
|
|
130
130
|
parser: typeof import("yaml-eslint-parser");
|
|
131
131
|
};
|
|
132
132
|
rules: {
|
|
133
|
-
"no-irregular-whitespace":
|
|
134
|
-
"no-unused-vars":
|
|
135
|
-
"spaced-comment":
|
|
133
|
+
"no-irregular-whitespace": "off";
|
|
134
|
+
"no-unused-vars": "off";
|
|
135
|
+
"spaced-comment": "off";
|
|
136
136
|
};
|
|
137
137
|
plugins?: undefined;
|
|
138
138
|
} | {
|
|
139
139
|
rules: {
|
|
140
|
-
"yml/block-mapping-question-indicator-newline":
|
|
141
|
-
"yml/block-mapping":
|
|
142
|
-
"yml/block-sequence-hyphen-indicator-newline":
|
|
143
|
-
"yml/block-sequence":
|
|
144
|
-
"yml/flow-mapping-curly-newline":
|
|
145
|
-
"yml/flow-mapping-curly-spacing":
|
|
146
|
-
"yml/flow-sequence-bracket-newline":
|
|
147
|
-
"yml/flow-sequence-bracket-spacing":
|
|
148
|
-
"yml/indent":
|
|
149
|
-
"yml/key-spacing":
|
|
150
|
-
"yml/no-empty-document":
|
|
151
|
-
"yml/no-empty-key":
|
|
152
|
-
"yml/no-empty-mapping-value":
|
|
153
|
-
"yml/no-empty-sequence-entry":
|
|
154
|
-
"yml/no-irregular-whitespace":
|
|
155
|
-
"yml/no-tab-indent":
|
|
156
|
-
"yml/plain-scalar":
|
|
157
|
-
"yml/quotes":
|
|
158
|
-
"yml/spaced-comment":
|
|
159
|
-
"yml/vue-custom-block/no-parsing-error":
|
|
140
|
+
"yml/block-mapping-question-indicator-newline": "error";
|
|
141
|
+
"yml/block-mapping": "error";
|
|
142
|
+
"yml/block-sequence-hyphen-indicator-newline": "error";
|
|
143
|
+
"yml/block-sequence": "error";
|
|
144
|
+
"yml/flow-mapping-curly-newline": "error";
|
|
145
|
+
"yml/flow-mapping-curly-spacing": "error";
|
|
146
|
+
"yml/flow-sequence-bracket-newline": "error";
|
|
147
|
+
"yml/flow-sequence-bracket-spacing": "error";
|
|
148
|
+
"yml/indent": "error";
|
|
149
|
+
"yml/key-spacing": "error";
|
|
150
|
+
"yml/no-empty-document": "error";
|
|
151
|
+
"yml/no-empty-key": "error";
|
|
152
|
+
"yml/no-empty-mapping-value": "error";
|
|
153
|
+
"yml/no-empty-sequence-entry": "error";
|
|
154
|
+
"yml/no-irregular-whitespace": "error";
|
|
155
|
+
"yml/no-tab-indent": "error";
|
|
156
|
+
"yml/plain-scalar": "error";
|
|
157
|
+
"yml/quotes": "error";
|
|
158
|
+
"yml/spaced-comment": "error";
|
|
159
|
+
"yml/vue-custom-block/no-parsing-error": "error";
|
|
160
160
|
};
|
|
161
161
|
})[];
|
|
162
162
|
"flat/prettier": ({
|
|
@@ -172,25 +172,25 @@ declare const _default: {
|
|
|
172
172
|
parser: typeof import("yaml-eslint-parser");
|
|
173
173
|
};
|
|
174
174
|
rules: {
|
|
175
|
-
"no-irregular-whitespace":
|
|
176
|
-
"no-unused-vars":
|
|
177
|
-
"spaced-comment":
|
|
175
|
+
"no-irregular-whitespace": "off";
|
|
176
|
+
"no-unused-vars": "off";
|
|
177
|
+
"spaced-comment": "off";
|
|
178
178
|
};
|
|
179
179
|
plugins?: undefined;
|
|
180
180
|
} | {
|
|
181
181
|
rules: {
|
|
182
|
-
"yml/block-mapping-colon-indicator-newline":
|
|
183
|
-
"yml/block-mapping-question-indicator-newline":
|
|
184
|
-
"yml/block-sequence-hyphen-indicator-newline":
|
|
185
|
-
"yml/flow-mapping-curly-newline":
|
|
186
|
-
"yml/flow-mapping-curly-spacing":
|
|
187
|
-
"yml/flow-sequence-bracket-newline":
|
|
188
|
-
"yml/flow-sequence-bracket-spacing":
|
|
189
|
-
"yml/indent":
|
|
190
|
-
"yml/key-spacing":
|
|
191
|
-
"yml/no-multiple-empty-lines":
|
|
192
|
-
"yml/no-trailing-zeros":
|
|
193
|
-
"yml/quotes":
|
|
182
|
+
"yml/block-mapping-colon-indicator-newline": "off";
|
|
183
|
+
"yml/block-mapping-question-indicator-newline": "off";
|
|
184
|
+
"yml/block-sequence-hyphen-indicator-newline": "off";
|
|
185
|
+
"yml/flow-mapping-curly-newline": "off";
|
|
186
|
+
"yml/flow-mapping-curly-spacing": "off";
|
|
187
|
+
"yml/flow-sequence-bracket-newline": "off";
|
|
188
|
+
"yml/flow-sequence-bracket-spacing": "off";
|
|
189
|
+
"yml/indent": "off";
|
|
190
|
+
"yml/key-spacing": "off";
|
|
191
|
+
"yml/no-multiple-empty-lines": "off";
|
|
192
|
+
"yml/no-trailing-zeros": "off";
|
|
193
|
+
"yml/quotes": "off";
|
|
194
194
|
};
|
|
195
195
|
})[];
|
|
196
196
|
};
|
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.14.0";
|
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.
|
|
3
|
+
"version": "1.14.0",
|
|
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,7 +74,7 @@
|
|
|
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",
|
|
@@ -90,8 +91,8 @@
|
|
|
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-json-schema-validator": "^
|
|
94
|
+
"eslint-plugin-eslint-rule-tester": "^0.6.0",
|
|
95
|
+
"eslint-plugin-json-schema-validator": "^5.0.0",
|
|
95
96
|
"eslint-plugin-jsonc": "^2.0.0",
|
|
96
97
|
"eslint-plugin-markdown": "^3.0.0",
|
|
97
98
|
"eslint-plugin-n": "^16.0.1",
|