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

Sync with current Cookiecutter template #28

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Sync with current Cookiecutter template #28

wants to merge 3 commits into from

Conversation

claui
Copy link
Owner

@claui claui commented Jul 24, 2023

No description provided.


# In VS Code, this allows developers to manually specify
# inferrable types so the distracting inline hints go away
"@typescript-eslint/no-inferrable-types": 0

"@typescript-eslint/no-shadow": 1
Copy link
Owner Author

Choose a reason for hiding this comment

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

Looks like a mistake.

no-tabs: 2
no-template-curly-in-string: 1
no-throw-literal: 2
no-trailing-spaces: 1
no-undefined: 1
no-unexpected-multiline: 1
no-unreachable: 1
Copy link
Owner Author

Choose a reason for hiding this comment

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

Is this really part of recommended-type-checked or stylistic-type-checked?

Comment on lines +26 to +28
/* eslint-disable-next-line
@typescript-eslint/prefer-nullish-coalescing
-- falsy is what we want here because of the empty string */
Copy link
Owner Author

Choose a reason for hiding this comment

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

Note to self: I’m going to need those three lines often enough that this might warrant a snippet.

Comment on lines +3 to +8
export function hello(name: string = "world") {
if (!name) {
throw new ValueError("Name cannot be empty.")
}
return `Hello, ${name}!`;
}
Copy link
Owner Author

Choose a reason for hiding this comment

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

Replace boilerplate with actual logic.

Comment on lines +3 to +13
describe("the hello function", () => {
it("returns a default value", () => {
expect(hello())
.toBe("Hello, world!");
});

it("greets the author", () => {
expect(hello("Claudia Pellegrino"))
.toBe("Hello, Claudia Pellegrino!")
});
});
Copy link
Owner Author

Choose a reason for hiding this comment

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

Write actual tests.

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.

1 participant