Skip to content

chore: add pre-commit configuration and various linting settings for improved code quality - #19

Merged
Ajimaru merged 1 commit into
devfrom
chore/pre-commit-hooks
Dec 2, 2026
Merged

Ajimaru merged 1 commit into
devfrom
chore/pre-commit-hooks

Conversation

@Ajimaru

@Ajimaru Ajimaru commented Dec 2, 2026

Copy link
Copy Markdown
Owner

This pull request introduces a standardized linting and formatting setup across the codebase, aligning with OctoPrint core and plugin best practices. It adds configuration files for tools like pre-commit, isort, prettier, and djlint, and updates the CI workflow to use pre-commit for linting. Minor code cleanups and translation improvements are also included.

Linting and Formatting Standardization:

  • Added .pre-commit-config.yaml to define a consistent set of linting and formatting hooks (including Ruff, isort, djlint, codespell, prettier, and shellcheck) for local and CI use.
  • Introduced .isort.cfg, .prettierrc.yaml, .prettierignore, and .djlintrc to configure import sorting, code formatting, and template linting across the project. [1] [2] [3] [4]
  • Updated pyproject.toml to use pre-commit instead of ruff in the development dependencies.

CI Workflow Improvements:

  • Switched the CI linting step from ruff to pre-commit, removed manual Node/ShellCheck setup, and improved Codacy coverage upload handling. [1] [2] [3] [4] [5]

Developer Experience:

  • Updated README.md to instruct developers to install pre-commit hooks for consistent local linting and formatting.

Code and Template Cleanups:

Editor and Linter Config Updates:

  • Updated .editorconfig to remove the Python-specific max line length setting, unifying formatting rules.

@Ajimaru Ajimaru self-assigned this Dec 2, 2026
@Ajimaru Ajimaru added chore Maintenance work with no user-facing change ci CI, build or workflow changes labels Dec 2, 2026
@coderabbitai

coderabbitai Bot commented Dec 2, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 558466fc-2607-4206-bd12-0958ab42c3be

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@codecov

codecov Bot commented Dec 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@Ajimaru
Ajimaru merged commit 7ca18dd into dev Dec 2, 2026
23 checks passed
@Ajimaru
Ajimaru deleted the chore/pre-commit-hooks branch December 2, 2026 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Maintenance work with no user-facing change ci CI, build or workflow changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant