这是indexloc提供的服务,不要输入任何密码
Skip to content

fix(create-turbo): fix ui lint in pnpm example #1325

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

Merged
merged 2 commits into from
Jun 2, 2022
Merged

Conversation

tknickman
Copy link
Member

Fixes two issues:

  1. eslint-config-custom package was not renamed as part of Update eslint naming in examples and add lint script to ui package #1174
  2. Because the eslint config is at the root, the plugin also needs to be installed at root.

Closes #1238

@vercel
Copy link

vercel bot commented Jun 2, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated
turbo-site ⬜️ Ignored (Inspect) Jun 2, 2022 at 4:32PM (UTC)

Comment on lines +165 to +166
let sharedPkg = require(path.join(sharedTemplate, "package.json"));
let projectPkg = require(path.join(projectDir, "package.json"));
Copy link
Member Author

Choose a reason for hiding this comment

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

These were renamed for readability.

sharedPkg = the generic pacakge.json from templates/_shared_ts/package.json
projectPkg = the package manager specific package.json from templates/{packageManager}/package.json

if (appPkg[pkgKey][key] === "*") {
appPkg[pkgKey][key] = `latest`;
// merge dependencies, giving priority to the project deps
sharedPkg[pkgKey] = {
Copy link
Member Author

Choose a reason for hiding this comment

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

Merging deps allows us to specify common dependencies in templates/_shared_ts/package.json, and package manager specific overrides in templates/{packageManager}/package.json

@@ -194,7 +200,9 @@ async function run() {
` - ${chalk.bold("packages/ui")}: Shared React component library`
);
console.log(
` - ${chalk.bold("packages/config")}: Shared configuration (ESLint)`
` - ${chalk.bold(
"packages/eslint-config-custom"
Copy link
Member Author

Choose a reason for hiding this comment

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

Just updating the name here.

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.

Basic starter project with pnpm fails to lint
3 participants