Code Style
Style guides and tooling configuration for the project.
Python
Formatter: pyink
Google's Python formatter configured in pyproject.toml:
[tool.pyink]
line-length = 80
target-version = ["py312"]
Linter: pylint
[tool.pylint.main]
ignore = ["tests", ".venv"]
[tool.pylint.format]
max-line-length = 80
[tool.pylint.messages_control]
disable = [
"C0114", # missing-module-docstring
"C0115", # missing-class-docstring
"C0116", # missing-function-docstring
"R0903", # too-few-public-methods
"R0801", # duplicate-code
]
Conventions
- Type hints: All public functions must have type annotations
- Docstrings: Classes and public methods should have docstrings (Google style)
- Naming:
snake_casefor functions/variables,PascalCasefor classes - Imports: Standard library → third-party → local, alphabetical within groups
- Async: Use
async/awaitthroughout; never mix with sync I/O
TypeScript
ESLint
Configured in mcp-webui/eslint.config.mjs with Next.js defaults.
TypeScript Config
Strict mode enabled:
{
"compilerOptions": {
"strict": true,
"noEmit": true
}
}
Conventions
- Interfaces over types for public APIs
- Explicit return types on exported functions
- No
anywithout a comment explaining why - Use
as constfor literal types - Prefer
?.and??over nested ternary operators
Commit Messages
Follow conventional commits:
feat: add Obsidian MCP wikilink resolutionfix: prevent path traversal in safe_resolve_pathdocs: expand permission engine documentationrefactor: extract audit logger to separate moduletest: add tests for command injection prevention
Branch Naming
feat/<description>for featuresfix/<description>for fixesdocs/<description>for documentationrefactor/<description>for refactoring