From 6b298213ab2af8e996a3230538d22bd82a5c9f9b Mon Sep 17 00:00:00 2001 From: Zeke Sikelianos Date: Tue, 16 Aug 2016 14:07:50 -0700 Subject: [PATCH 1/4] update standard-markdown to 1.2.0 --- docs/styleguide.md | 2 ++ package.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/styleguide.md b/docs/styleguide.md index 742e4e28a3..8631792277 100644 --- a/docs/styleguide.md +++ b/docs/styleguide.md @@ -47,6 +47,8 @@ For API references, there are exceptions to this rule. * Use `bash` instead of `cmd` in code blocks (due to the syntax highlighter). * Lines should be wrapped at 80 columns. * No nesting lists more than 2 levels (due to the markdown renderer). +* All `js` and `javascript` code blocks are linted with +[standard-markdown](http://npm.im/standard-markdown). ## Picking words diff --git a/package.json b/package.json index 8a5dfea42d..912c60d843 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "electabul": "~0.0.4", "request": "*", "standard": "^7.1.2", - "standard-markdown": "^1.1.1" + "standard-markdown": "^1.2.0" }, "optionalDependencies": { "runas": "^3.0.0" From 8527bc360ad829818470b261eb4e7b9420474e75 Mon Sep 17 00:00:00 2001 From: Zeke Sikelianos Date: Tue, 16 Aug 2016 14:48:35 -0700 Subject: [PATCH 2/4] bump standard-markdown for orphan array support --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 912c60d843..b2b8252a62 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "electabul": "~0.0.4", "request": "*", "standard": "^7.1.2", - "standard-markdown": "^1.2.0" + "standard-markdown": "^1.2.1" }, "optionalDependencies": { "runas": "^3.0.0" From e71280f31cbe38df68ab37a2f80365d6e3d24055 Mon Sep 17 00:00:00 2001 From: Zeke Sikelianos Date: Tue, 16 Aug 2016 14:49:42 -0700 Subject: [PATCH 3/4] restore js label to orphan code blocks --- docs/api/dialog.md | 2 +- docs/api/menu.md | 4 ++-- docs/api/web-contents.md | 2 +- docs/api/web-frame.md | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/api/dialog.md b/docs/api/dialog.md index f6bf0fdc19..478ce54521 100644 --- a/docs/api/dialog.md +++ b/docs/api/dialog.md @@ -41,7 +41,7 @@ otherwise it returns `undefined`. The `filters` specifies an array of file types that can be displayed or selected when you want to limit the user to a specific type. For example: -``` +```js { filters: [ {name: 'Images', extensions: ['jpg', 'png', 'gif']}, diff --git a/docs/api/menu.md b/docs/api/menu.md index 0af84f218f..b4b59a6048 100644 --- a/docs/api/menu.md +++ b/docs/api/menu.md @@ -359,7 +359,7 @@ the first item. Template: -``` +```js [ {label: '4', id: '4'}, {label: '5', id: '5'}, @@ -381,7 +381,7 @@ Menu: Template: -``` +```js [ {label: 'a', position: 'endof=letters'}, {label: '1', position: 'endof=numbers'}, diff --git a/docs/api/web-contents.md b/docs/api/web-contents.md index 7bdb3607fc..1c24e10a63 100644 --- a/docs/api/web-contents.md +++ b/docs/api/web-contents.md @@ -843,7 +843,7 @@ The `callback` will be called with `callback(error, data)` on completion. The By default, an empty `options` will be regarded as: -``` +```js { marginsType: 0, printBackground: false, diff --git a/docs/api/web-frame.md b/docs/api/web-frame.md index 31ec91f93f..ae8c271db6 100644 --- a/docs/api/web-frame.md +++ b/docs/api/web-frame.md @@ -119,7 +119,7 @@ console.log(webFrame.getResourceUsage()) This will generate: -``` +```js { images: { count: 22, @@ -133,7 +133,7 @@ This will generate: xslStyleSheets: { /* same with "images" */ }, fonts: { /* same with "images" */ }, other: { /* same with "images" */ } -}) +} ``` ### `webFrame.clearCache()` From cc2b95fac3d66bbd27e3fbff615f2deb9d43cefb Mon Sep 17 00:00:00 2001 From: Zeke Sikelianos Date: Tue, 16 Aug 2016 14:50:21 -0700 Subject: [PATCH 4/4] =?UTF-8?q?js=20=E2=86=92=20javascript?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/api/dialog.md | 2 +- docs/api/menu.md | 4 ++-- docs/api/tray.md | 2 +- docs/api/web-contents.md | 4 ++-- docs/api/web-frame.md | 2 +- docs/tutorial/using-selenium-and-webdriver.md | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/api/dialog.md b/docs/api/dialog.md index 478ce54521..3447d8fec6 100644 --- a/docs/api/dialog.md +++ b/docs/api/dialog.md @@ -41,7 +41,7 @@ otherwise it returns `undefined`. The `filters` specifies an array of file types that can be displayed or selected when you want to limit the user to a specific type. For example: -```js +```javascript { filters: [ {name: 'Images', extensions: ['jpg', 'png', 'gif']}, diff --git a/docs/api/menu.md b/docs/api/menu.md index b4b59a6048..4e039c6b18 100644 --- a/docs/api/menu.md +++ b/docs/api/menu.md @@ -359,7 +359,7 @@ the first item. Template: -```js +```javascript [ {label: '4', id: '4'}, {label: '5', id: '5'}, @@ -381,7 +381,7 @@ Menu: Template: -```js +```javascript [ {label: 'a', position: 'endof=letters'}, {label: '1', position: 'endof=numbers'}, diff --git a/docs/api/tray.md b/docs/api/tray.md index b0333402c0..7ea8a4835c 100644 --- a/docs/api/tray.md +++ b/docs/api/tray.md @@ -197,7 +197,7 @@ Sets when the tray's icon background becomes highlighted (in blue). by toggling between `'never'` and `'always'` modes when the window visibility changes. -```js +```javascript const {BrowserWindow, Tray} = require('electron') const win = new BrowserWindow({width: 800, height: 600}) diff --git a/docs/api/web-contents.md b/docs/api/web-contents.md index 1c24e10a63..3259078b23 100644 --- a/docs/api/web-contents.md +++ b/docs/api/web-contents.md @@ -22,7 +22,7 @@ console.log(contents) These methods can be accessed from the `webContents` module: -```js +```javascript const {webContents} = require('electron') console.log(webContents) ``` @@ -843,7 +843,7 @@ The `callback` will be called with `callback(error, data)` on completion. The By default, an empty `options` will be regarded as: -```js +```javascript { marginsType: 0, printBackground: false, diff --git a/docs/api/web-frame.md b/docs/api/web-frame.md index ae8c271db6..8a0e1dd6a9 100644 --- a/docs/api/web-frame.md +++ b/docs/api/web-frame.md @@ -119,7 +119,7 @@ console.log(webFrame.getResourceUsage()) This will generate: -```js +```javascript { images: { count: 22, diff --git a/docs/tutorial/using-selenium-and-webdriver.md b/docs/tutorial/using-selenium-and-webdriver.md index 8e69616977..464d1ce99f 100644 --- a/docs/tutorial/using-selenium-and-webdriver.md +++ b/docs/tutorial/using-selenium-and-webdriver.md @@ -18,7 +18,7 @@ has helpers to access Electron APIs in your tests and bundles ChromeDriver. $ npm install --save-dev spectron ``` -```js +```javascript // A simple test to verify a visible window is opened with a title var Application = require('spectron').Application var assert = require('assert')