0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-31 13:02:38 +00:00

Hide conflicting lint rules

This commit is contained in:
Trevor Buckner
2025-09-11 10:56:44 -04:00
parent d728126bcc
commit 5ede32ccac
2 changed files with 3 additions and 4 deletions

View File

@@ -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, ""),