add 'use strict'; to examples (#530)

This patch:
- adds 'use strict'; to examples
- enforces 'use strict' in examples with .eslintrc.js
This commit is contained in:
Vse Mozhet Byt 2017-08-25 03:33:41 +03:00 committed by Andrey Lushnikov
parent 0791774faa
commit 60ace82875
8 changed files with 15 additions and 0 deletions

View File

@ -11,5 +11,6 @@ module.exports = {
*/ */
"rules": { "rules": {
"indent": [2, 2, { "SwitchCase": 1, "CallExpression": {"arguments": 2}, "MemberExpression": 2, "outerIIFEBody": 0 }], "indent": [2, 2, { "SwitchCase": 1, "CallExpression": {"arguments": 2}, "MemberExpression": 2, "outerIIFEBody": 0 }],
"strict": [2, "global"],
} }
}; };

View File

@ -14,6 +14,8 @@
* limitations under the License. * limitations under the License.
*/ */
'use strict';
const puppeteer = require('puppeteer'); const puppeteer = require('puppeteer');
(async() => { (async() => {

View File

@ -14,6 +14,8 @@
* limitations under the License. * limitations under the License.
*/ */
'use strict';
const puppeteer = require('puppeteer'); const puppeteer = require('puppeteer');
function sniffDetector() { function sniffDetector() {

View File

@ -14,6 +14,8 @@
* limitations under the License. * limitations under the License.
*/ */
'use strict';
const puppeteer = require('puppeteer'); const puppeteer = require('puppeteer');
(async() => { (async() => {

View File

@ -14,6 +14,8 @@
* limitations under the License. * limitations under the License.
*/ */
'use strict';
const puppeteer = require('puppeteer'); const puppeteer = require('puppeteer');
(async() => { (async() => {

View File

@ -14,6 +14,8 @@
* limitations under the License. * limitations under the License.
*/ */
'use strict';
const puppeteer = require('puppeteer'); const puppeteer = require('puppeteer');
const devices = require('puppeteer/DeviceDescriptors'); const devices = require('puppeteer/DeviceDescriptors');

View File

@ -14,6 +14,8 @@
* limitations under the License. * limitations under the License.
*/ */
'use strict';
const puppeteer = require('puppeteer'); const puppeteer = require('puppeteer');
(async() => { (async() => {

View File

@ -14,6 +14,8 @@
* limitations under the License. * limitations under the License.
*/ */
'use strict';
const puppeteer = require('puppeteer'); const puppeteer = require('puppeteer');
(async() => { (async() => {