Skip to content
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(cli): tweaks to templates #1622

Merged
merged 2 commits into from
Aug 21, 2018
Merged

fix(cli): tweaks to templates #1622

merged 2 commits into from
Aug 21, 2018

Conversation

virkt25
Copy link
Contributor

@virkt25 virkt25 commented Aug 20, 2018

Came across the following annoyances when working on @loopback/example-shopping

  • Move ping.controller.acceptance.ts from /test to /test/acceptance.
  • For REST Controller Template change obj to the model name as it's more descriptive
  • Remove unused import from datasource template
  • Run tslint:fix before prettire:fix for lint:fix since I ran into an issue where tslint:fix breaks prettier formatting requiring you to run prettier:fix / lint:fix again.
  • Reorder the dependencies so they are alphabetical otherwise npm install results in additional changes to the file diff ass it reorders the deps alphabetically.

Checklist

  • npm test passes on your machine
  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style guide
  • API Documentation in code was updated
  • Documentation in /docs/site was updated
  • Affected artifact templates in packages/cli were updated
  • Affected example projects in examples/* were updated

@@ -20,7 +20,7 @@
"clean": "lb-clean dist*",
<% if (project.prettier && project.tslint) { -%>
"lint": "npm run prettier:check && npm run tslint",
"lint:fix": "npm run prettier:fix && npm run tslint:fix",
"lint:fix": "npm run tslint:fix && npm run prettier:fix",
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you want to fix loopback-next/package.json as well?

@raymondfeng
Copy link
Contributor

@virkt25 Please fix the test failures.

- Move `ping.controller.acceptance.ts` from `/test` to `/test/acceptance`.
- For REST Controller Template change `obj` to the model name as it's more descriptive
- Remove unused import from datasource template
- Run `tslint:fix` before `prettire:fix` for `lint:fix` since I ran into an issue where tslint:fix breaks prettier formatting requiring you to run `prettier:fix` / `lint:fix` again.
- Reorder the dependencies so they are alphabetical otherwise `npm install` results in additional changes to the file diff ass it reorders the deps alphabetically.
@virkt25
Copy link
Contributor Author

virkt25 commented Aug 21, 2018

@raymondfeng Fixed. PTAL.

@virkt25 virkt25 merged commit eff54b6 into master Aug 21, 2018
@virkt25 virkt25 deleted the cli-fixes branch August 21, 2018 14:31
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.

2 participants