0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-28 20:03:02 +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

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

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