-
-
Notifications
You must be signed in to change notification settings - Fork 30
feat(sh): use sh-syntax
without experimental flag, remove mvdan-sh
support
#430
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
…, remove `mvdan-sh` support
🦋 Changeset detectedLatest commit: 93cf483 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
WalkthroughThis pull request introduces a series of updates across configuration files, documentation, and code. It adds a new changelog entry, updates linting and build configurations, and adjusts dependency versions. Documentation for shell parser options has been enhanced, with several options made optional and new ones added, while comment styles are standardized across files. Significant refactoring in the shell parser’s error handling flow simplifies interfaces and test assertions. Changes
Suggested reviewers
Poem
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Report too large to display inline |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
prettier-plugin-autocorrect
prettier-plugin-pkg
prettier-plugin-sql
prettier-plugin-sh
prettier-plugin-toml
commit: |
size-limit report 📦
|
Deploy preview for prettier ready! ✅ Preview Built with commit 93cf483. |
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.
Actionable comments posted: 2
♻️ Duplicate comments (1)
packages/sh/test/shellscript.spec.ts (1)
14-21
: Same snapshot issue applies hereThe snapshot test for the experimental Wasm case is also failing for the same reason. The snapshots need to be updated for both test cases.
🧹 Nitpick comments (2)
packages/sh/README.md (2)
15-15
: Use clearer phrasing.The phrase "with powered by" is awkward. Suggest rewriting for clarity.
-This plugin is still under development, its printer just wraps [mvdan-sh][]'s default printer with powered by [sh-syntax][]. +This plugin is still under development; its printer just wraps [mvdan-sh][]'s default printer, which is powered by [sh-syntax][].
18-20
: Use “cannot” for more natural phrasing.-We can not do much on our side. +We cannot do much on our side.🧰 Tools
🪛 LanguageTool
[style] ~20-~20: Unless you want to emphasize “not”, use “cannot” which is more common.
Context: ...sage cases can be handled correctly. We can not do much on our side. ## Requirements ...(CAN_NOT_PREMIUM)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (3)
packages/sh/test/__snapshots__/fixtures.spec.ts.snap
is excluded by!**/*.snap
packages/sh/test/__snapshots__/shellscript.spec.ts.snap
is excluded by!**/*.snap
yarn.lock
is excluded by!**/yarn.lock
,!**/*.lock
📒 Files selected for processing (14)
.changeset/spotty-beds-applaud.md
(1 hunks).remarkrc
(1 hunks)eslint.config.js
(1 hunks)package.json
(3 hunks)packages/pkg/src/index.ts
(1 hunks)packages/pkg/src/rules/files.ts
(1 hunks)packages/pkg/src/rules/object.ts
(1 hunks)packages/pkg/src/rules/sort.ts
(1 hunks)packages/sh/README.md
(4 hunks)packages/sh/package.json
(1 hunks)packages/sh/src/index.ts
(7 hunks)packages/sh/test/fixtures.spec.ts
(2 hunks)packages/sh/test/shellscript.spec.ts
(1 hunks)scripts/languages.ts
(1 hunks)
🧰 Additional context used
🪛 LanguageTool
.changeset/spotty-beds-applaud.md
[uncategorized] ~5-~5: You might be missing the article “the” here.
Context: ... --- feat(sh): use sh-syntax
without experimental flag, remove mvdan-sh
support
(AI_EN_LECTOR_MISSING_DETERMINER_THE)
packages/sh/README.md
[uncategorized] ~16-~16: A comma is probably missing here.
Context: ...inter with powered by [sh-syntax][]. Of course it should just work, but may not match ...
(MISSING_COMMA_AFTER_INTRODUCTORY_PHRASE)
[style] ~20-~20: Unless you want to emphasize “not”, use “cannot” which is more common.
Context: ...sage cases can be handled correctly. We can not do much on our side. ## Requirements ...
(CAN_NOT_PREMIUM)
🪛 GitHub Check: Lint and Test with Node.js 18 on macos-latest
packages/sh/test/shellscript.spec.ts
[failure] 6-6: packages/sh/test/shellscript.spec.ts > fatal parse error with meaningful message
Error: Snapshot fatal parse error with meaningful message 1
mismatched
- Expected
-
Received
[SyntaxError: a command can only contain words and redirects; encountered )
-
1 | echo )
-
| ^]
-
1 | echo )
-
| ^]
❯ packages/sh/test/shellscript.spec.ts:6:3
packages/sh/test/fixtures.spec.ts
[failure] 27-27: packages/sh/test/fixtures.spec.ts > parser and printer > should format all fixtures
Error: Snapshot parser and printer > should format all fixtures > 146.ini 1
mismatched
- Expected
-
Received
"; can only immediately follow a statement
- 6 | disallow_untyped_defs = True
- 7 | disallow_any_generics = True
-
8 | ; disallow_any_unimported = True
-
| ^
- 9 | ; warn_redundant_casts = True
- 10 | ; warn_return_any = True
- 11 | ; warn_unused_configs = True"
- 6 | disallow_untyped_defs = True
- 7 | disallow_any_generics = True
-
8 | ; disallow_any_unimported = True
-
| ^
- 9 | ; warn_redundant_casts = True
- 10 | ; warn_return_any = True
- 11 | ; warn_unused_configs = True"
❯ packages/sh/test/fixtures.spec.ts:27:40
🪛 GitHub Check: Lint and Test with Node.js 22 on macos-latest
packages/sh/test/shellscript.spec.ts
[failure] 6-6: packages/sh/test/shellscript.spec.ts > fatal parse error with meaningful message
Error: Snapshot fatal parse error with meaningful message 1
mismatched
- Expected
-
Received
[SyntaxError: a command can only contain words and redirects; encountered )
-
1 | echo )
-
| ^]
-
1 | echo )
-
| ^]
❯ packages/sh/test/shellscript.spec.ts:6:3
packages/sh/test/fixtures.spec.ts
[failure] 27-27: packages/sh/test/fixtures.spec.ts > parser and printer > should format all fixtures
Error: Snapshot parser and printer > should format all fixtures > 146.ini 1
mismatched
- Expected
-
Received
"; can only immediately follow a statement
- 6 | disallow_untyped_defs = True
- 7 | disallow_any_generics = True
-
8 | ; disallow_any_unimported = True
-
| ^
- 9 | ; warn_redundant_casts = True
- 10 | ; warn_return_any = True
- 11 | ; warn_unused_configs = True"
- 6 | disallow_untyped_defs = True
- 7 | disallow_any_generics = True
-
8 | ; disallow_any_unimported = True
-
| ^
- 9 | ; warn_redundant_casts = True
- 10 | ; warn_return_any = True
- 11 | ; warn_unused_configs = True"
❯ packages/sh/test/fixtures.spec.ts:27:40
🪛 GitHub Check: Lint and Test with Node.js 18 on windows-latest
packages/sh/test/shellscript.spec.ts
[failure] 6-6: packages/sh/test/shellscript.spec.ts > fatal parse error with meaningful message
Error: Snapshot fatal parse error with meaningful message 1
mismatched
- Expected
-
Received
[SyntaxError: a command can only contain words and redirects; encountered )
-
1 | echo )
-
| ^]
-
1 | echo )
-
| ^]
❯ packages/sh/test/shellscript.spec.ts:6:3
packages/sh/test/fixtures.spec.ts
[failure] 27-27: packages/sh/test/fixtures.spec.ts > parser and printer > should format all fixtures
Error: Snapshot parser and printer > should format all fixtures > 146.ini 1
mismatched
- Expected
-
Received
"; can only immediately follow a statement
- 6 | disallow_untyped_defs = True
- 7 | disallow_any_generics = True
-
8 | ; disallow_any_unimported = True
-
| ^
- 9 | ; warn_redundant_casts = True
- 10 | ; warn_return_any = True
- 11 | ; warn_unused_configs = True"
- 6 | disallow_untyped_defs = True
- 7 | disallow_any_generics = True
-
8 | ; disallow_any_unimported = True
-
| ^
- 9 | ; warn_redundant_casts = True
- 10 | ; warn_return_any = True
- 11 | ; warn_unused_configs = True"
❯ packages/sh/test/fixtures.spec.ts:27:40
🪛 GitHub Check: Lint and Test with Node.js 22 on ubuntu-latest
packages/sh/test/shellscript.spec.ts
[failure] 6-6: packages/sh/test/shellscript.spec.ts > fatal parse error with meaningful message
Error: Snapshot fatal parse error with meaningful message 1
mismatched
- Expected
-
Received
[SyntaxError: a command can only contain words and redirects; encountered )
-
1 | echo )
-
| ^]
-
1 | echo )
-
| ^]
❯ packages/sh/test/shellscript.spec.ts:6:3
packages/sh/test/fixtures.spec.ts
[failure] 27-27: packages/sh/test/fixtures.spec.ts > parser and printer > should format all fixtures
Error: Snapshot parser and printer > should format all fixtures > 146.ini 1
mismatched
- Expected
-
Received
"; can only immediately follow a statement
- 6 | disallow_untyped_defs = True
- 7 | disallow_any_generics = True
-
8 | ; disallow_any_unimported = True
-
| ^
- 9 | ; warn_redundant_casts = True
- 10 | ; warn_return_any = True
- 11 | ; warn_unused_configs = True"
- 6 | disallow_untyped_defs = True
- 7 | disallow_any_generics = True
-
8 | ; disallow_any_unimported = True
-
| ^
- 9 | ; warn_redundant_casts = True
- 10 | ; warn_return_any = True
- 11 | ; warn_unused_configs = True"
❯ packages/sh/test/fixtures.spec.ts:27:40
🪛 GitHub Check: Lint and Test with Node.js 20 on macos-latest
packages/sh/test/shellscript.spec.ts
[failure] 6-6: packages/sh/test/shellscript.spec.ts > fatal parse error with meaningful message
Error: Snapshot fatal parse error with meaningful message 1
mismatched
- Expected
-
Received
[SyntaxError: a command can only contain words and redirects; encountered )
-
1 | echo )
-
| ^]
-
1 | echo )
-
| ^]
❯ packages/sh/test/shellscript.spec.ts:6:3
packages/sh/test/fixtures.spec.ts
[failure] 27-27: packages/sh/test/fixtures.spec.ts > parser and printer > should format all fixtures
Error: Snapshot parser and printer > should format all fixtures > 146.ini 1
mismatched
- Expected
-
Received
"; can only immediately follow a statement
- 6 | disallow_untyped_defs = True
- 7 | disallow_any_generics = True
-
8 | ; disallow_any_unimported = True
-
| ^
- 9 | ; warn_redundant_casts = True
- 10 | ; warn_return_any = True
- 11 | ; warn_unused_configs = True"
- 6 | disallow_untyped_defs = True
- 7 | disallow_any_generics = True
-
8 | ; disallow_any_unimported = True
-
| ^
- 9 | ; warn_redundant_casts = True
- 10 | ; warn_return_any = True
- 11 | ; warn_unused_configs = True"
❯ packages/sh/test/fixtures.spec.ts:27:40
🪛 GitHub Check: Lint and Test with Node.js 18 on ubuntu-latest
packages/sh/test/shellscript.spec.ts
[failure] 6-6: packages/sh/test/shellscript.spec.ts > fatal parse error with meaningful message
Error: Snapshot fatal parse error with meaningful message 1
mismatched
- Expected
-
Received
[SyntaxError: a command can only contain words and redirects; encountered )
-
1 | echo )
-
| ^]
-
1 | echo )
-
| ^]
❯ packages/sh/test/shellscript.spec.ts:6:3
packages/sh/test/fixtures.spec.ts
[failure] 27-27: packages/sh/test/fixtures.spec.ts > parser and printer > should format all fixtures
Error: Snapshot parser and printer > should format all fixtures > 146.ini 1
mismatched
- Expected
-
Received
"; can only immediately follow a statement
- 6 | disallow_untyped_defs = True
- 7 | disallow_any_generics = True
-
8 | ; disallow_any_unimported = True
-
| ^
- 9 | ; warn_redundant_casts = True
- 10 | ; warn_return_any = True
- 11 | ; warn_unused_configs = True"
- 6 | disallow_untyped_defs = True
- 7 | disallow_any_generics = True
-
8 | ; disallow_any_unimported = True
-
| ^
- 9 | ; warn_redundant_casts = True
- 10 | ; warn_return_any = True
- 11 | ; warn_unused_configs = True"
❯ packages/sh/test/fixtures.spec.ts:27:40
🪛 GitHub Check: Lint and Test with Node.js 20 on windows-latest
packages/sh/test/shellscript.spec.ts
[failure] 6-6: packages/sh/test/shellscript.spec.ts > fatal parse error with meaningful message
Error: Snapshot fatal parse error with meaningful message 1
mismatched
- Expected
-
Received
[SyntaxError: a command can only contain words and redirects; encountered )
-
1 | echo )
-
| ^]
-
1 | echo )
-
| ^]
❯ packages/sh/test/shellscript.spec.ts:6:3
packages/sh/test/fixtures.spec.ts
[failure] 27-27: packages/sh/test/fixtures.spec.ts > parser and printer > should format all fixtures
Error: Snapshot parser and printer > should format all fixtures > 146.ini 1
mismatched
- Expected
-
Received
"; can only immediately follow a statement
- 6 | disallow_untyped_defs = True
- 7 | disallow_any_generics = True
-
8 | ; disallow_any_unimported = True
-
| ^
- 9 | ; warn_redundant_casts = True
- 10 | ; warn_return_any = True
- 11 | ; warn_unused_configs = True"
- 6 | disallow_untyped_defs = True
- 7 | disallow_any_generics = True
-
8 | ; disallow_any_unimported = True
-
| ^
- 9 | ; warn_redundant_casts = True
- 10 | ; warn_return_any = True
- 11 | ; warn_unused_configs = True"
❯ packages/sh/test/fixtures.spec.ts:27:40
🪛 GitHub Check: Lint and Test with Node.js 20 on ubuntu-latest
packages/sh/test/shellscript.spec.ts
[failure] 6-6: packages/sh/test/shellscript.spec.ts > fatal parse error with meaningful message
Error: Snapshot fatal parse error with meaningful message 1
mismatched
- Expected
-
Received
[SyntaxError: a command can only contain words and redirects; encountered )
-
1 | echo )
-
| ^]
-
1 | echo )
-
| ^]
❯ packages/sh/test/shellscript.spec.ts:6:3
packages/sh/test/fixtures.spec.ts
[failure] 27-27: packages/sh/test/fixtures.spec.ts > parser and printer > should format all fixtures
Error: Snapshot parser and printer > should format all fixtures > 146.ini 1
mismatched
- Expected
-
Received
"; can only immediately follow a statement
- 6 | disallow_untyped_defs = True
- 7 | disallow_any_generics = True
-
8 | ; disallow_any_unimported = True
-
| ^
- 9 | ; warn_redundant_casts = True
- 10 | ; warn_return_any = True
- 11 | ; warn_unused_configs = True"
- 6 | disallow_untyped_defs = True
- 7 | disallow_any_generics = True
-
8 | ; disallow_any_unimported = True
-
| ^
- 9 | ; warn_redundant_casts = True
- 10 | ; warn_return_any = True
- 11 | ; warn_unused_configs = True"
❯ packages/sh/test/fixtures.spec.ts:27:40
🪛 GitHub Check: Lint and Test with Node.js 22 on windows-latest
packages/sh/test/shellscript.spec.ts
[failure] 6-6: packages/sh/test/shellscript.spec.ts > fatal parse error with meaningful message
Error: Snapshot fatal parse error with meaningful message 1
mismatched
- Expected
-
Received
[SyntaxError: a command can only contain words and redirects; encountered )
-
1 | echo )
-
| ^]
-
1 | echo )
-
| ^]
❯ packages/sh/test/shellscript.spec.ts:6:3
packages/sh/test/fixtures.spec.ts
[failure] 27-27: packages/sh/test/fixtures.spec.ts > parser and printer > should format all fixtures
Error: Snapshot parser and printer > should format all fixtures > 146.ini 1
mismatched
- Expected
-
Received
"; can only immediately follow a statement
- 6 | disallow_untyped_defs = True
- 7 | disallow_any_generics = True
-
8 | ; disallow_any_unimported = True
-
| ^
- 9 | ; warn_redundant_casts = True
- 10 | ; warn_return_any = True
- 11 | ; warn_unused_configs = True"
- 6 | disallow_untyped_defs = True
- 7 | disallow_any_generics = True
-
8 | ; disallow_any_unimported = True
-
| ^
- 9 | ; warn_redundant_casts = True
- 10 | ; warn_return_any = True
- 11 | ; warn_unused_configs = True"
❯ packages/sh/test/fixtures.spec.ts:27:40
🪛 GitHub Actions: CI
packages/sh/test/shellscript.spec.ts
[error] 6-6: Snapshot fatal parse error with meaningful message 1
mismatched
packages/sh/test/fixtures.spec.ts
[error] 27-27: Snapshot parser and printer > should format all fixtures > 146.ini 1
mismatched
🪛 markdownlint-cli2 (0.17.2)
packages/sh/README.md
103-103: Hard tabs
Column: 6
(MD010, no-hard-tabs)
149-149: Hard tabs
Column: 6
(MD010, no-hard-tabs)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Lint and Test with Node.js 22 on windows-latest
🔇 Additional comments (30)
packages/pkg/src/rules/sort.ts (1)
1-8
: Standardize Header Comment:
The header comment has been updated to a JSDoc-style format. This improves the consistency of documentation across the codebase without impacting functionality.packages/pkg/src/rules/object.ts (1)
1-8
: Consistent Documentation Format:
The header has been transitioned to JSDoc-style comments, aligning with recent updates in other modules. This change is purely cosmetic and enhances readability.packages/pkg/src/rules/files.ts (1)
1-8
: Update to JSDoc-Style Comments:
The revised header comment using JSDoc format promotes a uniform documentation style across the project. No functional changes are present.packages/pkg/src/index.ts (1)
1-8
: Unified Comment Formatting:
The header now employs JSDoc-style comments, consistent with the refactoring in other files. This improves overall maintainability and clarity in the documentation.scripts/languages.ts (1)
97-100
: Comment formatting updated to follow project style guidelines.The previously single-line comments have been converted to a multi-line comment block, which aligns with the new ESLint rule
@stylistic/js/multiline-comment-style
set tostarred-block
defined in the project's ESLint configuration.eslint.config.js (2)
2-3
: New linting plugins added to enhance code quality.The addition of
@stylistic/eslint-plugin-js
andeslint-plugin-tsdoc
will improve code style consistency and documentation quality.
10-19
: New linting rules improve code quality and consistency.The configuration adds two important rules:
@stylistic/js/multiline-comment-style
: Enforces consistent multi-line comment formattingtsdoc/syntax
: Ensures proper TSDoc documentation syntaxThese additions align with the PR objectives to improve code quality and standardize formatting.
.changeset/spotty-beds-applaud.md (1)
1-5
: Appropriate changelog entry for the feature change.The changelog entry accurately describes the transition from using
mvdan-sh
to usingsh-syntax
without the experimental flag, which aligns with the PR title and objectives.🧰 Tools
🪛 LanguageTool
[uncategorized] ~5-~5: You might be missing the article “the” here.
Context: ... --- feat(sh): usesh-syntax
without experimental flag, removemvdan-sh
support(AI_EN_LECTOR_MISSING_DETERMINER_THE)
.remarkrc (1)
3-11
: Enhanced Markdown linting configuration.The remark configuration has been updated to include the
lint-no-undefined-references
plugin with an exception for!WARNING
references. This improves documentation quality by ensuring references are valid while allowing for specific warning syntax.packages/sh/package.json (1)
53-53
: Update to dependency looks goodThe dependency update from
mvdan-sh
to using onlysh-syntax
at version^0.5.3
aligns with the PR objective to usesh-syntax
without the experimental flag and removemvdan-sh
support.packages/sh/test/shellscript.spec.ts (1)
3-3
: Import statement cleanup looks goodRemoving the
{ type IShParseError }
import aligns with removing themvdan-sh
dependency and simplifying error handling.package.json (2)
16-16
: Build script updateAdding
-e named
flag to the build script is a good improvement. This ensures named exports are preserved in the CommonJS output, which will provide better compatibility.
44-44
: Linting dependencies updateThe addition of
@stylistic/eslint-plugin-js
andeslint-plugin-tsdoc
helps improve code quality by enforcing stylistic rules and TSDoc comment format. These changes align well with the project's focus on code quality.Also applies to: 53-53
packages/sh/test/fixtures.spec.ts (2)
7-7
: Import simplification looks goodRemoving the
IShParseError
type import aligns with the rest of the codebase changes toward simpler error handling.
9-9
: Modern module metadata usageUsing
import.meta.dirname
directly is a great simplification from the previous conditional code. This leverages modern Node.js module features.packages/sh/README.md (2)
38-38
: References to known issues.These references appear helpful for users. No issues found.
247-247
:✅ Verification successful
Validate the new link.
Please ensure this link is alive and correct.
🏁 Script executed:
#!/bin/bash curl -I https://github.com/un-ts/sh-syntax | head -n 5Length of output: 717
Link in README is Validated
The link reference in
packages/sh/README.md
at line 247 correctly points tohttps://github.com/un-ts/sh-syntax
and returns an HTTP 200 response. No further modifications are required.packages/sh/src/index.ts (13)
15-16
: New interface extension looks good.Merging
ShOptions
withPartial<ParserOptions<Node>>
is aligned with the doc updates.
18-18
: Improved error handling.The new class-based error approach looks clear and robust.
50-62
: Enhanced parse configuration.Destructuring the new properties (e.g.,
recoverErrors
,stopAt
) and consolidating exception handling viaShSyntaxParseError
is consistent with the interface changes.
66-73
: Doc comment onhasPragma
.No concerns. This approach to avoid re-parsing is concise.
108-109
: Loc mapping approach.Using node offset positions for
locStart
andlocEnd
is a standard Prettier practice. Looks good.
126-126
: Allowing a known deprecation.The inline deprecation ignore is intentional and acceptable.
129-130
: New print options recognized.The
singleLine
andfunctionNextLine
properties are properly passed to the printer.
132-146
: Refactored printing logic.Forwarding all properties to
processor
ensures consistent formatting behavior.
277-279
: Expanded documentation onkeepPadding
.These clarifications about alignment behavior are helpful.
283-286
: Deprecation note forkeepPadding
.Informing users about its pending removal is valuable.
293-296
: Expandedminify
documentation.The explanation is clear about skipping extra spaces and comments.
299-308
: Single-line mode docs.A concise overview of how
singleLine
condenses code onto one line.
310-312
:functionNextLine
property addition.Placing function braces on the next line is consistent with user-settable style preferences.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #430 +/- ##
==========================================
+ Coverage 88.52% 88.55% +0.02%
==========================================
Files 10 10
Lines 183 166 -17
Branches 51 45 -6
==========================================
- Hits 162 147 -15
+ Misses 20 18 -2
Partials 1 1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
da5b21b
to
c7cbadc
Compare
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
.changeset/spotty-beds-applaud.md (1)
5-5
: Optional Grammar ImprovementConsider adding the definite article for clarity. If acceptable by the project's style, you might update the message to:
feat(sh): use \
sh-syntax` without the experimental flag, remove `mvdan-sh` support`
This makes the phrase read more naturally.🧰 Tools
🪛 LanguageTool
[uncategorized] ~5-~5: You might be missing the article “the” here.
Context: ... --- feat(sh): usesh-syntax
without experimental flag, removemvdan-sh
support Please...(AI_EN_LECTOR_MISSING_DETERMINER_THE)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
yarn.lock
is excluded by!**/yarn.lock
,!**/*.lock
📒 Files selected for processing (3)
.changeset/spotty-beds-applaud.md
(1 hunks).github/workflows/ci.yml
(1 hunks)package.json
(4 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- .github/workflows/ci.yml
- package.json
🧰 Additional context used
🪛 LanguageTool
.changeset/spotty-beds-applaud.md
[uncategorized] ~5-~5: You might be missing the article “the” here.
Context: ... --- feat(sh): use sh-syntax
without experimental flag, remove mvdan-sh
support Please...
(AI_EN_LECTOR_MISSING_DETERMINER_THE)
⏰ Context from checks skipped due to timeout of 90000ms (8)
- GitHub Check: Package Size Report
- GitHub Check: Lint and Test with Node.js 20 on macos-latest
- GitHub Check: Lint and Test with Node.js 20 on windows-latest
- GitHub Check: Lint and Test with Node.js 22 on windows-latest
- GitHub Check: Lint and Test with Node.js 18 on windows-latest
- GitHub Check: Lint and Test with Node.js 22 on windows-latest
- GitHub Check: Lint and Test with Node.js 20 on windows-latest
- GitHub Check: Lint and Test with Node.js 18 on windows-latest
🔇 Additional comments (2)
.changeset/spotty-beds-applaud.md (2)
1-3
: Header Format Looks GoodThe use of the YAML-like header section with the
---
markers and the upgrade declaration for"prettier-plugin-sh": minor
is consistent with expected changeset formatting.
7-7
: GitHub Issue Reference CheckThe linked GitHub issue
<https://github.com/mvdan/sh/issues/1145>
appears helpful for context on the changes. Confirm that the issue contains sufficient details for reviewers and users.
fb2efd1
to
b0bff08
Compare
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.
Caution
Inline review comments failed to post. This is likely due to GitHub's limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.
Actionable comments posted: 1
♻️ Duplicate comments (1)
packages/sh/test/fixtures.spec.ts (1)
26-26
:⚠️ Potential issueFix failing snapshot tests.
The simplified error handling approach is good, but it's causing snapshot test failures as shown in the static analysis. The error message format has changed with the new
sh-syntax
implementation.You need to update the snapshots to match the new error format:
# Update the failing snapshot tests yarn test -u🧰 Tools
🪛 GitHub Check: Lint and Test with Node.js 22 on ubuntu-latest
[failure] 26-26: packages/sh/test/fixtures.spec.ts > parser and printer > should format all fixtures
Error: Snapshotparser and printer > should format all fixtures > 146.ini 1
mismatched
- Expected
Received
"; can only immediately follow a statement
- 6 | disallow_untyped_defs = True
- 7 | disallow_any_generics = True
8 | ; disallow_any_unimported = True
| ^
- 9 | ; warn_redundant_casts = True
- 10 | ; warn_return_any = True
- 11 | ; warn_unused_configs = True"
- 6 | disallow_untyped_defs = True
- 7 | disallow_any_generics = True
8 | ; disallow_any_unimported = True
| ^
- 9 | ; warn_redundant_casts = True
- 10 | ; warn_return_any = True
- 11 | ; warn_unused_configs = True"
❯ packages/sh/test/fixtures.spec.ts:26:40
🪛 GitHub Check: Lint and Test with Node.js 22 on windows-latest
[failure] 26-26: packages/sh/test/fixtures.spec.ts > parser and printer > should format all fixtures
Error: Snapshotparser and printer > should format all fixtures > 146.ini 1
mismatched
- Expected
Received
"; can only immediately follow a statement
- 6 | disallow_untyped_defs = True
- 7 | disallow_any_generics = True
8 | ; disallow_any_unimported = True
| ^
- 9 | ; warn_redundant_casts = True
- 10 | ; warn_return_any = True
- 11 | ; warn_unused_configs = True"
- 6 | disallow_untyped_defs = True
- 7 | disallow_any_generics = True
8 | ; disallow_any_unimported = True
| ^
- 9 | ; warn_redundant_casts = True
- 10 | ; warn_return_any = True
- 11 | ; warn_unused_configs = True"
❯ packages/sh/test/fixtures.spec.ts:26:40
🪛 GitHub Check: Lint and Test with Node.js 20 on windows-latest
[failure] 26-26: packages/sh/test/fixtures.spec.ts > parser and printer > should format all fixtures
Error: Snapshotparser and printer > should format all fixtures > 146.ini 1
mismatched
- Expected
Received
"; can only immediately follow a statement
- 6 | disallow_untyped_defs = True
- 7 | disallow_any_generics = True
8 | ; disallow_any_unimported = True
| ^
- 9 | ; warn_redundant_casts = True
- 10 | ; warn_return_any = True
- 11 | ; warn_unused_configs = True"
- 6 | disallow_untyped_defs = True
- 7 | disallow_any_generics = True
8 | ; disallow_any_unimported = True
| ^
- 9 | ; warn_redundant_casts = True
- 10 | ; warn_return_any = True
- 11 | ; warn_unused_configs = True"
❯ packages/sh/test/fixtures.spec.ts:26:40
🪛 GitHub Check: Lint and Test with Node.js 18 on macos-latest
[failure] 26-26: packages/sh/test/fixtures.spec.ts > parser and printer > should format all fixtures
Error: Snapshotparser and printer > should format all fixtures > 146.ini 1
mismatched
- Expected
Received
"; can only immediately follow a statement
- 6 | disallow_untyped_defs = True
- 7 | disallow_any_generics = True
8 | ; disallow_any_unimported = True
| ^
- 9 | ; warn_redundant_casts = True
- 10 | ; warn_return_any = True
- 11 | ; warn_unused_configs = True"
- 6 | disallow_untyped_defs = True
- 7 | disallow_any_generics = True
8 | ; disallow_any_unimported = True
| ^
- 9 | ; warn_redundant_casts = True
- 10 | ; warn_return_any = True
- 11 | ; warn_unused_configs = True"
❯ packages/sh/test/fixtures.spec.ts:26:40
🪛 GitHub Check: Lint and Test with Node.js 22 on macos-latest
[failure] 26-26: packages/sh/test/fixtures.spec.ts > parser and printer > should format all fixtures
Error: Snapshotparser and printer > should format all fixtures > 146.ini 1
mismatched
- Expected
Received
"; can only immediately follow a statement
- 6 | disallow_untyped_defs = True
- 7 | disallow_any_generics = True
8 | ; disallow_any_unimported = True
| ^
- 9 | ; warn_redundant_casts = True
- 10 | ; warn_return_any = True
- 11 | ; warn_unused_configs = True"
- 6 | disallow_untyped_defs = True
- 7 | disallow_any_generics = True
8 | ; disallow_any_unimported = True
| ^
- 9 | ; warn_redundant_casts = True
- 10 | ; warn_return_any = True
- 11 | ; warn_unused_configs = True"
❯ packages/sh/test/fixtures.spec.ts:26:40
🪛 GitHub Check: Lint and Test with Node.js 20 on ubuntu-latest
[failure] 26-26: packages/sh/test/fixtures.spec.ts > parser and printer > should format all fixtures
Error: Snapshotparser and printer > should format all fixtures > 146.ini 1
mismatched
- Expected
Received
"; can only immediately follow a statement
- 6 | disallow_untyped_defs = True
- 7 | disallow_any_generics = True
8 | ; disallow_any_unimported = True
| ^
- 9 | ; warn_redundant_casts = True
- 10 | ; warn_return_any = True
- 11 | ; warn_unused_configs = True"
- 6 | disallow_untyped_defs = True
- 7 | disallow_any_generics = True
8 | ; disallow_any_unimported = True
| ^
- 9 | ; warn_redundant_casts = True
- 10 | ; warn_return_any = True
- 11 | ; warn_unused_configs = True"
❯ packages/sh/test/fixtures.spec.ts:26:40
🪛 GitHub Check: Lint and Test with Node.js 18 on ubuntu-latest
[failure] 26-26: packages/sh/test/fixtures.spec.ts > parser and printer > should format all fixtures
Error: Snapshotparser and printer > should format all fixtures > 146.ini 1
mismatched
- Expected
Received
"; can only immediately follow a statement
- 6 | disallow_untyped_defs = True
- 7 | disallow_any_generics = True
8 | ; disallow_any_unimported = True
| ^
- 9 | ; warn_redundant_casts = True
- 10 | ; warn_return_any = True
- 11 | ; warn_unused_configs = True"
- 6 | disallow_untyped_defs = True
- 7 | disallow_any_generics = True
8 | ; disallow_any_unimported = True
| ^
- 9 | ; warn_redundant_casts = True
- 10 | ; warn_return_any = True
- 11 | ; warn_unused_configs = True"
❯ packages/sh/test/fixtures.spec.ts:26:40
🪛 GitHub Check: Lint and Test with Node.js 20 on macos-latest
[failure] 26-26: packages/sh/test/fixtures.spec.ts > parser and printer > should format all fixtures
Error: Snapshotparser and printer > should format all fixtures > 146.ini 1
mismatched
- Expected
Received
"; can only immediately follow a statement
- 6 | disallow_untyped_defs = True
- 7 | disallow_any_generics = True
8 | ; disallow_any_unimported = True
| ^
- 9 | ; warn_redundant_casts = True
- 10 | ; warn_return_any = True
- 11 | ; warn_unused_configs = True"
- 6 | disallow_untyped_defs = True
- 7 | disallow_any_generics = True
8 | ; disallow_any_unimported = True
| ^
- 9 | ; warn_redundant_casts = True
- 10 | ; warn_return_any = True
- 11 | ; warn_unused_configs = True"
❯ packages/sh/test/fixtures.spec.ts:26:40
🪛 GitHub Check: Lint and Test with Node.js 18 on windows-latest
[failure] 26-26: packages/sh/test/fixtures.spec.ts > parser and printer > should format all fixtures
Error: Snapshotparser and printer > should format all fixtures > 146.ini 1
mismatched
- Expected
Received
"; can only immediately follow a statement
- 6 | disallow_untyped_defs = True
- 7 | disallow_any_generics = True
8 | ; disallow_any_unimported = True
| ^
- 9 | ; warn_redundant_casts = True
- 10 | ; warn_return_any = True
- 11 | ; warn_unused_configs = True"
- 6 | disallow_untyped_defs = True
- 7 | disallow_any_generics = True
8 | ; disallow_any_unimported = True
| ^
- 9 | ; warn_redundant_casts = True
- 10 | ; warn_return_any = True
- 11 | ; warn_unused_configs = True"
❯ packages/sh/test/fixtures.spec.ts:26:40
🪛 GitHub Actions: CI
[error] 26-26: Snapshot
parser and printer > should format all fixtures > 146.ini 1
mismatched
🧹 Nitpick comments (3)
.size-limit.json (1)
1-18
: JSON Size Limit Configuration is Well StructuredThe new
.size-limit.json
file defines clear size limits for several package entry points. The JSON structure is valid and each entry correctly specifies the"path"
and"limit"
properties. As the project moves to centralized size limit management, please ensure that any future modifications in package paths or limits remain consistent with this configuration.package.json (2)
16-16
: Updated Build Script with-e named
FlagThe
"build:r"
script has been updated to include the-e named
flag ("r -f cjs -e named"
). This change aligns with the PR objective to usesh-syntax
without relying on experimental flags. Please verify that this flag does not cause any unexpected side effects in your build process.
1-115
: General Package Configuration ConsistencyThe changes in
package.json
—including the removal of@types/mvdan-sh
and updates to build scripts and linting dependencies—are consistent with the PR objective of removingmvdan-sh
support. Double-check that any remnants of the oldmvdan-sh
tooling (in documentation, configuration files, or scripts) are also fully removed.
🛑 Comments failed to post (1)
packages/sh/test/error.spec.ts (1)
1-15:
⚠️ Potential issueFix failing snapshot tests.
The test is correctly set up to verify error handling for invalid shell syntax, but the snapshot test is failing because the error message format has changed with the switch from
mvdan-sh
tosh-syntax
as indicated in your PR title.You need to update the snapshot to match the new error format by running:
yarn test -u
This will update all snapshots to match the current output format from the
sh-syntax
parser.🧰 Tools
🪛 GitHub Check: Lint and Test with Node.js 22 on ubuntu-latest
[failure] 14-14: packages/sh/test/error.spec.ts > fatal parse error with meaningful message
Error: Snapshotfatal parse error with meaningful message 1
mismatched
- Expected
Received
[SyntaxError: a command can only contain words and redirects; encountered )
1 | echo )
| ^]
1 | echo )
| ^]
❯ packages/sh/test/error.spec.ts:14:3
🪛 GitHub Check: Lint and Test with Node.js 22 on windows-latest
[failure] 14-14: packages/sh/test/error.spec.ts > fatal parse error with meaningful message
Error: Snapshotfatal parse error with meaningful message 1
mismatched
- Expected
Received
[SyntaxError: a command can only contain words and redirects; encountered )
1 | echo )
| ^]
1 | echo )
| ^]
❯ packages/sh/test/error.spec.ts:14:3
🪛 GitHub Check: Lint and Test with Node.js 20 on windows-latest
[failure] 14-14: packages/sh/test/error.spec.ts > fatal parse error with meaningful message
Error: Snapshotfatal parse error with meaningful message 1
mismatched
- Expected
Received
[SyntaxError: a command can only contain words and redirects; encountered )
1 | echo )
| ^]
1 | echo )
| ^]
❯ packages/sh/test/error.spec.ts:14:3
🪛 GitHub Check: Lint and Test with Node.js 18 on macos-latest
[failure] 14-14: packages/sh/test/error.spec.ts > fatal parse error with meaningful message
Error: Snapshotfatal parse error with meaningful message 1
mismatched
- Expected
Received
[SyntaxError: a command can only contain words and redirects; encountered )
1 | echo )
| ^]
1 | echo )
| ^]
❯ packages/sh/test/error.spec.ts:14:3
🪛 GitHub Check: Lint and Test with Node.js 22 on macos-latest
[failure] 14-14: packages/sh/test/error.spec.ts > fatal parse error with meaningful message
Error: Snapshotfatal parse error with meaningful message 1
mismatched
- Expected
Received
[SyntaxError: a command can only contain words and redirects; encountered )
1 | echo )
| ^]
1 | echo )
| ^]
❯ packages/sh/test/error.spec.ts:14:3
🪛 GitHub Check: Lint and Test with Node.js 20 on ubuntu-latest
[failure] 14-14: packages/sh/test/error.spec.ts > fatal parse error with meaningful message
Error: Snapshotfatal parse error with meaningful message 1
mismatched
- Expected
Received
[SyntaxError: a command can only contain words and redirects; encountered )
1 | echo )
| ^]
1 | echo )
| ^]
❯ packages/sh/test/error.spec.ts:14:3
🪛 GitHub Check: Lint and Test with Node.js 18 on ubuntu-latest
[failure] 14-14: packages/sh/test/error.spec.ts > fatal parse error with meaningful message
Error: Snapshotfatal parse error with meaningful message 1
mismatched
- Expected
Received
[SyntaxError: a command can only contain words and redirects; encountered )
1 | echo )
| ^]
1 | echo )
| ^]
❯ packages/sh/test/error.spec.ts:14:3
🪛 GitHub Check: Lint and Test with Node.js 20 on macos-latest
[failure] 14-14: packages/sh/test/error.spec.ts > fatal parse error with meaningful message
Error: Snapshotfatal parse error with meaningful message 1
mismatched
- Expected
Received
[SyntaxError: a command can only contain words and redirects; encountered )
1 | echo )
| ^]
1 | echo )
| ^]
❯ packages/sh/test/error.spec.ts:14:3
🪛 GitHub Check: Lint and Test with Node.js 18 on windows-latest
[failure] 14-14: packages/sh/test/error.spec.ts > fatal parse error with meaningful message
Error: Snapshotfatal parse error with meaningful message 1
mismatched
- Expected
Received
[SyntaxError: a command can only contain words and redirects; encountered )
1 | echo )
| ^]
1 | echo )
| ^]
❯ packages/sh/test/error.spec.ts:14:3
🪛 GitHub Actions: CI
[error] 14-14: Snapshot
fatal parse error with meaningful message 1
mismatched
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.
Actionable comments posted: 1
🧹 Nitpick comments (6)
.github/workflows/autofix.yml (1)
28-28
: Updated Dependency Install Command: Verify Installation Strategy.
The command has been changed fromyarn --immutable
toyarn --no-immutable
, which allows installation even when the lockfile is out of sync with the package.json. Please confirm that this relaxed approach is acceptable for your project's reliability and that any potential side‐effects (e.g. unexpected dependency resolutions) are understood.package.json (1)
44-53
: ESLint Plugin Updates: Confirm Integration.
The new devDependencies—@stylistic/eslint-plugin-js
(v^4.2.0) andeslint-plugin-tsdoc
(v^0.4.0)—are now included in your configuration. Please ensure these are correctly configured in your ESLint setup and that they integrate seamlessly with your current linting rules.packages/sh/README.md (4)
18-22
: Refine Warning Message Language.
The warning message regarding Dockerfile and ignore file support could be improved for clarity and correctness. For example, changing “We can not do much on our side” to “We cannot do much on our side” will read more naturally. Also, adding proper punctuation after the URL could enhance readability.🧰 Tools
🪛 LanguageTool
[style] ~20-~20: Unless you want to emphasize “not”, use “cannot” which is more common.
Context: ...sage cases can be handled correctly. We can not do much on our side. > See also <https:...(CAN_NOT_PREMIUM)
195-195
: Deprecated Property Reminder: keepPadding.
ThekeepPadding
property is marked as deprecated. Ensure that the documentation advises users about its planned removal in the next major version and confirm that any internal references have been updated accordingly.
103-103
: Markdown Formatting: Replace Hard Tabs with Spaces.
A static analysis check indicates hard tabs on this line. Please replace hard tabs with spaces to comply with markdownlint's MD010 rule.🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
103-103: Hard tabs
Column: 6(MD010, no-hard-tabs)
149-149
: Markdown Formatting: Remove Hard Tabs.
Please ensure that any hard tabs detected on this line are replaced with spaces, aligning with markdownlint's formatting guidelines.🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
149-149: Hard tabs
Column: 6(MD010, no-hard-tabs)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
yarn.lock
is excluded by!**/yarn.lock
,!**/*.lock
📒 Files selected for processing (6)
.github/workflows/autofix.yml
(1 hunks).github/workflows/ci.yml
(1 hunks).size-limit.json
(1 hunks)package.json
(4 hunks)packages/sh/README.md
(4 hunks)packages/sh/package.json
(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
- .github/workflows/ci.yml
- packages/sh/package.json
- .size-limit.json
🧰 Additional context used
🪛 LanguageTool
packages/sh/README.md
[uncategorized] ~16-~16: A comma is probably missing here.
Context: ...inter with powered by [sh-syntax][]. Of course it should just work, but may not match ...
(MISSING_COMMA_AFTER_INTRODUCTORY_PHRASE)
[style] ~20-~20: Unless you want to emphasize “not”, use “cannot” which is more common.
Context: ...sage cases can be handled correctly. We can not do much on our side. > See also <https:...
(CAN_NOT_PREMIUM)
🪛 GitHub Check: Lint and Test with Node.js 22 on macos-latest
packages/sh/README.md
[failure] 39-39:
Delete ⏎
🪛 GitHub Check: Lint and Test with Node.js 22 on windows-latest
packages/sh/README.md
[failure] 39-39:
Delete ⏎
🪛 GitHub Check: Lint and Test with Node.js 18 on windows-latest
packages/sh/README.md
[failure] 39-39:
Delete ⏎
🪛 GitHub Check: Lint and Test with Node.js 20 on macos-latest
packages/sh/README.md
[failure] 39-39:
Delete ⏎
🪛 GitHub Check: Lint and Test with Node.js 18 on macos-latest
packages/sh/README.md
[failure] 39-39:
Delete ⏎
🪛 GitHub Check: Lint and Test with Node.js 20 on windows-latest
packages/sh/README.md
[failure] 39-39:
Delete ⏎
🪛 GitHub Check: Lint and Test with Node.js 20 on ubuntu-latest
packages/sh/README.md
[failure] 39-39:
Delete ⏎
🪛 GitHub Check: Lint and Test with Node.js 22 on ubuntu-latest
packages/sh/README.md
[failure] 39-39:
Delete ⏎
🪛 GitHub Check: Lint and Test with Node.js 18 on ubuntu-latest
packages/sh/README.md
[failure] 39-39:
Delete ⏎
🪛 markdownlint-cli2 (0.17.2)
packages/sh/README.md
103-103: Hard tabs
Column: 6
(MD010, no-hard-tabs)
149-149: Hard tabs
Column: 6
(MD010, no-hard-tabs)
🪛 GitHub Actions: CI
packages/sh/README.md
[error] 39-39: Delete ⏎
prettier/prettier
🔇 Additional comments (3)
package.json (2)
16-16
: Updated Build Script: Review Named Export Handling.
Thebuild:r
script now uses the-e named
flag ("r -f cjs -e named"
). Verify that this change accurately addresses your build requirements for processing named exports as intended.
81-81
: New Resolution for es5-ext: Validate Compatibility.
A resolution has been added fores5-ext
(set tonpm:@unes/es5-ext@latest
). Please double-check that this version meets your compatibility and stability requirements and does not introduce unexpected behavior.packages/sh/README.md (1)
15-17
:⚠️ Potential issueUpdate Notice Section for Consistency and Clarity.
The notice states that the plugin’s printer “wraps [mvdan-sh][]'s default printer with powered by [sh-syntax][]”, yet the PR objectives indicate removal ofmvdan-sh
support in favor ofsh-syntax
. Please update this section to remove any references tomvdan-sh
so that the documentation fully reflects the new implementation. Additionally, consider adding a comma after “under development” to improve clarity.Likely an incorrect or invalid review comment.
🧰 Tools
🪛 LanguageTool
[uncategorized] ~16-~16: A comma is probably missing here.
Context: ...inter with powered by [sh-syntax][]. Of course it should just work, but may not match ...(MISSING_COMMA_AFTER_INTRODUCTORY_PHRASE)
|
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.
Actionable comments posted: 1
♻️ Duplicate comments (1)
packages/sh/README.md (1)
62-154
: 🛠️ Refactor suggestion
⚠️ Potential issueResolve Duplicate Definitions in
ShOptions
InterfaceLines 64–108 now introduce optional declarations for properties (
keepComments
,variant
,stopAt
, andrecoverErrors
), but later in the same interface (lines 114–154) these properties are re-declared as required. The duplicate definitions may lead to type conflicts and ambiguity. Please consolidate the interface so that each property is defined only once with the intended (optional) signature. For example, if the new optional declarations are the desired update, remove the duplicate required definitions as shown below:- /** - * KeepComments makes the parser parse comments and attach them to - * nodes, as opposed to discarding them. - * @default true - */ - keepComments: boolean - /** - * LangVariant describes a shell language variant to use when tokenizing and - * parsing shell code. The zero value is [LangBash]. - */ - variant: LangVariant - /** - * StopAt configures the lexer to stop at an arbitrary word, treating it - * as if it were the end of the input... - */ - stopAt: string - /** - * RecoverErrors allows the parser to skip up to a maximum number of errors... - */ - recoverErrors: numberPlease verify that the merged interface reflects the intended optionality.
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
102-102: Hard tabs
Column: 6(MD010, no-hard-tabs)
148-148: Hard tabs
Column: 6(MD010, no-hard-tabs)
🧹 Nitpick comments (2)
packages/sh/README.md (2)
194-213
: New Properties Added:minify
,singleLine
, andfunctionNextLine
The additions of
minify
,singleLine
, andfunctionNextLine
provide enhanced customization for the formatter. Their descriptions are clear and well-documented. Please confirm that any underlying implementation (and corresponding tests) has been updated to support these new options.
246-247
: Verifysh-syntax
Link ReferenceThe link for
[sh-syntax]
at line 246 now points tohttps://github.com/un-ts/sh-syntax
. Please verify that this URL is correct and that any related documentation reflects its current role after the removal of the experimental flag andmvdan-sh
support.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
packages/sh/README.md
(3 hunks)
🧰 Additional context used
🪛 LanguageTool
packages/sh/README.md
[uncategorized] ~16-~16: A comma is probably missing here.
Context: ...inter with powered by [sh-syntax][]. Of course it should just work, but may not match ...
(MISSING_COMMA_AFTER_INTRODUCTORY_PHRASE)
[style] ~20-~20: Unless you want to emphasize “not”, use “cannot” which is more common.
Context: ...sage cases can be handled correctly. We can not do much on our side. > See also <https:...
(CAN_NOT_PREMIUM)
🪛 markdownlint-cli2 (0.17.2)
packages/sh/README.md
102-102: Hard tabs
Column: 6
(MD010, no-hard-tabs)
148-148: Hard tabs
Column: 6
(MD010, no-hard-tabs)
⏰ Context from checks skipped due to timeout of 90000ms (6)
- GitHub Check: Codacy Static Code Analysis
- GitHub Check: Lint and Test with Node.js 22 on windows-latest
- GitHub Check: Lint and Test with Node.js 20 on windows-latest
- GitHub Check: Lint and Test with Node.js 18 on windows-latest
- GitHub Check: Lint and Test with Node.js 22 on windows-latest
- GitHub Check: Lint and Test with Node.js 18 on windows-latest
@coderabbitai Please read more carefully, they are patch diff changes, the final document has no duplicates. |
🧩 Analysis chainLet me check more of the file to see the complete interface: @JounQin You're absolutely right, and I apologize for the misunderstanding. After reviewing the code more carefully, I see that there are no duplicates in the ShOptions interface. I misinterpreted the patch diff format, where properties being modified appear as both removals and additions. Thank you for pointing this out. 🏁 Script executed:
Length of output: 1226 🏁 Script executed:
Length of output: 2068 @JounQin You're absolutely right, and I apologize for my misunderstanding. I reviewed the ShOptions interface again and see that there are no duplicates in the final document. I misinterpreted the patch diff format, where properties being modified appear as both removals and additions in the diff view. Thank you for the correction. ✅ Actions performedComments resolved. |
Summary by CodeRabbit
New Features
lint-no-undefined-references
plugin.Documentation
prettier-plugin-sh
project, specifying plugin capabilities and support limitations.Refactor
Tests
Chores