Skip to content

Commit 3e7cb79

Browse files
authored
feat: update standard config (#526)
* feat: update `standard` config * Create proud-news-refuse.md
1 parent dc5028e commit 3e7cb79

13 files changed

Lines changed: 24 additions & 15 deletions

‎.changeset/proud-news-refuse.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"eslint-plugin-yml": major
3+
---
4+
5+
feat: update `standard` config

‎README.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ The rules with the following star :star: are included in the config.
231231

232232
| Rule ID | Description | Fixable | RECOMMENDED | STANDARD |
233233
|:--------|:------------|:-------:|:-----------:|:--------:|
234-
| [yml/block-mapping-colon-indicator-newline](https://ota-meshi.github.io/eslint-plugin-yml/rules/block-mapping-colon-indicator-newline.html) | enforce consistent line breaks after `:` indicator | :wrench: | | |
234+
| [yml/block-mapping-colon-indicator-newline](https://ota-meshi.github.io/eslint-plugin-yml/rules/block-mapping-colon-indicator-newline.html) | enforce consistent line breaks after `:` indicator | :wrench: | | :star: |
235235
| [yml/block-mapping-question-indicator-newline](https://ota-meshi.github.io/eslint-plugin-yml/rules/block-mapping-question-indicator-newline.html) | enforce consistent line breaks after `?` indicator | :wrench: | | :star: |
236236
| [yml/block-mapping](https://ota-meshi.github.io/eslint-plugin-yml/rules/block-mapping.html) | require or disallow block style mappings. | :wrench: | | :star: |
237237
| [yml/block-sequence-hyphen-indicator-newline](https://ota-meshi.github.io/eslint-plugin-yml/rules/block-sequence-hyphen-indicator-newline.html) | enforce consistent line breaks after `-` indicator | :wrench: | | :star: |
@@ -244,7 +244,7 @@ The rules with the following star :star: are included in the config.
244244
| [yml/no-empty-mapping-value](https://ota-meshi.github.io/eslint-plugin-yml/rules/no-empty-mapping-value.html) | disallow empty mapping values | | :star: | :star: |
245245
| [yml/no-empty-sequence-entry](https://ota-meshi.github.io/eslint-plugin-yml/rules/no-empty-sequence-entry.html) | disallow empty sequence entries | | :star: | :star: |
246246
| [yml/no-tab-indent](https://ota-meshi.github.io/eslint-plugin-yml/rules/no-tab-indent.html) | disallow tabs for indentation. | | :star: | :star: |
247-
| [yml/no-trailing-zeros](https://ota-meshi.github.io/eslint-plugin-yml/rules/no-trailing-zeros.html) | disallow trailing zeros for floats | :wrench: | | |
247+
| [yml/no-trailing-zeros](https://ota-meshi.github.io/eslint-plugin-yml/rules/no-trailing-zeros.html) | disallow trailing zeros for floats | :wrench: | | :star: |
248248
| [yml/plain-scalar](https://ota-meshi.github.io/eslint-plugin-yml/rules/plain-scalar.html) | require or disallow plain style scalar. | :wrench: | | :star: |
249249
| [yml/quotes](https://ota-meshi.github.io/eslint-plugin-yml/rules/quotes.html) | enforce the consistent use of either double, or single quotes | :wrench: | | :star: |
250250
| [yml/require-string-key](https://ota-meshi.github.io/eslint-plugin-yml/rules/require-string-key.html) | disallow mapping keys other than strings | | | |
@@ -262,7 +262,7 @@ The rules with the following star :star: are included in the config.
262262
| [yml/flow-sequence-bracket-spacing](https://ota-meshi.github.io/eslint-plugin-yml/rules/flow-sequence-bracket-spacing.html) | enforce consistent spacing inside flow sequence brackets | :wrench: | | :star: |
263263
| [yml/key-spacing](https://ota-meshi.github.io/eslint-plugin-yml/rules/key-spacing.html) | enforce consistent spacing between keys and values in mapping pairs | :wrench: | | :star: |
264264
| [yml/no-irregular-whitespace](https://ota-meshi.github.io/eslint-plugin-yml/rules/no-irregular-whitespace.html) | disallow irregular whitespace | | :star: | :star: |
265-
| [yml/no-multiple-empty-lines](https://ota-meshi.github.io/eslint-plugin-yml/rules/no-multiple-empty-lines.html) | disallow multiple empty lines | :wrench: | | |
265+
| [yml/no-multiple-empty-lines](https://ota-meshi.github.io/eslint-plugin-yml/rules/no-multiple-empty-lines.html) | disallow multiple empty lines | :wrench: | | :star: |
266266
| [yml/spaced-comment](https://ota-meshi.github.io/eslint-plugin-yml/rules/spaced-comment.html) | enforce consistent spacing after the `#` in a comment | :wrench: | | :star: |
267267

268268
<!--RULES_TABLE_END-->

‎docs/.vitepress/theme/components/state/deserialize.js‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ export function deserializeState(serializedString) {
1616
}
1717

1818
try {
19-
// eslint-disable-next-line n/no-unsupported-features/node-builtins -- Used in browser
2019
const decodedText = window.atob(serializedString);
2120
const json = (() => {
2221
let error;

‎docs/.vitepress/theme/components/state/serialize.js‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ export function serializeState(state) {
2929
const uint8Arr = new TextEncoder().encode(jsonString);
3030
const compressedString = String.fromCharCode(...pako.deflate(uint8Arr));
3131
const base64 =
32-
// eslint-disable-next-line n/no-unsupported-features/node-builtins -- Used in browser
3332
(typeof window !== "undefined" && window.btoa(compressedString)) ||
3433
compressedString;
3534

‎docs/rules/block-mapping-colon-indicator-newline.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ since: "v1.2.0"
1010

1111
> enforce consistent line breaks after `:` indicator
1212
13+
- :gear: This rule is included in `"plugin:yml/standard"`.
1314
- :wrench: The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems) can automatically fix some of the problems reported by this rule.
1415

1516
## :book: Rule Details

‎docs/rules/index.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ sidebarDepth: 0
55
# Available Rules
66

77
The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems) automatically fixes problems reported by rules which have a wrench :wrench: below.
8-
The rules with the following star :star: are included in the `plugin:yml/recommended` config.
8+
The rules with the following star :star: are included in the `plugin:yml/recommended` or `plugin:yml/standard` config.
99

1010
<!-- This file is automatically generated in tools/update-docs-rules-index.js, do not change! -->
1111

1212
## YAML Rules
1313

1414
| Rule ID | Description | Fixable | RECOMMENDED | STANDARD |
1515
|:--------|:------------|:-------:|:-----------:|:--------:|
16-
| [yml/block-mapping-colon-indicator-newline](./block-mapping-colon-indicator-newline.md) | enforce consistent line breaks after `:` indicator | :wrench: | | |
16+
| [yml/block-mapping-colon-indicator-newline](./block-mapping-colon-indicator-newline.md) | enforce consistent line breaks after `:` indicator | :wrench: | | :star: |
1717
| [yml/block-mapping-question-indicator-newline](./block-mapping-question-indicator-newline.md) | enforce consistent line breaks after `?` indicator | :wrench: | | :star: |
1818
| [yml/block-mapping](./block-mapping.md) | require or disallow block style mappings. | :wrench: | | :star: |
1919
| [yml/block-sequence-hyphen-indicator-newline](./block-sequence-hyphen-indicator-newline.md) | enforce consistent line breaks after `-` indicator | :wrench: | | :star: |
@@ -26,7 +26,7 @@ The rules with the following star :star: are included in the `plugin:yml/recomme
2626
| [yml/no-empty-mapping-value](./no-empty-mapping-value.md) | disallow empty mapping values | | :star: | :star: |
2727
| [yml/no-empty-sequence-entry](./no-empty-sequence-entry.md) | disallow empty sequence entries | | :star: | :star: |
2828
| [yml/no-tab-indent](./no-tab-indent.md) | disallow tabs for indentation. | | :star: | :star: |
29-
| [yml/no-trailing-zeros](./no-trailing-zeros.md) | disallow trailing zeros for floats | :wrench: | | |
29+
| [yml/no-trailing-zeros](./no-trailing-zeros.md) | disallow trailing zeros for floats | :wrench: | | :star: |
3030
| [yml/plain-scalar](./plain-scalar.md) | require or disallow plain style scalar. | :wrench: | | :star: |
3131
| [yml/quotes](./quotes.md) | enforce the consistent use of either double, or single quotes | :wrench: | | :star: |
3232
| [yml/require-string-key](./require-string-key.md) | disallow mapping keys other than strings | | | |
@@ -44,5 +44,5 @@ The rules with the following star :star: are included in the `plugin:yml/recomme
4444
| [yml/flow-sequence-bracket-spacing](./flow-sequence-bracket-spacing.md) | enforce consistent spacing inside flow sequence brackets | :wrench: | | :star: |
4545
| [yml/key-spacing](./key-spacing.md) | enforce consistent spacing between keys and values in mapping pairs | :wrench: | | :star: |
4646
| [yml/no-irregular-whitespace](./no-irregular-whitespace.md) | disallow irregular whitespace | | :star: | :star: |
47-
| [yml/no-multiple-empty-lines](./no-multiple-empty-lines.md) | disallow multiple empty lines | :wrench: | | |
47+
| [yml/no-multiple-empty-lines](./no-multiple-empty-lines.md) | disallow multiple empty lines | :wrench: | | :star: |
4848
| [yml/spaced-comment](./spaced-comment.md) | enforce consistent spacing after the `#` in a comment | :wrench: | | :star: |

‎docs/rules/no-multiple-empty-lines.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ since: "v0.12.0"
1010

1111
> disallow multiple empty lines
1212
13+
- :gear: This rule is included in `"plugin:yml/standard"`.
1314
- :wrench: The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems) can automatically fix some of the problems reported by this rule.
1415

1516
## :book: Rule Details

‎docs/rules/no-trailing-zeros.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ since: "v1.6.0"
1010

1111
> disallow trailing zeros for floats
1212
13+
- :gear: This rule is included in `"plugin:yml/standard"`.
1314
- :wrench: The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems) can automatically fix some of the problems reported by this rule.
1415

1516
## :book: Rule Details

‎src/configs/flat/standard.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export default [
88
{
99
rules: {
1010
// eslint-plugin-yml rules
11+
"yml/block-mapping-colon-indicator-newline": "error",
1112
"yml/block-mapping-question-indicator-newline": "error",
1213
"yml/block-mapping": "error",
1314
"yml/block-sequence-hyphen-indicator-newline": "error",
@@ -23,7 +24,9 @@ export default [
2324
"yml/no-empty-mapping-value": "error",
2425
"yml/no-empty-sequence-entry": "error",
2526
"yml/no-irregular-whitespace": "error",
27+
"yml/no-multiple-empty-lines": "error",
2628
"yml/no-tab-indent": "error",
29+
"yml/no-trailing-zeros": "error",
2730
"yml/plain-scalar": "error",
2831
"yml/quotes": "error",
2932
"yml/spaced-comment": "error",

‎src/configs/standard.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export = {
88
extends: [baseExtend],
99
rules: {
1010
// eslint-plugin-yml rules
11+
"yml/block-mapping-colon-indicator-newline": "error",
1112
"yml/block-mapping-question-indicator-newline": "error",
1213
"yml/block-mapping": "error",
1314
"yml/block-sequence-hyphen-indicator-newline": "error",
@@ -23,7 +24,9 @@ export = {
2324
"yml/no-empty-mapping-value": "error",
2425
"yml/no-empty-sequence-entry": "error",
2526
"yml/no-irregular-whitespace": "error",
27+
"yml/no-multiple-empty-lines": "error",
2628
"yml/no-tab-indent": "error",
29+
"yml/no-trailing-zeros": "error",
2730
"yml/plain-scalar": "error",
2831
"yml/quotes": "error",
2932
"yml/spaced-comment": "error",

0 commit comments

Comments
 (0)