-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
lb4 repository,model,controller commands generate artifacts with 'lint' issues #4205
Comments
Use |
Personally, I consider that approach as a workaround. We should strive to emit code that passes our linter rules. I think the issue pointed out by @emonddr should be easy to fix. If we think |
@emonddr, could you please add the acceptance criteria? Thanks. |
I am on the latest cli The REPOSITORY has the correct code: changing constructor(@inject('datasources.db') dataSource: juggler.DataSource) {
super(Todo, dataSource);
} to constructor(
@inject('datasources.db') dataSource: juggler.DataSource
) {
super(Todo, dataSource);
} results in lint error, so we should stay with the current behaviour. There is a new lint error found in the controller file, it's already fixed in the latest master branch, so a new release will get rid of it: |
I will wait for a new release before closing this story. |
I tried running : npm run test
after creating the artifacts from the Todo tutorial, and the linting after the tests fail.
I did a comparison of the generated files, and the files after
npm run lint:fix
and these are the differences I found:Controller:
Repository:
Model:
Steps to reproduce
Current Behavior
Expected Behavior
Link to reproduction sandbox
Additional information
Related Issues
See Reporting Issues for more tips on writing good issues
Acceptance Criteria
npm run lint
completes without error.The text was updated successfully, but these errors were encountered: