Skip to content

[Feature] Add Prettier + ESLint for automatic code formatting and linting #22

@soler1212

Description

@soler1212

Description

Implement automatic code formatting and linting using Prettier and ESLint to ensure consistent code style and reduce manual formatting effort across the codebase.

This will help:

  • Maintain a clean and readable codebase.
  • Catch potential errors early with linting.
  • Enforce consistent formatting automatically, reducing style-based review comments.

Tasks

  • Install Prettier and ESLint as dev dependencies.
  • Configure .prettierrc and .eslintrc files with project-specific rules.
  • Add format and lint scripts in package.json.
  • Optionally integrate with editors (e.g., VSCode, Neovim) for format-on-save.
  • Optionally add pre-commit hooks for auto-format and lint.
  • Document usage in README.md.

Example Scripts (package.json)

"scripts": { "format": "prettier --write .", "lint": "eslint . --ext .js,.jsx,.ts,.tsx" }

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationenhancementNew feature or request

Type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions