From a19a5f5e13043316d4dae7b072b583edbc1bb8f8 Mon Sep 17 00:00:00 2001 From: Katie Byers Date: Fri, 3 Dec 2021 14:55:49 -0800 Subject: [PATCH] update spaced-comment rule --- packages/eslint-config-sdk/src/index.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/packages/eslint-config-sdk/src/index.js b/packages/eslint-config-sdk/src/index.js index 8824f0540c18..b3f7a5d7cb64 100644 --- a/packages/eslint-config-sdk/src/index.js +++ b/packages/eslint-config-sdk/src/index.js @@ -215,7 +215,22 @@ module.exports = { 'max-lines': 'error', // We should require a whitespace beginning a comment - 'spaced-comment': 'error', + 'spaced-comment': [ + 'error', + 'always', + { + line: { + // this lets us use triple-slash directives + markers: ['/'], + }, + block: { + // comments of the form /* ..... */ should always have whitespace before the closing `*/` marker... + balanced: true, + // ... unless they're jsdoc-style block comments, which end with `**/` + exceptions: ['*'], + }, + }, + ], // Disallow usage of bitwise operators - this makes it an opt in operation 'no-bitwise': 'error',