Skip to content

chore: add eslint-plugin-sort and eslint-plugin-prettier#20

Merged
Dargon789 merged 57 commits into9-sequence-diagram-for-updated-createapp-pipeline-with-setup-scriptfrom
main
Jan 13, 2026
Merged

chore: add eslint-plugin-sort and eslint-plugin-prettier#20
Dargon789 merged 57 commits into9-sequence-diagram-for-updated-createapp-pipeline-with-setup-scriptfrom
main

Conversation

@Dargon789
Copy link
Owner

beeman and others added 30 commits April 23, 2025 02:02
…ana-foundation#196)

* fix: fully support file/folder renaming and content replacement in init script

* chore: remove extra underscrore

* fix: logging and avoid inline if-statements
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Description
-----------
The "should handle errors gracefully" test was intentionally
triggering errors to verify error handling, but `console.error`
was not mocked to suppress output, causing noisy `stderr` logs
during test despite all tests passing.

Testing the introduced fix
--------------------------
```
npm run test
```
All tests will now pass cleanly without `stderr` error output.
…ve-repokit-dependency

refactor: remove repokit dependency and replace with local utilities
…n/ci

fix: run ci script as part of e2e test
…rror-handling-in-search-and-replace-test

fix(test): error handling in search-and-replace test
…kit-templates-default

feat: make Kit Framework templates the default
…nit-script-rename-dedup

fix: remove buggy deduplication in init-script-rename
github-actions bot and others added 25 commits January 6, 2026 11:06
…ublish-latest-tag

fix: enable automated npm publish to latest tag
Add a dedicated task that runs the `setup` script (if present) with a descriptive message "Running setup (building program, generating client)" to improve UX during anchor template installation.
…setup-task-message

feat: show setup progress for anchor templates
…mplate-install

