diff --git a/.changeset/thin-eggs-prove.md b/.changeset/thin-eggs-prove.md new file mode 100644 index 000000000..fd5a485e4 --- /dev/null +++ b/.changeset/thin-eggs-prove.md @@ -0,0 +1,6 @@ +--- +"@osdk/example-generator": minor +"@osdk/create-app": minor +--- + +Remove platform specific commands in template scripts diff --git a/packages/create-app/templates/template-react/package.json.hbs b/packages/create-app/templates/template-react/package.json.hbs index f9390f3a5..4ef90f9a0 100644 --- a/packages/create-app/templates/template-react/package.json.hbs +++ b/packages/create-app/templates/template-react/package.json.hbs @@ -6,7 +6,7 @@ "scripts": { "dev": "vite", "build": "tsc && vite build", - "lint": "ESLINT_USE_FLAT_CONFIG=false eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", + "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", "preview": "vite preview" }, "dependencies": { diff --git a/packages/create-app/templates/template-tutorial-todo-app/package.json.hbs b/packages/create-app/templates/template-tutorial-todo-app/package.json.hbs index 5e53d40b2..39bb1e920 100644 --- a/packages/create-app/templates/template-tutorial-todo-app/package.json.hbs +++ b/packages/create-app/templates/template-tutorial-todo-app/package.json.hbs @@ -6,7 +6,7 @@ "scripts": { "dev": "vite", "build": "tsc && vite build", - "lint": "ESLINT_USE_FLAT_CONFIG=false eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", + "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", "preview": "vite preview" }, "dependencies": { diff --git a/packages/example-generator/src/run.ts b/packages/example-generator/src/run.ts index 2d740e12f..f58a8ceb9 100644 --- a/packages/example-generator/src/run.ts +++ b/packages/example-generator/src/run.ts @@ -192,11 +192,17 @@ const UPDATE_PACKAGE_JSON: Mutator = { mutate: (template, content) => ({ type: "modify", newContent: content.replace( + // Use locally generated SDK in the monorepo "\"@osdk/examples.one.dot.one\": \"latest\"", "\"@osdk/examples.one.dot.one\": \"workspace:*\"", ).replace( + // Follow monorepo package naming convention `"name": "${templateExampleId(template)}"`, `"name": "@osdk/examples.${templateCanonicalId(template)}"`, + ).replace( + // Monorepo uses eslint 9 whereas templates are still on eslint 8 + "\"lint\": \"eslint", + "\"lint\": \"ESLINT_USE_FLAT_CONFIG=false eslint", ), }), };