From 06b5a92042e5011eceeb16b34e7076ef8bcb4130 Mon Sep 17 00:00:00 2001 From: Louise Francois Date: Tue, 4 Dec 2018 12:16:47 +0100 Subject: [PATCH 1/2] week3 changes --- homework/.eslintrc | 47 ++++++++++ homework/App.js | 81 ----------------- homework/Contributor.js | 19 ---- homework/Repository.js | 33 ------- homework/index.js | 47 ---------- homework/index2.html | 27 ------ homework/src/App.js | 118 ++++++++++++++++++++++++ homework/src/Contributor.js | 35 +++++++ homework/src/Repository.js | 144 +++++++++++++++++++++++++++++ homework/{ => src}/Util.js | 4 +- homework/{ => src}/hyf.png | Bin homework/{ => src}/index.html | 11 ++- homework/src/index.js | 166 ++++++++++++++++++++++++++++++++++ homework/src/index2Fetch.js | 145 +++++++++++++++++++++++++++++ homework/src/style.css | 163 +++++++++++++++++++++++++++++++++ homework/style.css | 3 - 16 files changed, 829 insertions(+), 214 deletions(-) create mode 100644 homework/.eslintrc delete mode 100644 homework/App.js delete mode 100644 homework/Contributor.js delete mode 100644 homework/Repository.js delete mode 100644 homework/index.js delete mode 100644 homework/index2.html create mode 100644 homework/src/App.js create mode 100644 homework/src/Contributor.js create mode 100644 homework/src/Repository.js rename homework/{ => src}/Util.js (95%) rename homework/{ => src}/hyf.png (100%) rename homework/{ => src}/index.html (70%) create mode 100644 homework/src/index.js create mode 100644 homework/src/index2Fetch.js create mode 100644 homework/src/style.css delete mode 100644 homework/style.css diff --git a/homework/.eslintrc b/homework/.eslintrc new file mode 100644 index 0000000..ae81895 --- /dev/null +++ b/homework/.eslintrc @@ -0,0 +1,47 @@ +{ + "env": { + "browser": true, + "commonjs": true, + "es6": true, + "node": true + }, + "parserOptions": { + "ecmaVersion": 2017, + "ecmaFeatures": { + "jsx": true + }, + "sourceType": "module" + }, + "extends": [ + "eslint:recommended" + ], + "rules": { + "no-const-assign": "warn", + "no-this-before-super": "warn", + "no-undef": "warn", + "no-unreachable": "warn", + "no-unused-vars": "warn", + "constructor-super": "warn", + "valid-typeof": "warn", + "no-var": "warn", + "prefer-const": "warn", + "no-multiple-empty-lines": "warn", + "eol-last": [ + "error", + "always" + ], + "no-console": "off", + "camelcase": "warn", + "eqeqeq": [ + "error", + "always", + { + "null": "ignore" + } + ], + "semi": [ + "warn", + "always" + ] + } +} \ No newline at end of file diff --git a/homework/App.js b/homework/App.js deleted file mode 100644 index 32b71e3..0000000 --- a/homework/App.js +++ /dev/null @@ -1,81 +0,0 @@ -'use strict'; - -/* global Util, Repository, Contributor */ - -class App { - constructor(url) { - this.initialize(url); - } - - /** - * Initialization - * @param {string} url The GitHub URL for obtaining the organization's repositories. - */ - async initialize(url) { - // Add code here to initialize your app - // 1. Create the fixed HTML elements of your page - // 2. Make an initial XMLHttpRequest using Util.fetchJSON() to populate your