W-21523376: feat: Add --lwc-language flag to project generate command#876
Merged
iowillhoit merged 11 commits intomainfrom Mar 31, 2026
Merged
W-21523376: feat: Add --lwc-language flag to project generate command#876iowillhoit merged 11 commits intomainfrom
iowillhoit merged 11 commits intomainfrom
Conversation
|
Thanks for the contribution! Unfortunately we can't verify the commit author(s): Shubham Goyal <s***@s***.com>. One possible solution is to add that email to your GitHub account. Alternatively you can change your commits to another email and force push the change. After getting your commits associated with your GitHub account, refresh the status of this Pull Request. |
This was referenced Mar 20, 2026
71f802f to
428f387
Compare
wjhsf
approved these changes
Mar 25, 2026
soridalac
reviewed
Mar 30, 2026
added 5 commits
March 31, 2026 13:46
W-21523318 - Added --lwc-language flag with options: javascript, typescript - Added concise flag documentation in messages/project.md - Flag is optional and backward compatible - Validation ensures only valid values accepted
@W-21523380@ Add comprehensive NUT test suite for TypeScript project functionality covering all acceptance criteria: tsconfig.json with outDir: "dist" configuration, TypeScript dependencies in package.json, ESLint config using single @typescript-eslint/parser for both .js and .ts files, proper .forceignore/.gitignore exclusions for dist/ folder, and sfdx-project.json defaultLWCLanguage field. Includes backward compatibility tests confirming JavaScript projects remain unaffected when --lwc-language javascript is specified or flag is omitted. All 179 tests passing.
@W-21523390@ Add comprehensive documentation for TypeScript project creation covering architecture and usage patterns. Updates include TypeScript project generation examples, detailed explanation of dist/ folder strategy for local compilation vs. server-side type stripping, and enhanced CLI help text with flag descriptions. New "TypeScript Support for Lightning Web Components" section explains dual-mode approach: local type validation with npm run build (compiles to dist/) and server deployment of raw .ts files. Includes complete workflow example from project creation through deployment.
Add lwc-language flag to template:generate:project command snapshot to resolve deprecation policy check failures.
c0de0ba to
83e980d
Compare
added 4 commits
March 31, 2026 14:50
- Clarify that TypeScript applies to LWC, not entire project - Add explicit default: 'javascript' to lwc-language flag
Remove auto-generated command documentation bloat
- Remove dist/ folder references (architecture changed to erasableSyntaxOnly) - Fix camelCase: defaultLWCLanguage -> defaultLwcLanguage - Fix ESLint parser check: tsparser -> tseslint.parser - Update test assertions to match actual generated files Fixes 6 failing NUT tests in CI
…ly provided The default flag value shouldn't add the field to sfdx-project.json. Only add defaultLwcLanguage when user explicitly specifies --lwc-language. Fixes failing NUT test: 'should create default project without TypeScript files when no flag specified'
iowillhoit
reviewed
Mar 31, 2026
iowillhoit
reviewed
Mar 31, 2026
Remove the default lwc-language value. Set lwcLanguage only when users provide --lwc-language. Made-with: Cursor
iowillhoit
approved these changes
Mar 31, 2026
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.
Summary
Enables TypeScript support in Salesforce CLI project generation - @W-21523376@
--lwc-languageflag tosf template generate projectcommandjavascriptandtypescriptlanguage options@salesforce/templatesTypeScript templatesRelated Work Items
--languageflag to project generate commandTest Plan
sf template generate project --lwc-language typescriptcreates TS projectsf template generate project --lwc-language javascriptcreates JS project (default)Dependencies
Requires: forcedotcom/salesforcedx-templates#758
Note
Epic
Epic 1: CLI - Project Generation (Part of TypeScript for LWC initiative)