generated from obsidianmd/obsidian-sample-plugin
-
Notifications
You must be signed in to change notification settings - Fork 1
[Feature] Add Prettier + ESLint for automatic code formatting and linting #22
Copy link
Copy link
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationenhancementNew feature or requestNew feature or request
Milestone
Description
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
.prettierrcand.eslintrcfiles with project-specific rules. - Add
formatandlintscripts inpackage.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" }
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationenhancementNew feature or requestNew feature or request
Type
Projects
Status
Done