-
-
Notifications
You must be signed in to change notification settings - Fork 18
Switch from Standardjs to Prettier #355
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR migrates the JavaScript linting setup from StandardJS to Prettier for code formatting. The change removes the StandardJS linter dependency and replaces it with Prettier configuration integrated into pre-commit hooks.
Key Changes
- Removed StandardJS from devDependencies and npm scripts
- Added Prettier configuration to package.json with semicolon-free style
- Integrated Prettier into pre-commit hooks for automated formatting
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| package.json | Removes lint:js script and standard dependency; adds Prettier configuration with semi: false option |
| .pre-commit-config.yaml | Adds local Prettier hook with check/write flags and configuration reference |
| .github/workflows/ci.yml | Removes dedicated js-lint job and its dependency from the test job |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| hooks: | ||
| - id: prettier | ||
| name: prettier | ||
| entry: prettier --check --write --ignore-unknown |
Copilot
AI
Dec 18, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pre-commit hook configuration uses both "--check" and "--write" flags together. These flags are contradictory: "--check" is for checking formatting without modifying files (exits with error if files need formatting), while "--write" modifies files in place. For a pre-commit hook, you should use only "--check" to verify formatting, or only "--write" to automatically format files, but not both.
| entry: prettier --check --write --ignore-unknown | |
| entry: prettier --check --ignore-unknown |
| args: | ||
| - --config=package.json | ||
| language: node |
Copilot
AI
Dec 18, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "args" configuration is redundant because "--config=package.json" is already being passed in the "entry" field. This duplication could cause the config argument to be passed twice, potentially leading to unexpected behavior.
| "test": "node --test --experimental-test-coverage" | ||
| }, | ||
| "prettier": { | ||
| "semi": false |
Copilot
AI
Dec 18, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trailing comma syntax error in JSON. The "prettier" object has a trailing comma after "semi": false, which is not valid JSON syntax and will cause parsing errors.
| "semi": false | |
| "semi": false |
No description provided.