From 065d914c377952c8d0235e38745e8527d87eface Mon Sep 17 00:00:00 2001 From: Jim Cramer Date: Wed, 9 Jan 2019 10:41:56 +0100 Subject: [PATCH 1/3] Relax eslint rules --- .eslintrc.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.eslintrc.json b/.eslintrc.json index c92897fc3..263f18df1 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -8,6 +8,13 @@ "prettier/prettier": ["error"], "class-methods-use-this": "off", "strict": "off", - "no-plusplus": "off" + "no-plusplus": "off", + "linebreak-style": "off", + "no-param-reassign": [ + "error", + { + "props": false + } + ] } } From 80c53692be237fcf01d2808eeb8d79d93e2ddd45 Mon Sep 17 00:00:00 2001 From: Jim Cramer Date: Wed, 9 Jan 2019 10:43:09 +0100 Subject: [PATCH 2/3] Remove --fix from eslint in package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index cf4633595..fd3398c5b 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "1.0.0", "description": "GitHub API application", "scripts": { - "lint": "eslint homework --fix", + "lint": "eslint homework", "test": "npm run lint" }, "author": "Jim Cramer", From 99c1e646dfc1f861d31c9e08b9b51990a196b416 Mon Sep 17 00:00:00 2001 From: Jim Cramer Date: Thu, 10 Jan 2019 16:58:56 +0100 Subject: [PATCH 3/3] replace innerText with textContent --- homework/Util.js | 2 +- homework/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/homework/Util.js b/homework/Util.js index 693e1bdd6..981fea47a 100644 --- a/homework/Util.js +++ b/homework/Util.js @@ -8,7 +8,7 @@ class Util { Object.keys(options).forEach(key => { const value = options[key]; if (key === 'text') { - elem.innerText = value; + elem.textContent = value; } else { elem.setAttribute(key, value); } diff --git a/homework/index.js b/homework/index.js index 64e419cf6..d3a97645e 100644 --- a/homework/index.js +++ b/homework/index.js @@ -22,7 +22,7 @@ Object.keys(options).forEach(key => { const value = options[key]; if (key === 'text') { - elem.innerText = value; + elem.textContent = value; } else { elem.setAttribute(key, value); }