Skip to content

Standardize/enforce code formatting on the project #2012

@brettcannon

Description

@brettcannon

Prescribed Solution:

  • Format all of the extension code
    • Python (using black)
    • js, jsx, ts, tsx, json, css, less, sass (using prettier)
  • Format on commit
  • Format on save (user settings, opt in using)
    • Use prettier extension
    • Use python extension with black
  • Recommend prettier extension in .vscode/extensions.json
    • Use prettier extension
    • Use python extension with black
  • Prettier Config settings
    • Prettier rc config (editor agnostic, also picked by CI)
    • .vscode/settings
  • CI check for all pipelines (black & prettier)
    • PR pipeline
    • CI Pipeline
  • Update contributing guide
  • Configure prettier to use tslint (ensure this works on CI)
    • TIP - Look for prettier plugins (plenty good ones)
~Set up [pre-commit](https://pre-commit.com/) and some [hooks](https://pre-commit.com/hooks.html) for anything which runs quickly:~

.. etc.

Metadata

Metadata

Labels

area-editor-*User-facing catch-alldebtCovers everything internal: CI, testing, refactoring of the codebase, etc.good first issueimportantIssue identified as high-prioritymetaIssue that is tracking an overall project

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions