-
Notifications
You must be signed in to change notification settings - Fork 314
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
fix: fix remix.init
#138
fix: fix remix.init
#138
Conversation
83ff196
to
980e29f
Compare
env: { | ||
"cypress/globals": true, | ||
}, |
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.
Without this we would either get ESLint errors about Cypress
, cy
, ... being undefined or we would need to declare these values ourselves in globals
/* | ||
eslint | ||
@typescript-eslint/no-namespace: "off", | ||
*/ |
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.
This one's unused, so no need to set it to "off" here
.replace(new RegExp("npx ts-node", "g"), "node") | ||
.replace(new RegExp("create-user.ts", "g"), "create-user.js") | ||
.replace(new RegExp("delete-user.ts", "g"), "delete-user.js"); |
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.
We have these values both in code & in comments
isTypeScript | ||
? Promise.resolve() | ||
: fs.readFile(filePath, "utf-8").then(parseFunction); |
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.
We don't need to parse the value when we're not reading a file (when using TS)
@@ -68,12 +68,9 @@ const updatePackageJson = ({ APP_NAME, isTypeScript, packageJson }) => { | |||
name: APP_NAME, | |||
devDependencies: isTypeScript | |||
? devDependencies | |||
: removeUnusedDependencies(devDependencies, [ | |||
"ts-node", | |||
"vite-tsconfig-paths", |
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.
vite-tsconfig-paths
is still used now that it supports jsconfig.json
files
prisma: isTypeScript | ||
? prisma | ||
? { ...prisma, seed: prismaSeed } |
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.
prisma
is a rest value (without prismaSeed
), so we need to add the seed
script again when using TS
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.
Good going 👍 Thanks!
Part of the solution is also a change in the transform, which is implemented in remix-run/remix#3987
This will partially resolve #134
Closes #136
Closes #139
Closes #140