Skip to content

Instantly share code, notes, and snippets.

@kexline4710
Created November 16, 2022 15:23
Show Gist options
  • Save kexline4710/ac641696da94b5a08f16a928115543b4 to your computer and use it in GitHub Desktop.
Save kexline4710/ac641696da94b5a08f16a928115543b4 to your computer and use it in GitHub Desktop.
module.exports = {
meta: {
type: "suggestion",
docs: {
description: "Enforce Brandon and Ashlynn as unified function",
recommended: true,
url: "https://eslint.org/docs/rules/together-forever"
},
schema: []
},
create: (context) => ({
FunctionDeclaration(node) {
if (node.id.name === "brandon") {
context.report({
node: node,
message: "Append this function with 'AndAshlynn'"
})
}
}
}
};
@atareshawty
Copy link

I added this to the herbie web project and needed to fix a small syntax error ⬇️

'use strict';

module.exports = {
	meta: {
		type: 'suggestion',
		docs: {
			description: 'Enforce Brandon and Ashlynn as unified function',
			recommended: true,
			url: 'https://eslint.org/docs/rules/together-forever',
		},
		schema: [],
	},
	create: (context) => ({
		FunctionDeclaration: (node) => {
			if (node.id.name === 'brandon') {
				context.report({
					node,
					message: "Append this function with 'AndAshlynn'",
				});
			}
		},
	}),
};

@sullivanashton
Copy link

sullivanashton commented Nov 16, 2022

I LOVE THIS SO MUCH 😍

Do you know of any styling preferences he has around quotations/indentations/other? PUT YOUR NITPICKY BRANDON HATS ON. Is there aannnnnyyyything here that would bother the crap out of him?

If you compare this to Brandon's published eslint config, I think you're all set! He's a pretty big comment guy, so it might fun to slip one in there somewhere? (or maybe a TODO 🤔 )

Long shot, but do you happen to know any details about his terminal styling? I can picture it in my head, but will likely just go with a dark mode styling (dark charcoal background, light foreground) if I don't have those details.

Based on the pics I sent in the text thread, my guess is that he uses a portion of the One Dark Pro theme?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment