From 5d674b97e7bfe52a3e6090b3b60cc320c0bc70b6 Mon Sep 17 00:00:00 2001 From: Kai Yuan Neo Date: Thu, 27 Aug 2020 12:57:52 +0800 Subject: [PATCH 01/19] add PR template so that we can mirror starter code for all project, remove unused readme --- .github/PULL_REQUEST_TEMPLATE.md | 17 +++++++++++++++++ README.md | 1 - 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 README.md diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..cd2ce9d --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,17 @@ +Please fill out the survey before submitting the pull request. Thanks! + +🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀 + +How many hours did you spend on this assignment? + +Please fill in one error and/or error message you recieved while working on this assignment. + +What part of the assignment did you spend the most time on? + +Comfort Level (1-5): + +Completeness Level (1-5): + +What did you think of this deliverable? + +Is there anything in this code that you feel pleased about? diff --git a/README.md b/README.md deleted file mode 100644 index 32019d3..0000000 --- a/README.md +++ /dev/null @@ -1 +0,0 @@ -# Software Engineering 101 - Intro to Coding From 98f95c4ff78c398ca8e5135ff4fb0908469b2543 Mon Sep 17 00:00:00 2001 From: Kai Yuan Neo Date: Fri, 4 Sep 2020 14:32:08 +0800 Subject: [PATCH 02/19] fix typo in PR template, remove temp comment in script.js --- .github/PULL_REQUEST_TEMPLATE.md | 2 +- script.js | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index cd2ce9d..600afc3 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -4,7 +4,7 @@ Please fill out the survey before submitting the pull request. Thanks! How many hours did you spend on this assignment? -Please fill in one error and/or error message you recieved while working on this assignment. +Please fill in one error and/or error message you received while working on this assignment. What part of the assignment did you spend the most time on? diff --git a/script.js b/script.js index 0f68729..bbe8a29 100644 --- a/script.js +++ b/script.js @@ -1,5 +1,3 @@ -// Please declare functions and variables above where they are used. - var main = function (input) { var myOutputValue = 'hello world'; return myOutputValue; From 595f90710f091dcec3a21cef59358ce87f24eac4 Mon Sep 17 00:00:00 2001 From: Kai Yuan Neo Date: Tue, 8 Sep 2020 14:39:22 +0800 Subject: [PATCH 03/19] update eslint to not show error on function param reassign of object properties --- .eslintrc.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.eslintrc.js b/.eslintrc.js index 1bf41f6..a2bbc94 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -19,6 +19,8 @@ module.exports = { 'linebreak-style': 'off', // Allow console for students to debug 'no-console': 'off', + // Allow function param reassign for object properties + 'no-param-reassign': ['error', { props: false }], // Do not complain about unused main function 'no-unused-vars': ['error', { varsIgnorePattern: 'main' }], // Enable var instead of just let and const From e3b5ff46002288bbcad442433d12639647cb562e Mon Sep 17 00:00:00 2001 From: awongh Date: Tue, 15 Sep 2020 19:33:48 +0800 Subject: [PATCH 04/19] add vscode config --- .vscode/settings.json | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..baf4590 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,11 @@ +{ + "editor.formatOnSave": true, + "editor.formatOnPaste": true, + "eslint.codeAction.showDocumentation": { + + "enable": true + }, + "eslint.format.enable": true, + "eslint.lintTask.enable": true, + "eslint.migration.2_x": "off" +} From ba7ea867d07508f41f8cfb331697efecc6c558f8 Mon Sep 17 00:00:00 2001 From: Kai Yuan Neo Date: Sat, 3 Oct 2020 15:26:15 +0800 Subject: [PATCH 05/19] update eslintrc to ignore brace style to allow comments above else statements --- .eslintrc.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.eslintrc.js b/.eslintrc.js index a2bbc94..4264329 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,6 +10,9 @@ module.exports = { ecmaVersion: 11, }, rules: { + // Don't enforce control flow closing curly brace needs to be + // on same line as next control flow opening statement + 'brace-style': 'off', // Don't enforce === eqeqeq: 'off', // Disable func-names rule so that we can have anonymous functions From 6d609c9cdaf6277671e8f5679fcf8546acc9107c Mon Sep 17 00:00:00 2001 From: Kai Yuan Neo Date: Tue, 6 Oct 2020 14:41:21 +0800 Subject: [PATCH 06/19] turn off eslint destructuring rule --- .eslintrc.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.eslintrc.js b/.eslintrc.js index 4264329..f52dca4 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -30,6 +30,8 @@ module.exports = { 'no-var': 'off', // Don't require a += b instead of a = a + b 'operator-assignment': 'off', + // Don't require array and object destructuring for variable assignment + 'prefer-destructuring': 'off', // Enable + sign to concatenate strings 'prefer-template': 'off', // Disable radix requirement for functions like parseInt From 34a13844ff4d8a99e7543389eb970c0e7abd1a8b Mon Sep 17 00:00:00 2001 From: awongh Date: Tue, 13 Oct 2020 16:03:40 +0800 Subject: [PATCH 07/19] css - refine layout for page --- index.html | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/index.html b/index.html index cb17c82..f8d9691 100644 --- a/index.html +++ b/index.html @@ -8,31 +8,43 @@ box-sizing: border-box; } + body{ + font-family: sans-serif; + margin-left:30px; + margin-right:30px; + } + #header { text-align: center; } #container { - margin: 20px auto; - padding: 20px; + margin: 40px auto; + padding: 38px 31px; background-color: pink; - max-width: 300px; + max-width: 800px; } input { width: 70%; - margin-right: 4px; + margin: 0 4px 23px 0; + padding: 5px 9px; + font-size:21px; + line-height:33px; } button { - font-size: 7px; - width: 20%; + padding: 5px 6px; + font-size:21px; + line-height:33px; + margin: 0 0px 23px 0; + width: 25%; } #output { margin: 20px auto; padding: 20px; - background-color: grey; + background-color: silver; width: 100%; } @@ -67,4 +79,4 @@

SWE101! 🚀

- \ No newline at end of file + From 7ae15fdcd0856b35f15b42a680631fbd9cc8e516 Mon Sep 17 00:00:00 2001 From: Kai Yuan Neo Date: Thu, 17 Dec 2020 16:25:13 +0800 Subject: [PATCH 08/19] remove block scope rule for var --- .eslintrc.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.eslintrc.js b/.eslintrc.js index f52dca4..3962cdd 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,6 +10,8 @@ module.exports = { ecmaVersion: 11, }, rules: { + // Don't enforce block scope on "var" variable declarations, let JS behave as intended. + 'block-scoped-var': 'off', // Don't enforce control flow closing curly brace needs to be // on same line as next control flow opening statement 'brace-style': 'off', From b2a334fd061fd5f25429201784d6904a8619b171 Mon Sep 17 00:00:00 2001 From: Kai Yuan Neo Date: Tue, 5 Jan 2021 20:01:19 +0800 Subject: [PATCH 09/19] lint code --- index.html | 135 +++++++++++++++++++++++++-------------------------- package.json | 2 +- 2 files changed, 67 insertions(+), 70 deletions(-) diff --git a/index.html b/index.html index f8d9691..46cd69c 100644 --- a/index.html +++ b/index.html @@ -1,82 +1,79 @@ + + SWE101 + + - #output { - margin: 20px auto; - padding: 20px; - background-color: silver; - width: 100%; - } - - - - -

SWE101! 🚀

-
- - -

Output:

-
+ +

SWE101! 🚀

+
+ + +

Output:

+
-
- - - - + + - + // Display result in output element + var output = document.querySelector("#output"); + output.innerHTML = result; + // Reset input value + input.value = ""; + }); + + diff --git a/package.json b/package.json index 90af81e..da8bab3 100644 --- a/package.json +++ b/package.json @@ -21,4 +21,4 @@ "eslint-config-airbnb-base": "^14.2.0", "eslint-plugin-import": "^2.22.0" } -} \ No newline at end of file +} From 170746fc94b703486058ccf300f40c17de1fb5a0 Mon Sep 17 00:00:00 2001 From: Kai Yuan Neo Date: Tue, 5 Jan 2021 20:05:25 +0800 Subject: [PATCH 10/19] remove outdated vscode settings --- .vscode/settings.json | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index baf4590..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "editor.formatOnSave": true, - "editor.formatOnPaste": true, - "eslint.codeAction.showDocumentation": { - - "enable": true - }, - "eslint.format.enable": true, - "eslint.lintTask.enable": true, - "eslint.migration.2_x": "off" -} From 6384ff9e7fc306f4521f93428270a93ee43a8711 Mon Sep 17 00:00:00 2001 From: Kai Yuan Neo Date: Sat, 16 Jan 2021 16:33:42 +0800 Subject: [PATCH 11/19] fix starter code CSS --- index.html | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/index.html b/index.html index 46cd69c..31b1d75 100644 --- a/index.html +++ b/index.html @@ -18,32 +18,31 @@ } #container { + background-color: #f9f6e7; margin: 40px auto; - padding: 38px 31px; - background-color: pink; max-width: 800px; + padding: 38px 31px; } input { - width: 70%; - margin: 0 4px 23px 0; - padding: 5px 9px; font-size: 21px; line-height: 33px; + margin: 0 0 23px 0; + padding: 0 9px; + width: 74%; } button { - padding: 5px 6px; font-size: 21px; line-height: 33px; - margin: 0 0px 23px 0; + margin: 0 0 23px 0; + padding: 0 6px; width: 25%; } #output { margin: 20px auto; - padding: 20px; - background-color: silver; + padding: 20px 0px; width: 100%; } @@ -52,6 +51,7 @@

SWE101! 🚀

+

Input:

Output:

From f9ccf03a529ab31ca6d9d4c60909aa981686bb0a Mon Sep 17 00:00:00 2001 From: Kai Yuan Neo Date: Sat, 16 Jan 2021 16:36:20 +0800 Subject: [PATCH 12/19] fix starter code naming --- index.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/index.html b/index.html index 31b1d75..052211e 100644 --- a/index.html +++ b/index.html @@ -52,23 +52,23 @@

SWE101! 🚀

Input:

- - + +

Output:

-
+