-
Notifications
You must be signed in to change notification settings - Fork 0
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
base: main
Are you sure you want to change the base?
Conversation
|
||
# 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 |
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.
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 |
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.
Is this really part of recommended-type-checked
or stylistic-type-checked
?
/* eslint-disable-next-line | ||
@typescript-eslint/prefer-nullish-coalescing | ||
-- falsy is what we want here because of the empty string */ |
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.
Note to self: I’m going to need those three lines often enough that this might warrant a snippet.
export function hello(name: string = "world") { | ||
if (!name) { | ||
throw new ValueError("Name cannot be empty.") | ||
} | ||
return `Hello, ${name}!`; | ||
} |
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.
Replace boilerplate with actual logic.
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!") | ||
}); | ||
}); |
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.
Write actual tests.
This is useful e.g. for act [1] if using the medium-sized image. Taken from user @francis-switcho’s comment on actions/setup-node. [2] [1]: https://github.com/nektos/act#default-runners-are-intentionally-incomplete [2]: actions/setup-node#182 (comment)
No description provided.