# codefmt > format + lint for automation code ## what is codefmt? codefmt is a free, online code formatter and linter for developers who write javascript, python, and hubl in automation platforms. it handles platform-specific code wrapping automatically so standard formatters don't fail on your code. installable as a PWA. ## why does it exist? automation platforms wrap user code in async functions and inject runtime globals (inputData, $input, steps, bundle, etc.). standard formatters and linters either fail to parse this code or produce false positives. codefmt wraps your code in the correct platform-specific structure before formatting, then strips the wrapper before returning the result. ## supported platforms ### javascript - zapier — globals: inputData, z, fetch, console, _ (lodash) - n8n — globals: $input, $node, $json, $workflow, items. modes: all items, each item. typescript supported - pipedream — globals: steps, $, event, defineComponent. types: action, source, code step. typescript supported - make (integromat) — globals: bundle, connection, module. types: action, search, trigger, aggregator - hubspot operations hub — globals: event, hubspot, axios, properties. styles: callback, return ### python - zapier — globals: input_data, output, store, requests - n8n — globals: _items (all items mode), _item (each item mode) - pipedream — globals: pd (pipedream context object) ### hubl (hubspot cms) - template language formatting + linting - supports {% %} tags, {{ }} expressions, {# #} comments - lints for unclosed blocks, mismatched tags, deprecated tags ## formatter engines - javascript: oxfmt (rust-based, prettier-compatible) - javascript linting: oxlint (rust-based, 50-100x faster than eslint) - python: ruff (rust-based, black-compatible, 500+ lint rules) - hubl: custom-built formatter and linter ## javascript lint plugins (oxlint) - promise: floating promises, unnecessary await, misuse - node: deprecated APIs, missing error handling - security: eval, unsafe regex, prototype pollution - performance: unnecessary spread, regex in hot paths - typescript: type-aware lint rules (n8n, pipedream) - react: hooks rules, JSX best practices - unicorn: modern JS best practices - no-console: flag console.log usage ## python lint rules (ruff) - F (pyflakes): unused imports, undefined names - E (pycodestyle): PEP 8 style errors - W (warnings): trailing whitespace, deprecated syntax - I (isort): import sorting - UP (pyupgrade): modernize syntax - B (bugbear): mutable defaults, likely bugs - N (naming): PEP 8 naming conventions - S (security): hardcoded passwords, eval, SQL injection - C4 (comprehensions): simplify comprehensions - SIM (simplify): simplify expressions - RUF (ruff): ruff-specific rules ## how it works 1. user pastes code and selects platform + language 2. codefmt wraps code in platform-specific structure (async function for JS, def wrapper with globals as params for python) 3. runs formatter (oxfmt for JS, ruff for python, custom for hubl) 4. runs linter (oxlint for JS, ruff for python, custom for hubl) 5. strips wrapper, adjusts diagnostic line numbers, returns clean code + diagnostics 6. for python: smart indent normalization handles code pasted with inconsistent whitespace ## features - format on paste: auto-format when code is pasted - auto-format: format as you type (500ms debounce) - diff view: side-by-side comparison of input vs output - share snippets: URL-encoded sharing with settings - command palette: cmd+k for all actions - revert: undo formatting and restore original input - configurable: indent, quotes, semicolons, line width, lint rules - privacy-first: no accounts, no cookies, no tracking. anonymous analytics via plausible ## technology - framework: next.js 16 (react 19, react compiler) - deployment: vercel - installable: PWA with web app manifest ## urls - home: https://codefmt.dev - zapier: https://codefmt.dev/zapier - n8n: https://codefmt.dev/n8n - pipedream: https://codefmt.dev/pipedream - make: https://codefmt.dev/make - hubspot: https://codefmt.dev/hubspot - hubl: https://codefmt.dev/hubl - python: https://codefmt.dev/python - about: https://codefmt.dev/about