From 38cee9e6a9f7a8425fa8a38548637b87ff5e4a28 Mon Sep 17 00:00:00 2001 From: Christoffer Jansson Date: Tue, 16 May 2017 11:07:34 +0200 Subject: [PATCH 1/4] Pinned webdriver and co versions, updated eslint --- package.json | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index a8e99ba..67c0eee 100644 --- a/package.json +++ b/package.json @@ -10,9 +10,9 @@ "url": "https://github.com/webrtc/utilities.git" }, "dependencies": { - "chromedriver": "2.28.0", + "chromedriver": "2.29.0", "geckodriver": "1.4.0", - "selenium-webdriver": "^3.0.0", + "selenium-webdriver": "3.3.0", "tape": "^4.0.0", "travis-multirunner": "^3.0.0" }, @@ -23,14 +23,15 @@ "test": "grunt && ./test/start-tests.sh" }, "devDependencies": { + "eslint-config-webrtc": "^1.0.0", "grunt": "^0.4.5", "grunt-cli": ">=0.1.9", - "grunt-eslint": "^17.2.0", + "grunt-eslint": "^19.0.0", "grunt-githooks": "^0.3.1", - "chromedriver": "^2.16.0", + "chromedriver": "^2.29.0", "selenium-webdriver": "^3.0.0", "tape": "^4.0.0", "travis-multirunner": "^3.0.0", - "webrtc-adapter": "^2.0.0" + "webrtc-adapter": "^3.0.0" } } From 9562eb0d3ac06569ba108705b6783853247ea139 Mon Sep 17 00:00:00 2001 From: Christoffer Jansson Date: Tue, 16 May 2017 11:09:55 +0200 Subject: [PATCH 2/4] add .eslintrc --- .eslintrc | 103 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 59 insertions(+), 44 deletions(-) diff --git a/.eslintrc b/.eslintrc index 932115e..d9e3658 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,46 +1,61 @@ { - "rules": { - "array-bracket-spacing": 2, - "block-spacing": [2, "never"], - "brace-style": [2, "1tbs", { "allowSingleLine": false }], - "camelcase": [2, {"properties": "always"}], - "curly": 2, - "default-case": 2, - "dot-notation": 2, - "eqeqeq": 2, - "indent": [ - 2, - 2, - {"SwitchCase": 1} - ], - "key-spacing": [2, {"beforeColon": false, "afterColon": true}], - "max-len": [2, 80, 2, {"ignoreUrls": true}], - "new-cap": 2, - "no-console": 0, - "no-else-return": 2, - "no-eval": 2, - "no-multi-spaces": 2, - "no-multiple-empty-lines": [2, {"max": 2}], - "no-shadow": 2, - "no-trailing-spaces": 2, - "no-unused-expressions": 2, - "no-unused-vars": [2, {"args": "none"}], - "object-curly-spacing": [2, "never"], - "padded-blocks": [2, "never"], - "quotes": [ - 2, - "single" - ], - "semi": [ - 2, - "always" - ], - "space-after-keywords": 2, - "space-before-blocks": 2, - "space-before-function-paren": [2, "never"], - "spaced-comment": 2, - "valid-typeof": 2 - }, - "extends": "eslint:recommended", - "globals": {} + "rules": { + "array-bracket-spacing": 2, + "block-spacing": [2, "never"], + "brace-style": [2, "1tbs", {"allowSingleLine": false}], + "camelcase": [2, {"properties": "always"}], + "curly": 2, + "default-case": 2, + "dot-notation": 2, + "eqeqeq": 2, + "indent": [ + 2, + 2, + {"SwitchCase": 1} + ], + "key-spacing": [2, {"beforeColon": false, "afterColon": true}], + "keyword-spacing": 2, + "max-len": [2, 80, 2, {"ignoreUrls": true}], + "new-cap": [2, {"newIsCapExceptions": [ + "webkitRTCPeerConnection", + "mozRTCPeerConnection" + ]}], + "no-console": 0, + "no-else-return": 2, + "no-eval": 2, + "no-multi-spaces": 2, + "no-multiple-empty-lines": [2, {"max": 2}], + "no-shadow": 2, + "no-trailing-spaces": 2, + "no-unused-expressions": 2, + "no-unused-vars": [2, {"args": "none"}], + "object-curly-spacing": [2, "never"], + "padded-blocks": [2, "never"], + "quotes": [ + 2, + "single" + ], + "semi": [ + 2, + "always" + ], + "space-before-blocks": 2, + "space-before-function-paren": [2, "never"], + "space-unary-ops": 2, + "space-infix-ops": 2, + "spaced-comment": 2, + "valid-typeof": 2 + }, + "env": { + "browser": true, + "node": true + }, + "extends": ["eslint:recommended", "webrtc"], + "globals": { + "module": true, + "require": true, + "process": true, + "Promise": true, + "Map": true + } } From 81daaa7977ea68df97efba493064baf60afdc9af Mon Sep 17 00:00:00 2001 From: Christoffer Jansson Date: Tue, 16 May 2017 11:10:47 +0200 Subject: [PATCH 3/4] add eslint cache --- Gruntfile.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Gruntfile.js b/Gruntfile.js index 9f4c3fe..3887e65 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -9,7 +9,8 @@ module.exports = function(grunt) { pkg: grunt.file.readJSON('package.json'), eslint: { options: { - configFile: '.eslintrc' + configFile: '.eslintrc', + cache: true }, target: ['src/**/*.js', 'main.js'] }, From edf915349241512230f99a1fb712c0568f6370e5 Mon Sep 17 00:00:00 2001 From: Christoffer Jansson Date: Tue, 16 May 2017 11:27:03 +0200 Subject: [PATCH 4/4] use correct webdriver versio --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 67c0eee..4f251ef 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "grunt-eslint": "^19.0.0", "grunt-githooks": "^0.3.1", "chromedriver": "^2.29.0", - "selenium-webdriver": "^3.0.0", + "selenium-webdriver": "^3.3.0", "tape": "^4.0.0", "travis-multirunner": "^3.0.0", "webrtc-adapter": "^3.0.0"