-
Notifications
You must be signed in to change notification settings - Fork 0
Homework 1. Basic project template and console calculator #1
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
Open
ILyaCyclone
wants to merge
8
commits into
master
Choose a base branch
from
hw-01_env-and-calc
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
5547845
basic project template and console calculator
ILyaCyclone 2a7c57c
configure webpack and vscode debugging
ILyaCyclone d72911a
implement complex math operations
ILyaCyclone b7d9f9e
add eslint and prettier, reformat code
ILyaCyclone 20bf912
code splitting for better readability with minor refactors
ILyaCyclone aad0bda
reword "equation" to "expression"
ILyaCyclone 462a0cb
add pre-commit and pre-push hooks with husky
ILyaCyclone 559ec99
tests all math functions and edge cases
ILyaCyclone File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| { | ||
| "extends": [ | ||
| "eslint:recommended", | ||
| "plugin:@typescript-eslint/recommended", | ||
| "prettier", | ||
| "plugin:prettier/recommended" | ||
| ], | ||
| "parser": "@typescript-eslint/parser", | ||
| "parserOptions": { | ||
| "ecmaVersion": 12, | ||
| "sourceType": "module" | ||
| }, | ||
| "plugins": [ | ||
| "@typescript-eslint", | ||
| "prettier" | ||
| ], | ||
| "rules": { | ||
| "no-constant-condition": "off", | ||
| "prettier/prettier": [ | ||
| "error", | ||
| { | ||
| "endOfLine": "auto" | ||
| } | ||
| ] | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| node_modules/ | ||
| dist/ | ||
| coverage/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| dist | ||
| coverage |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| { | ||
| "printWidth": 140, | ||
| "tabWidth": 4, | ||
| "semi": true, | ||
| "trailingComma": "none", | ||
| "singleQuote": false, | ||
| "quoteProps": "preserve" | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| { | ||
| "version": "0.2.0", | ||
| "configurations": [ | ||
| { | ||
| "type": "node", | ||
| "request": "launch", | ||
| "name": "Jest single run all tests", | ||
| "program": "${workspaceRoot}/node_modules/jest/bin/jest.js", | ||
| "args": [ | ||
| "--verbose", | ||
| "-i", | ||
| "--no-cache" | ||
| ], | ||
| "console": "integratedTerminal", | ||
| "internalConsoleOptions": "neverOpen" | ||
| }, | ||
| { | ||
| "type": "node", | ||
| "request": "launch", | ||
| "name": "Jest watch all tests", | ||
| "program": "${workspaceRoot}/node_modules/jest/bin/jest.js", | ||
| "args": [ | ||
| "--verbose", | ||
| "-i", | ||
| "--no-cache", | ||
| "--watchAll" | ||
| ], | ||
| "console": "integratedTerminal", | ||
| "internalConsoleOptions": "neverOpen" | ||
| }, | ||
| { | ||
| "type": "node", | ||
| "request": "launch", | ||
| "name": "Jest watch current file", | ||
| "program": "${workspaceFolder}/node_modules/jest/bin/jest", | ||
| "args": [ | ||
| "${fileBasename}", | ||
| "--verbose", | ||
| "-i", | ||
| "--no-cache", | ||
| "--watchAll" | ||
| ], | ||
| "console": "integratedTerminal", | ||
| "internalConsoleOptions": "neverOpen" | ||
| } | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,42 @@ | ||
| # otus-reactjs | ||
| Homework for https://otus.ru/lessons/react/ | ||
|
|
||
| ## Console calculator | ||
|
|
||
| Run calculator in REPL mode with | ||
|
|
||
| `npm start` | ||
|
|
||
| Supported operations: | ||
|
|
||
| Operation | Format | ||
| --- | --- | ||
| sum | `x + y` | ||
| substract | `x - y` | ||
| multiply | `x * y` | ||
| divide | `x / y` | ||
| | | | | ||
| remainder | `x % y` | ||
| power | `x ^ y` | ||
| square | `x **` | ||
| factorial | `x !` | ||
| | | | | ||
| sinus | `sin x` | ||
| cosinus | `cos x` | ||
| tangens | `tg x` | ||
| cotangens | `ctg x` | ||
| fibonacci | `fib x` | ||
|
|
||
| Pad numbers and operators with spaces, e.g. `1 + 2 + 3`. | ||
|
|
||
| Use parentheses `( )` to group operations, e.g. `5 * (3 ** - (2 + 1))` = 30 | ||
|
|
||
| Trigonometric operations use radians, so `PI` is supported, e.g. `sin(PI / 2)` = 1. | ||
|
|
||
| Type `bye` or `quit` or `exit` to stop REPL. | ||
|
|
||
| ## Tests | ||
|
|
||
| `npm test` will run tests | ||
|
|
||
| `npm run coverage` will run tests and generate coverage report |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| { | ||
| "presets": [ | ||
| ["@babel/env", { | ||
| "targets": {"node": "current"} | ||
| } | ||
| ], | ||
| ["@babel/preset-typescript"] | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| module.exports = { | ||
| clearMocks: true, | ||
| coverageDirectory: "coverage", | ||
| testEnvironment: "node", | ||
| transform: { | ||
| "^.+\\.(js|ts)x?$": "<rootDir>/node_modules/babel-jest" | ||
| } | ||
| }; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
зачем ? printWidth я могу понять, а остальное?