From 5e020ce082b02952f3ea9f72723372319cf984f3 Mon Sep 17 00:00:00 2001 From: maxbittker Date: Fri, 16 Jun 2017 14:19:44 -0700 Subject: [PATCH 1/3] remove use-strict --- src/configError.js | 2 -- src/console.js | 2 -- src/raven.js | 1 - src/singleton.js | 2 -- src/utils.js | 2 -- vendor/TraceKit/tracekit.js | 2 -- vendor/json-stringify-safe/stringify.js | 2 -- 7 files changed, 13 deletions(-) diff --git a/src/configError.js b/src/configError.js index af3bcde568b2..4fc0d96c458c 100644 --- a/src/configError.js +++ b/src/configError.js @@ -1,5 +1,3 @@ -'use strict'; - function RavenConfigError(message) { this.name = 'RavenConfigError'; this.message = message; diff --git a/src/console.js b/src/console.js index c28aeb428e96..644ed1d804ea 100644 --- a/src/console.js +++ b/src/console.js @@ -1,5 +1,3 @@ -'use strict'; - var wrapMethod = function(console, level, callback) { var originalConsoleLevel = console[level]; var originalConsole = console; diff --git a/src/raven.js b/src/raven.js index 46ce6bdb667b..81dcd6f3ee72 100644 --- a/src/raven.js +++ b/src/raven.js @@ -1,5 +1,4 @@ /*global XDomainRequest:false, __DEV__:false*/ -'use strict'; var TraceKit = require('../vendor/TraceKit/tracekit'); var stringify = require('../vendor/json-stringify-safe/stringify'); diff --git a/src/singleton.js b/src/singleton.js index e395d2a995ae..78262573e946 100644 --- a/src/singleton.js +++ b/src/singleton.js @@ -4,8 +4,6 @@ * Raven library, you SHOULD load this file (vs raven.js). **/ -'use strict'; - var RavenConstructor = require('./raven'); // This is to be defensive in environments where window does not exist (see https://github.com/getsentry/raven-js/pull/785) diff --git a/src/utils.js b/src/utils.js index 99a972f8ca2b..3657386c912d 100644 --- a/src/utils.js +++ b/src/utils.js @@ -1,5 +1,3 @@ -'use strict'; - function isObject(what) { return typeof what === 'object' && what !== null; } diff --git a/vendor/TraceKit/tracekit.js b/vendor/TraceKit/tracekit.js index f9821b4ee266..192911267c72 100644 --- a/vendor/TraceKit/tracekit.js +++ b/vendor/TraceKit/tracekit.js @@ -1,5 +1,3 @@ -'use strict'; - var utils = require('../../src/utils'); /* diff --git a/vendor/json-stringify-safe/stringify.js b/vendor/json-stringify-safe/stringify.js index 349412872ef0..9eb9962965af 100644 --- a/vendor/json-stringify-safe/stringify.js +++ b/vendor/json-stringify-safe/stringify.js @@ -1,5 +1,3 @@ -'use strict'; - /* json-stringify-safe Like JSON.stringify, but doesn't throw on circular references. From 25e719d66a85a92eb91f08b53da1c5e6f69129dd Mon Sep 17 00:00:00 2001 From: maxbittker Date: Fri, 16 Jun 2017 14:29:56 -0700 Subject: [PATCH 2/3] eslint.rc --- .eslintrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.eslintrc b/.eslintrc index 463f85348c41..5b6301356b47 100644 --- a/.eslintrc +++ b/.eslintrc @@ -34,7 +34,7 @@ "no-unused-vars": [2, {"args": "none"}], "no-with": 2, "semi": [0, "never"], - "strict": [2, "global"], + "strict": [2, "never"], "valid-typeof": 2 }, "extends": [ From 6f5eed1b64c18117e4f95259c1f847a0ed581fc6 Mon Sep 17 00:00:00 2001 From: maxbittker Date: Fri, 16 Jun 2017 14:39:07 -0700 Subject: [PATCH 3/3] scrub from plugins --- Gruntfile.js | 3 +-- plugins/angular.js | 2 -- plugins/console.js | 2 -- plugins/ember.js | 2 -- plugins/react-native.js | 2 -- plugins/require.js | 2 -- plugins/vue.js | 1 - 7 files changed, 1 insertion(+), 13 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index c70dca98a5a2..ee566c7f6c48 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,5 +1,4 @@ -'use strict'; - +'use strict'; // eslint-disable-line module.exports = function(grunt) { var path = require('path'); var os = require('os'); diff --git a/plugins/angular.js b/plugins/angular.js index b7892837a175..5927013a8211 100644 --- a/plugins/angular.js +++ b/plugins/angular.js @@ -3,8 +3,6 @@ * * Provides an $exceptionHandler for Angular.js */ -'use strict'; - var wrappedCallback = require('../src/utils').wrappedCallback; // See https://github.com/angular/angular.js/blob/v1.4.7/src/minErr.js diff --git a/plugins/console.js b/plugins/console.js index afbae30d8631..da3c02d0da41 100644 --- a/plugins/console.js +++ b/plugins/console.js @@ -9,8 +9,6 @@ * `levels`: An array of levels (methods on `console`) to report to Sentry. * Defaults to debug, info, warn, and error. */ -'use strict'; - var wrapConsoleMethod = require('../src/console').wrapMethod; function consolePlugin(Raven, console, pluginOptions) { diff --git a/plugins/ember.js b/plugins/ember.js index 1189d37ef0c6..af3815208702 100644 --- a/plugins/ember.js +++ b/plugins/ember.js @@ -3,8 +3,6 @@ * * Patches event handler callbacks and ajax callbacks. */ -'use strict'; - function emberPlugin(Raven, Ember) { Ember = Ember || window.Ember; diff --git a/plugins/react-native.js b/plugins/react-native.js index 59b6f3240d50..1c5f2f4e5ef8 100644 --- a/plugins/react-native.js +++ b/plugins/react-native.js @@ -17,8 +17,6 @@ * data payload will be passed as the first argument of the callback. * */ -'use strict'; - var wrappedCallback = require('../src/utils').wrappedCallback; // Example React Native path format (iOS): diff --git a/plugins/require.js b/plugins/require.js index 3213c5c2104d..776af5786b48 100644 --- a/plugins/require.js +++ b/plugins/require.js @@ -4,8 +4,6 @@ * * Automatically wrap define/require callbacks. (Experimental) */ -'use strict'; - function requirePlugin(Raven) { if (typeof define === 'function' && define.amd) { window.define = Raven.wrap({deep: false}, define); diff --git a/plugins/vue.js b/plugins/vue.js index a2511eb10bd1..173f8a3a69dd 100644 --- a/plugins/vue.js +++ b/plugins/vue.js @@ -2,7 +2,6 @@ * Vue.js 2.0 plugin * */ -'use strict'; function formatComponentName(vm) { if (vm.$root === vm) {