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:
@@ -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",
|
||||
|
||||
@@ -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, ""),
|
||||
|
||||
Reference in New Issue
Block a user