Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/tests-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ jobs:
- name: Build
run: pnpm nx run-many --all --skip-nx-cache --target=build --output-style=stream
if: ${{ matrix.os == 'ubuntu-latest' && matrix.node == '26.1.0' }}
- name: Check formatting
run: pnpm prettier
if: ${{ matrix.os == 'ubuntu-latest' && matrix.node == '26.1.0' }}
- name: Lint
run: pnpm nx run-many --all --skip-nx-cache --target=lint --output-style=stream
if: ${{ matrix.os == 'ubuntu-latest' && matrix.node == '26.1.0' }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/tests-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ jobs:
uses: ./.github/actions/setup-cli-deps
with:
node-version: ${{ env.DEFAULT_NODE_VERSION }}
- name: Check formatting
run: pnpm prettier
- name: Lint
run: pnpm nx run-many --all --skip-nx-cache --target=lint --output-style=stream

Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ node_modules
*.md
bin
dist
**/vendor/**
*.d.ts
./fixtures/
2 changes: 1 addition & 1 deletion dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@ commands:

check:
type-check: pnpm nx affected --target=type-check
lint: pnpm nx affected --target=lint
lint: pnpm lint:affected
6 changes: 4 additions & 2 deletions docs/cli/get-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,10 @@ You can also pass these optional flags:
Besides the scripts for building and running the CLIs, there are others that might come handy when adding code to the project:

- `pnpm test`: Runs the tests of all the packages.
- `pnpm lint`: Runs ESLint and Prettier checks for all the packages.
- `pnpm lint:fix`: Runs ESLint and Prettier checks for all the packages and fixes the fixable issues.
- `pnpm prettier`: Checks formatting for all linted source files.
- `pnpm prettier:fix`: Formats all linted source files.
- `pnpm lint`: Runs Prettier and ESLint checks for all the packages.
- `pnpm lint:fix`: Runs Prettier and ESLint for all the packages and fixes the fixable issues.
- `pnpm type-check`: Type-checks all the packagesusing the Typescript `tsc` tool.
- `pnpm clean`: Removes the `dist` directory from all the packages.

Expand Down
11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@
"graphql-codegen:get-graphql-schemas": "bin/get-graphql-schemas.js",
"graphql-codegen": "nx run-many --target=graphql-codegen --all",
"knip": "knip",
"lint:affected": "nx affected --target=lint",
"lint:fix:affected": "nx affected --target=lint:fix",
"lint:fix": "nx run-many --target=lint:fix --all --skip-nx-cache",
"lint": "nx run-many --target=lint --all --skip-nx-cache",
"lint:affected": "pnpm prettier && nx affected --target=lint",
"lint:fix:affected": "pnpm prettier:fix && nx affected --target=lint:fix",
"lint:fix": "pnpm prettier:fix && nx run-many --target=lint:fix --all --skip-nx-cache",
"lint": "pnpm prettier && nx run-many --target=lint --all --skip-nx-cache",
"prettier": "prettier --check \"packages/{app,cli-kit,cli,create-app,organizations,plugin-cloudflare,plugin-did-you-mean,store,theme,ui-extensions-server-kit,ui-extensions-test-utils}/src/**/*.{js,ts,tsx}\" \"packages/cli/bin/*.js\" \"packages/e2e/{setup,helpers,tests}/**/*.ts\" \"packages/e2e/*.ts\"",
"prettier:fix": "prettier --write \"packages/{app,cli-kit,cli,create-app,organizations,plugin-cloudflare,plugin-did-you-mean,store,theme,ui-extensions-server-kit,ui-extensions-test-utils}/src/**/*.{js,ts,tsx}\" \"packages/cli/bin/*.js\" \"packages/e2e/{setup,helpers,tests}/**/*.ts\" \"packages/e2e/*.ts\"",
"create-homebrew-pr": "bin/create-homebrew-pr.js",
"refresh-code-documentation": "nx run-many --target=refresh-code-documentation --all --skip-nx-cache",
"refresh-manifests": "nx run-many --target=refresh-manifests --all --skip-nx-cache && bin/prettify-manifests.js && pnpm refresh-readme",
Expand Down Expand Up @@ -77,6 +79,7 @@
"octokit-plugin-create-pull-request": "^3.12.2",
"pathe": "1.1.2",
"pin-github-action": "^3.5.1",
"prettier": "3.8.4",
"rimraf": "^6.1.3",
"ts-node": "^10.9.1",
"typescript": "5.9.3",
Expand Down
14 changes: 7 additions & 7 deletions packages/app/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@
],
"options": {
"commands": [
"pnpm eslint 'src/cli/api/graphql/business-platform-destinations/generated/**/*.{ts,tsx}' --fix",
"pnpm eslint 'src/cli/api/graphql/business-platform-organizations/generated/**/*.{ts,tsx}' --fix",
"pnpm eslint 'src/cli/api/graphql/app-dev/generated/**/*.{ts,tsx}' --fix",
"pnpm eslint 'src/cli/api/graphql/app-management/generated/**/*.{ts,tsx}' --fix",
"pnpm eslint 'src/cli/api/graphql/webhooks/generated/**/*.{ts,tsx}' --fix",
"pnpm eslint 'src/cli/api/graphql/functions/generated/**/*.{ts,tsx}' --fix",
"pnpm eslint 'src/cli/api/graphql/admin/generated/**/*.{ts,tsx}' --fix"
"pnpm eslint 'src/cli/api/graphql/business-platform-destinations/generated/**/*.{ts,tsx}' --fix && pnpm exec prettier --write --ignore-path ../../.prettierignore 'src/cli/api/graphql/business-platform-destinations/generated/**/*.{ts,tsx}'",
"pnpm eslint 'src/cli/api/graphql/business-platform-organizations/generated/**/*.{ts,tsx}' --fix && pnpm exec prettier --write --ignore-path ../../.prettierignore 'src/cli/api/graphql/business-platform-organizations/generated/**/*.{ts,tsx}'",
"pnpm eslint 'src/cli/api/graphql/app-dev/generated/**/*.{ts,tsx}' --fix && pnpm exec prettier --write --ignore-path ../../.prettierignore 'src/cli/api/graphql/app-dev/generated/**/*.{ts,tsx}'",
"pnpm eslint 'src/cli/api/graphql/app-management/generated/**/*.{ts,tsx}' --fix && pnpm exec prettier --write --ignore-path ../../.prettierignore 'src/cli/api/graphql/app-management/generated/**/*.{ts,tsx}'",
"pnpm eslint 'src/cli/api/graphql/webhooks/generated/**/*.{ts,tsx}' --fix && pnpm exec prettier --write --ignore-path ../../.prettierignore 'src/cli/api/graphql/webhooks/generated/**/*.{ts,tsx}'",
"pnpm eslint 'src/cli/api/graphql/functions/generated/**/*.{ts,tsx}' --fix && pnpm exec prettier --write --ignore-path ../../.prettierignore 'src/cli/api/graphql/functions/generated/**/*.{ts,tsx}'",
"pnpm eslint 'src/cli/api/graphql/admin/generated/**/*.{ts,tsx}' --fix && pnpm exec prettier --write --ignore-path ../../.prettierignore 'src/cli/api/graphql/admin/generated/**/*.{ts,tsx}'"
],
"cwd": "packages/app"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@ export type CreateAssetUrlMutationVariables = Types.Exact<{
}>

export type CreateAssetUrlMutation = {
appRequestSourceUploadUrl: {
sourceUploadUrl?: string | null
userErrors: {field?: string[] | null; message: string}[]
}
appRequestSourceUploadUrl: {sourceUploadUrl?: string | null; userErrors: {field?: string[] | null; message: string}[]}
}

export const CreateAssetUrl = {
Expand Down
4 changes: 2 additions & 2 deletions packages/cli-kit/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@
],
"options": {
"commands": [
"pnpm eslint 'src/cli/api/graphql/admin/generated/**/*.{ts,tsx}' --fix",
"pnpm eslint 'src/cli/api/graphql/bulk-operations/generated/**/*.{ts,tsx}' --fix"
"pnpm eslint 'src/cli/api/graphql/admin/generated/**/*.{ts,tsx}' --fix && pnpm exec prettier --write --ignore-path ../../.prettierignore 'src/cli/api/graphql/admin/generated/**/*.{ts,tsx}'",
"pnpm eslint 'src/cli/api/graphql/bulk-operations/generated/**/*.{ts,tsx}' --fix && pnpm exec prettier --write --ignore-path ../../.prettierignore 'src/cli/api/graphql/bulk-operations/generated/**/*.{ts,tsx}'"
],
"cwd": "packages/cli-kit"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ export type ThemeDeleteMutationVariables = Types.Exact<{
}>

export type ThemeDeleteMutation = {
themeDelete?: {
deletedThemeId?: string | null
userErrors: {field?: string[] | null; message: string}[]
} | null
themeDelete?: {deletedThemeId?: string | null; userErrors: {field?: string[] | null; message: string}[]} | null
}

export const ThemeDelete = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@ export type ThemeFilesDeleteMutationVariables = Types.Exact<{
export type ThemeFilesDeleteMutation = {
themeFilesDelete?: {
deletedThemeFiles?: {filename: string}[] | null
userErrors: {
filename?: string | null
code?: Types.OnlineStoreThemeFilesUserErrorsCode | null
message: string
}[]
userErrors: {filename?: string | null; code?: Types.OnlineStoreThemeFilesUserErrorsCode | null; message: string}[]
} | null
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@ export type StagedUploadsCreateMutationVariables = Types.Exact<{
export type StagedUploadsCreateMutation = {
stagedUploadsCreate?: {
stagedTargets?:
| {
url?: string | null
resourceUrl?: string | null
parameters: {name: string; value: string}[]
}[]
| {url?: string | null; resourceUrl?: string | null; parameters: {name: string; value: string}[]}[]
| null
userErrors: {field?: string[] | null; message: string}[]
} | null
Expand Down
8 changes: 7 additions & 1 deletion packages/eslint-plugin-cli/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ const noCatchAllPlugin = require('eslint-plugin-no-catch-all')
const eslintConfigPrettier = require('eslint-config-prettier')
const globals = require('globals')

const [shopifyPrettierCompatibilityConfig, shopifyPrettierPluginConfig] = shopifyPlugin.configs.prettier
const shopifyPrettierCompatibilityRules = Object.fromEntries(
Object.entries(shopifyPrettierPluginConfig.rules).filter(([ruleName]) => ruleName !== 'prettier/prettier'),
)

// Load rules directly to avoid circular dependency
const rules = {
'command-flags-with-env': require('./rules/command-flags-with-env'),
Expand Down Expand Up @@ -254,7 +259,8 @@ const config = [
// Spread the Shopify configs (these already include typescript-eslint plugin)
...shopifyPlugin.configs.typescript,
...shopifyPlugin.configs.node,
...shopifyPlugin.configs.prettier,
shopifyPrettierCompatibilityConfig,
{rules: shopifyPrettierCompatibilityRules},

// Global ignores
{
Expand Down
4 changes: 0 additions & 4 deletions packages/eslint-plugin-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"@typescript-eslint/parser": "8.56.1",
"eslint-config-prettier": "10.1.8",
"eslint-plugin-no-catch-all": "1.1.0",
"eslint-plugin-prettier": "5.5.6",
"eslint-plugin-react": "7.37.5",
"eslint-plugin-react-hooks": "5.2.0",
"eslint-plugin-tsdoc": "0.5.2",
Expand All @@ -30,9 +29,6 @@
"globals": "16.5.0",
"execa": "7.2.0"
},
"devDependencies": {
"prettier": "3.8.4"
},
"peerDependencies": {
"eslint": "^9.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/organizations/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"dependsOn": ["graphql-codegen:postfix"],
"outputs": ["{projectRoot}/src/cli/api/graphql/business-platform-destinations/generated/**/*.ts"],
"options": {
"commands": ["pnpm eslint 'src/cli/api/graphql/business-platform-destinations/generated/**/*.{ts,tsx}' --fix"],
"commands": ["pnpm eslint 'src/cli/api/graphql/business-platform-destinations/generated/**/*.{ts,tsx}' --fix && pnpm exec prettier --write --ignore-path ../../.prettierignore 'src/cli/api/graphql/business-platform-destinations/generated/**/*.{ts,tsx}'"],
"cwd": "packages/organizations"
}
},
Expand Down
4 changes: 2 additions & 2 deletions packages/store/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@
],
"options": {
"commands": [
"pnpm eslint 'src/cli/api/graphql/business-platform-destinations/generated/**/*.{ts,tsx}' --fix",
"pnpm eslint 'src/cli/api/graphql/business-platform-organizations/generated/**/*.{ts,tsx}' --fix"
"pnpm eslint 'src/cli/api/graphql/business-platform-destinations/generated/**/*.{ts,tsx}' --fix && pnpm exec prettier --write --ignore-path ../../.prettierignore 'src/cli/api/graphql/business-platform-destinations/generated/**/*.{ts,tsx}'",
"pnpm eslint 'src/cli/api/graphql/business-platform-organizations/generated/**/*.{ts,tsx}' --fix && pnpm exec prettier --write --ignore-path ../../.prettierignore 'src/cli/api/graphql/business-platform-organizations/generated/**/*.{ts,tsx}'"
],
"cwd": "packages/store"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ export type DeleteAppDevelopmentStoreMutationVariables = Types.Exact<{
}>

export type DeleteAppDevelopmentStoreMutation = {
deleteAppDevelopmentStore: {
success: boolean
userErrors: {code?: string | null; field: string[]; message: string}[]
}
deleteAppDevelopmentStore: {success: boolean; userErrors: {code?: string | null; field: string[]; message: string}[]}
}

export const DeleteAppDevelopmentStore = {
Expand Down
10 changes: 3 additions & 7 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading