Skip to content

Commit

Permalink
Merge branch 'code-differently:main' into primary/lesson05
Browse files Browse the repository at this point in the history
  • Loading branch information
cdbluejr authored Oct 7, 2024
2 parents 6bed3d1 + e422bce commit ebbd942
Show file tree
Hide file tree
Showing 17 changed files with 5,977 additions and 1 deletion.
23 changes: 22 additions & 1 deletion lesson_06/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,25 @@ Please review the following resources before lecture:

## Homework

TODO(anthonydmays): Add details
- [ ] Complete the [Expression Calculator](#expression-calculator) exercise.
- [ ] Read article entitled [3 Questions That Will Make You A Phenomenal Rubber Duck][article-link]
- [ ] Do pre-work for [lesson 07](/lesson_07/).

### Expression Calculator

For this assignment, you will need to implement the functions and logic required to calculate a mathematical expression. After implementing the `add`, `divide`, and `multiply` functions, you will combine these functions to compute the final result.

1. Update the code in the [expression_calculator.ts][calculator-file] file.
2. To check your work, you can run the application using the first command below and run the tests using the second one.
```bash
npm run compile
npm start
```
3. As usual, make sure that you format your code and run the check command before creating your pull request.
```bash
npm run check
```
4. You must only submit changes to the `expression_calculator.ts` file to receive full credit.

[article-link]: https://blog.danslimmon.com/2024/01/18/3-questions-that-will-make-you-a-phenomenal-rubber-duck/
[calculator-file]: ./expression/src/expression_calculator.ts
8 changes: 8 additions & 0 deletions lesson_06/expression/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
insert_final_newline = true
1 change: 1 addition & 0 deletions lesson_06/expression/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build/
3 changes: 3 additions & 0 deletions lesson_06/expression/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Ignore artifacts:
build
coverage
1 change: 1 addition & 0 deletions lesson_06/expression/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
15 changes: 15 additions & 0 deletions lesson_06/expression/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// @ts-check

import eslint from "@eslint/js";
import tseslint from "typescript-eslint";
import eslintConfigPrettier from "eslint-config-prettier";

export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.strict,
...tseslint.configs.stylistic,
eslintConfigPrettier,
{
ignores: ["build"],
},
);
11 changes: 11 additions & 0 deletions lesson_06/expression/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/** @type {import('ts-jest').JestConfigWithTsJest} **/
export default {
testEnvironment: "node",
transform: {
"^.+.tsx?$": ["ts-jest", { useESM: true }],
},
moduleNameMapper: {
"^(\\.\\.?\\/.+)\\.js$": "$1",
},
extensionsToTreatAsEsm: [".ts"],
};
Loading

0 comments on commit ebbd942

Please sign in to comment.