Feat/shell script formatter#79
Closed
farhanmallik05 wants to merge 1 commit intobetterbugs:developfrom
Closed
Conversation
Collaborator
|
rebase with latest develop branch |
129d526 to
6d2c149
Compare
SyedFahad7
requested changes
Mar 9, 2026
Collaborator
SyedFahad7
left a comment
There was a problem hiding this comment.
Thanks for the Shell Formatter work. I reviewed this update and there are still scope blockers.
Requested changes before approval:
- Keep this PR focused to Shell Script Formatter only
app/page.tsxcurrently includes search/categorization/highlight behavior changes (HighlightText,<mark>, category classification updates, keyboard shortcut handling, broader search matching).app/developmentToolsStyles.module.scssadds search highlight/keyboard hint styles.
These are unrelated to shell formatter and should be moved to a separate PR as requested earlier.
- Formatter options are not wired to shfmt
- In
shellFormatter.tsx, options are captured in state, butshfmt.format(input)is called without applying those options.
Please either: - wire options into shfmt formatting call, or
- remove non-functional options from UI for now.
- Remove debug file from PR
test-shfmt.jsshould not be part of this feature PR.
Also please rebase on latest develop (instead of merge commit) and force-push cleaned history.
…ion logic, and associated UI styling.
0e6c060 to
b8d521f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Resolves #52
This PR implements a new development tool: Shell Script (Bash/Sh) Formatter, along with a basic linter to catch common shell script pitfalls. It provides a basic web-based interface for developers to paste, review, and format their shell scripts cleanly.
Key Changes
@wasm-fmt/shfmtto run the powerfulshfmtengine directly in the browser via WebAssembly.shellFormatter.tsx):Monaco Editorfor clean input and output syntax highlighting of bash/shell code.SC2086(Unquoted variables),SC2006(Legacy backticks),SC2046(Unquoted command substitutions),SC2164(Unsafecdwithout fallbacks),SC2115(Dangerousrm -rfvariables), andSC2059(Direct variable prints inprintf).experiments.asyncWebAssembly: truetonext.config.jsto enable seamless bundling of the.wasmbinary within Next.js 14 production builds.constants.tsx,developmentToolsConstant.tsx):Category178.developmentToolsRoutesandPATHSfor the/shell-script-formatterroute.Testing Done
npm run lintandnpm run buildlocally, ensuring successful static page generation without webpack compilation errors.