feat: support local template install for testing
…tion (#8)

Signed-off-by: Dargon789 <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Snyk has created this PR to upgrade zod from 4.1.5 to 4.1.8.

See this package in npm:
zod

See this project in Snyk:
https://app.snyk.io/org/apichanmittare/project/0c3e0cce-7a92-4f94-90ba-e7eaa0eac00f?utm_source=github&utm_medium=referral&page=upgrade-pr

Co-authored-by: snyk-bot <[email protected]>
Snyk has created this PR to upgrade commander from 14.0.0 to 14.0.1.

See this package in npm:
commander

See this project in Snyk:
https://app.snyk.io/org/apichanmittare/project/0c3e0cce-7a92-4f94-90ba-e7eaa0eac00f?utm_source=github&utm_medium=referral&page=upgrade-pr

Co-authored-by: snyk-bot <[email protected]>
Snyk has created this PR to upgrade semver from 7.7.2 to 7.7.3.

See this package in npm:
semver

See this project in Snyk:
https://app.snyk.io/org/apichanmittare/project/0c3e0cce-7a92-4f94-90ba-e7eaa0eac00f?utm_source=github&utm_medium=referral&page=upgrade-pr

Co-authored-by: snyk-bot <[email protected]>
* fix: update solana docs url

* Version Packages (solana-foundation#206)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix(test): error handling in search-and-replace test

Description
-----------
The "should handle errors gracefully" test was intentionally
triggering errors to verify error handling, but `console.error`
was not mocked to suppress output, causing noisy `stderr` logs
during test despite all tests passing.

Testing the introduced fix
--------------------------
```
npm run test
```
All tests will now pass cleanly without `stderr` error output.

* refactor: remove repokit dependency and replace with local utilities

* fix: update imports and Zod types for compatibility

* Version Packages

* fix: run ci script as part of e2e test

* test: skip community in regular tests

* skip again test workflow on PR since we tested it now skips community

* feat: make Kit Framework templates the default

* fix: remove buggy deduplication in init-script-rename

* chore: remove test templates job (solana-foundation#221)

* fix: apply path rename only to entry name, not full path

* Version Packages

* fix: enable automated npm publish to latest tag

* Version Packages

* feat: show setup progress for anchor templates

Add a dedicated task that runs the `setup` script (if present) with a descriptive message "Running setup (building program, generating client)" to improve UX during anchor template installation.

* Version Packages

* feat: support local template install for testing

* feat: add warning for installing local templates

---------

Co-authored-by: Bram Borggreve <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: 0xObsidian <[email protected]>
Co-authored-by: guibibeau <[email protected]>
Co-authored-by: Gui Bibeau <[email protected]>
Co-authored-by: Sourav Mishra <[email protected]>
* Create config.yml

148313f
484b187
49c4050
4539b38

Signed-off-by: Dargon789 <[email protected]>

* Update .circleci/config.yml

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Signed-off-by: Dargon789 <[email protected]>

---------

Signed-off-by: Dargon789 <[email protected]>
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
in commit `813773d4`, @beeman mentioned that `paths`
should be renamed to `in`.
This PR basically adds support for it + maintain
backward compatibility.

Feat added
----------
- Accepts `in` alias alongside `paths` in rename entries
- Normalizes `in` to `paths` in `InitScriptSchemaRename`
- Added tests for alias and existing `paths` behavior

Implementation test
-------------------
pnpm vitest run test/init-script-schema.test.ts
pnpm test

Co-authored-by: 0xObsidian <[email protected]>
Replace the GitHub Actions-based npm snapshot publishing workflow with a CircleCI-style workflow that runs tests using Bun via the CircleCI Node orb.

CI:

Introduce a new CircleCI-style test job using the node orb and Bun to run the test suite.
Remove the previous GitHub Actions steps that built the project and published npm snapshots to pkg.pr.new.
Signed-off-by: Dargon789 <[email protected]>
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @Dargon789, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@snyk-io
Copy link

snyk-io bot commented Jan 13, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@gemini-code-assist
Copy link

Summary of Changes

Hello @Dargon789, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly overhauls the project's internal architecture and user experience. It streamlines template management by replacing an external dependency with a custom solution, enabling more robust and flexible template creation, including support for local templates. The post-installation init script has been upgraded with critical version checks and improved renaming capabilities, alongside a new optional setup task for automated project configuration. Furthermore, the developer workflow is enhanced through new CLI options, integration of ESLint sorting and Prettier for code consistency, and a migration to lefthook for managing Git hooks.

Highlights

  • Refactored Template Handling: The external @beeman/repokit dependency has been replaced with internal utility modules (fetch-templates.ts, menu-utils.ts, template-schema.ts), providing greater control and reducing external dependencies for template fetching and menu generation.
  • Introduced Local Template Support: The application now supports creating new projects from local file paths (e.g., local:/path/to/template), offering enhanced flexibility for development and custom template usage.
  • Enhanced Init Script Execution: The post-template-creation init script has been significantly improved, now including version checks for Anchor and Solana, and refined project renaming logic to correctly handle hyphenated names and prevent path duplication.
  • Added Optional Setup Task: A new task has been implemented to automatically run an optional setup script (if defined in package.json) after template installation, which is particularly useful for automating post-installation tasks like building Anchor programs.
  • New CLI Options: Two new command-line interface options have been added: --list-template-ids to output available template IDs as a JSON array, and --minimal to quickly select the predefined nextjs-anchor template.
  • Integrated ESLint Sorting and Prettier: The ESLint configuration (eslint.config.mjs) now includes eslint-plugin-sort and eslint-plugin-prettier to enforce consistent code style, property sorting, and automatic code formatting.
  • Migrated Git Hooks to Lefthook: The project's Git hooks have been migrated from Husky to lefthook, centralizing and streamlining the automation of pre-commit tasks such as linting and JSON formatting.
Ignored Files
  • Ignored by pattern: .github/workflows/** (3)
    • .github/workflows/actions/install-dependencies/action.yml
    • .github/workflows/e2e-test.yml
    • .github/workflows/publish-pkg-pr-new.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@Dargon789 Dargon789 merged commit ba6ce49 into 9-sequence-diagram-for-updated-createapp-pipeline-with-setup-script Jan 13, 2026
11 of 13 checks passed
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request significantly refactors the template handling and project setup process, moving away from the external @beeman/repokit dependency to local utility modules for template schema, fetching, and menu logic. Key changes include introducing a new lefthook.yml for pre-commit hooks (replacing previous husky scripts) to manage linting and formatting, and updating the ESLint configuration with new sorting rules. The create-solana-dapp CLI now supports local template paths, a --minimal flag for quick setup, and a --list-template-ids option. The project setup flow has been enhanced with a new task to run an optional setup script (e.g., for Anchor program builds) and improved init script execution, which now includes version checks for Anchor and Solana, and more robust template renaming logic to prevent path duplication. Minor stylistic changes, such as reordering object properties and adding blank lines for readability, were also applied across various files, likely due to the new ESLint sorting rules.

@@ -6,7 +6,6 @@ import { initializeGitRepo } from './vendor/git'
export function createAppTaskInitializeGit(args: GetArgsResult): Task {
return {
enabled: !args.skipGit,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The title property has been moved from its original position. This is a stylistic reordering, likely due to the newly introduced sort/type-properties ESLint rule. For consistency, please ensure all properties within an object adhere to the defined sorting order.

    task: async (result) => {

Comment on lines 45 to +46
values: Template[],
): SelectOptions<{ value: Template; label: string; hint?: string | undefined }[], Template> {
): SelectOptions<{ hint?: string | undefined; label: string; value: Template }[], Template> {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The order of properties in the SelectOptions type definition has been reordered. This is a stylistic change, likely due to the newly introduced sort/type-properties ESLint rule. Please ensure consistent property ordering.

): SelectOptions<{ hint?: string | undefined; label: string; value: Template }[], Template> {

return undefined
}
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

A blank line has been added before the checkGitVersion function. This is a stylistic change that improves readability by separating function definitions.

function checkGitVersion(): string | undefined {

function checkGitUserName(): string | undefined {
return runCheck('git config --global user.name') ?? 'bot'
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

A blank line has been added before the checkGitUserEmail function. This is a stylistic change that improves readability by separating function definitions.

function checkGitUserEmail(): string | undefined {

propertyName: toPropertyName(name),
}
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

A blank line has been added before the namesValues function. This is a stylistic change that improves readability by separating function definitions.

export function namesValues(name: string): string[] {

}
}
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

A blank line has been added before the pmVersionCache constant. This is a stylistic change that improves readability by separating declarations.

Suggested change
const pmVersionCache = new Map<PackageManager, string>()

Comment on lines +15 to +24
instructions: [],
name: 'test-project',
targetDirectory: '/template',
packageManager: 'npm',
skipGit: false,
skipInit: false,
skipInstall: false,
template: { name: 'basic', description: 'description', repository: '/template' },
verbose: false,
target: 'test-project',
instructions: [],
targetDirectory: '/template',
template: { description: 'description', name: 'basic', repository: '/template' },
verbose: false,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The order of properties in the baseArgs object has been reordered. This is a stylistic change, likely due to the newly introduced sort/type-properties ESLint rule. Please ensure consistent property ordering in test data.

Suggested change
instructions: [],
name: 'test-project',
targetDirectory: '/template',
packageManager: 'npm',
skipGit: false,
skipInit: false,
skipInstall: false,
template: { name: 'basic', description: 'description', repository: '/template' },
verbose: false,
target: 'test-project',
instructions: [],
targetDirectory: '/template',
template: { description: 'description', name: 'basic', repository: '/template' },
verbose: false,
dryRun: false,
instructions: [],
name: 'test-project',
packageManager: 'npm',
skipGit: false,
skipInit: false,
skipInstall: false,
target: 'test-project',
targetDirectory: '/template',
template: { description: 'description', name: 'basic', repository: '/template' },

Comment on lines 29 to +34
packageManager: 'npm',
skipGit: false,
skipInit: false,
skipInstall: false,
template: { name: 'basic', description: 'description', repository: '/template' },
targetDirectory: '/template',
template: { description: 'description', name: 'basic', repository: '/template' },

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The order of properties in the baseArgs object has been reordered. This is a stylistic change, likely due to the newly introduced sort/type-properties ESLint rule. Please ensure consistent property ordering in test data.

Suggested change
packageManager: 'npm',
skipGit: false,
skipInit: false,
skipInstall: false,
template: { name: 'basic', description: 'description', repository: '/template' },
targetDirectory: '/template',
template: { description: 'description', name: 'basic', repository: '/template' },
name: 'test-project',
packageManager: 'npm',
skipGit: false,
skipInit: false,
skipInstall: false,
targetDirectory: '/template',

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants