code-structure
Installation
SKILL.md
Code Structure Conventions
Follow these conventions when writing or restructuring modules.
Avoid eslint-disable; Restructure Instead
Prefer restructuring code to eliminate lint violations rather than suppressing them. However, use a targeted eslint-disable-next-line with a reason comment when the violation IS the intended behavior (e.g. in-place mutation in a function whose purpose is mutation) and restructuring would just be cosmetic indirection hiding the same operation from the linter.
// Good — pass the recursive function as a parameter to break the cycle
const PLUGINS: Record<string, Plugin> = {
markdown: {
render: (content, renderChild) => {
content.sections.forEach((s) => renderChild(s));
},
},
};