diff --git a/.editorconfig b/.editorconfig index 9d08a1a..0f17867 100644 --- a/.editorconfig +++ b/.editorconfig @@ -2,8 +2,8 @@ root = true [*] charset = utf-8 -indent_style = space -indent_size = 2 end_of_line = lf +indent_size = 2 +indent_style = space insert_final_newline = true trim_trailing_whitespace = true diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..76f1fdc --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,24 @@ +{ + "env": { + "browser": true, + "es6": true, + "node": true + }, + "extends": [ + "eslint:recommended", + "plugin:vue/strongly-recommended" + ], + "parserOptions": { + "ecmaVersion": 2017, + "sourceType": "module", + "ecmaFeatures": { + "experimentalObjectRestSpread": true + } + }, + "rules": { + "indent": ["error", 2, { "SwitchCase": 1 }], + "linebreak-style": ["error", "unix"], + "quotes": ["error", "double"], + "semi": ["error", "always"] + } +} diff --git a/content/.vuepress/components/GithubFeed.vue b/content/.vuepress/components/GithubFeed.vue index 9ea0f05..3482ec5 100644 --- a/content/.vuepress/components/GithubFeed.vue +++ b/content/.vuepress/components/GithubFeed.vue @@ -141,6 +141,9 @@ case "push": return `https://github.com/${event.repo.name}/tree/${event.payload.ref.replace("refs/heads/", "")}`; break; + + default: + break; } } }, diff --git a/content/.vuepress/components/Hook.vue b/content/.vuepress/components/Tour/Hook.vue similarity index 90% rename from content/.vuepress/components/Hook.vue rename to content/.vuepress/components/Tour/Hook.vue index 92092e9..d9afe89 100644 --- a/content/.vuepress/components/Hook.vue +++ b/content/.vuepress/components/Tour/Hook.vue @@ -2,33 +2,32 @@
- - - - + + +
diff --git a/content/tour.md b/content/tour.md deleted file mode 100644 index ff03e75..0000000 --- a/content/tour.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Tour ---- - - diff --git a/content/tour/index.md b/content/tour/index.md new file mode 100644 index 0000000..2adee0e --- /dev/null +++ b/content/tour/index.md @@ -0,0 +1,6 @@ +--- +tour: true +title: Tour +--- + + diff --git a/package.json b/package.json index 8c5b638..e55a58f 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { "name": "lbry.tech", "version": "1.0.0", - "description": "A Vue.js project", - "author": "", + "description": "Documentation for the LBRY protocol and associated projects", + "author": "LBRY Team", "private": true, "scripts": { "dev": "./node_modules/vuepress/bin/vuepress.js dev content", @@ -47,6 +47,8 @@ "chai-cheerio": "^1.0.0", "chai-http": "^4.0.0", "cheerio": "^1.0.0-rc.2", + "eslint": "^5.0.1", + "eslint-plugin-vue": "^4.5.0", "mocha": "^5.2.0" } } diff --git a/test/api.js b/test/api.js index 4712dfa..bacc4f5 100644 --- a/test/api.js +++ b/test/api.js @@ -1,58 +1,76 @@ -var cheerio = require('cheerio'); -var chai = require('chai'); -var chaiHttp = require('chai-http'); -var chaiCheerio = require('chai-cheerio'); -var server = require('../server'); -var should = chai.should(); +"use strict"; /* global describe, it */ + + + +// P A C K A G E S + +const cheerio = require("cheerio"); +const chai = require("chai"); +const chaiHttp = require("chai-http"); +const chaiCheerio = require("chai-cheerio"); + +// V A R I A B L E + +const server = require("../server"); +const should = chai.should(); // eslint-disable-line + + + +// P R O G R A M chai.use(chaiHttp); chai.use(chaiCheerio); -describe('Api', () => { - describe('/GET home', () => { - it('it should GET the homepage', (done) => { + +describe("API", () => { + describe("/GET home", () => { + it("it should GET the homepage", done => { chai.request(server) - .get('/') - .end((err, res) => { - res.should.have.status(200); - res.should.be.html; - var $ = cheerio.load(res.text); - $("#app").should.exist; - $("main").should.have.class('home'); - $("nav.navigation").should.exist; - done(); - }); + .get("/") + .end((err, res) => { + res.should.have.status(200); + res.should.be.html; + + const $ = cheerio.load(res.text); + $("#app").should.exist; + $("main").should.have.class("home"); + $("nav.navigation").should.exist; + + done(); + }); }); }); - describe('/GET github-feed', () => { - it('it should GET the github-feed', (done) => { + describe("/GET github-feed", () => { + it("it should GET the github-feed", done => { chai.request(server) - .get('/github-feed') - .end((err, res) => { - res.should.have.status(200); - res.body.should.be.a('array'); - res.body.length.should.be.eql(10); - done(); - }); + .get("/github-feed") + .end((err, res) => { + res.should.have.status(200); + res.body.should.be.a("array"); + res.body.length.should.be.eql(10); + + done(); + }); }); }); - describe('/GET sitemap', () => { - it('it should GET the sitemap', (done) => { + describe("/GET sitemap", () => { + it("it should GET the sitemap", done => { chai.request(server) - .get('/sitemap.html') - .end((err, res) => { - res.should.have.status(200); - res.should.be.html; - var $ = cheerio.load(res.text); - $("#app").should.exist; - $("#sitemap").should.exist; - $("#sitemap").should.have.descendants("li"); - done(); - }); + .get("/sitemap.html") + .end((err, res) => { + res.should.have.status(200); + res.should.be.html; + + const $ = cheerio.load(res.text); + $("#app").should.exist; + $("#sitemap").should.exist; + $("#sitemap").should.have.descendants("li"); + + done(); + }); }); }); - -}); \ No newline at end of file +});