Skip to content

Automatic code formatting for notebooks #1255

@mofojed

Description

@mofojed

As a user, I want automatic code formatting in my notebooks so that my code looks pretty.

I would like to have formatting applied by something like black: https://github.com/psf/black.

Ruff wasm Python formatter and linter:

  • if we are building it, need an action to do so and keep it updated, else adopt an active npm version
    (https://github.com/dprint/dprint-plugin-ruff has automation to self update and publish new versions, so maybe use that one?)
  • Should be lazy loaded
  • New settings menu section: "Editor" with options: for formatting on save and lint rules (via a code editor with ruff linting rules they have on the playground?)
  • Format button in notebook overflow, and context menu
  • Settings must be configurable in enterprise by a prop so that orgs can enforce which linting rules apply globally

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions