From 5ede32ccacae1382deb44cb625414d84fcaca8d6 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Thu, 11 Sep 2025 10:56:44 -0400 Subject: [PATCH] Hide conflicting lint rules --- eslint.config.mjs | 4 ++-- eslint_plugins/rules/aligned-useState-pairs.js | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 73644d633..4aff21ebc 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -47,9 +47,9 @@ export default [{ "semi" : ["warn", "always"], /** Whitespace **/ - "array-bracket-spacing" : ["warn", "never"], + //"array-bracket-spacing" : ["warn", "never"], "arrow-spacing" : ["warn", { before: false, after: false }], - "comma-spacing" : ["warn", { before: false, after: true }], + //"comma-spacing" : ["warn", { before: false, after: true }], "indent" : ["warn", "tab", { MemberExpression: "off" }], "linebreak-style" : "off", "no-trailing-spaces" : "warn", diff --git a/eslint_plugins/rules/aligned-useState-pairs.js b/eslint_plugins/rules/aligned-useState-pairs.js index 53b4e8749..f5a58ad34 100644 --- a/eslint_plugins/rules/aligned-useState-pairs.js +++ b/eslint_plugins/rules/aligned-useState-pairs.js @@ -73,6 +73,7 @@ export default { pos.comma !== maxComma || pos.closing !== maxClosing ) { + console.log(context); context.report({ node: pos.node, message: "useState pair is not aligned with others in its block.", @@ -86,8 +87,6 @@ export default { const paddedLeft = left.padEnd(maxComma - 1); const paddedRight = right.padEnd(maxClosing - maxComma - 2); const aligned = `[${paddedLeft}, ${paddedRight}] = useState(${value})`; - console.log("Pre: " + text); - console.log("Post: " + aligned); return [ fixer.replaceText(pos.node, aligned), fixer.insertTextBefore(pos.node.parent, ""),