From 4c4bd1c6dbb6f173f29c0d0a074f1ba7a7d34c65 Mon Sep 17 00:00:00 2001 From: Mestery Date: Sat, 29 Jan 2022 21:28:47 +0100 Subject: [PATCH] build: extend yamllint configuration This makes the configuration of yamllint stricter. For example, single quote is imposed and only when necessary. PR-URL: https://github.com/nodejs/node/pull/41756 Reviewed-By: Antoine du Hamel Reviewed-By: Luigi Pinca Reviewed-By: Tierney Cyren --- .yamllint.yaml | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/.yamllint.yaml b/.yamllint.yaml index 97ec306ea3f..c8e63ec7220 100644 --- a/.yamllint.yaml +++ b/.yamllint.yaml @@ -1,9 +1,40 @@ extends: default rules: - document-start: + braces: + min-spaces-inside: 0 + max-spaces-inside: 1 + min-spaces-inside-empty: 0 + max-spaces-inside-empty: 0 + + brackets: + min-spaces-inside: 0 + max-spaces-inside: 1 + min-spaces-inside-empty: 0 + max-spaces-inside-empty: 0 + + comments-indentation: + level: error + + document-end: present: false + + document-start: + level: error + present: false + + empty-lines: + max: 1 + + indentation: + spaces: 2 + line-length: disable + + quoted-strings: + quote-type: single + required: only-when-needed + truthy: allowed-values: ['true', 'false', 'on', 'off']