Feat/shell script formatter#79
Open
farhanmallik05 wants to merge 2 commits intobetterbugs:developfrom
Open
Conversation
…ion logic, and associated UI styling.
Resolves betterbugs#52. Implements a Shell Script Formatter using @wasm-fmt/shfmt, Monaco editor for syntax highlighting, and an integrated basic linter.
Collaborator
|
rebase with latest develop branch |
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.