diff --git a/.eslintrc b/.eslintrc index 0c62c27620e34..136ac914a8792 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,4 +1,6 @@ --- +parser: babel-eslint + env: es6: true amd: true diff --git a/package.json b/package.json index fbf3f9f5f4cd7..e58417f780064 100644 --- a/package.json +++ b/package.json @@ -121,6 +121,7 @@ }, "devDependencies": { "auto-release-sinon": "^1.0.3", + "babel-eslint": "^4.0.5", "eslint": "^1.0.0", "expect.js": "^0.3.1", "faker": "^1.1.0", diff --git a/src/plugins/kibana/public/visualize/editor/editor.js b/src/plugins/kibana/public/visualize/editor/editor.js index 9de499ec65409..963dfbccda0c1 100644 --- a/src/plugins/kibana/public/visualize/editor/editor.js +++ b/src/plugins/kibana/public/visualize/editor/editor.js @@ -133,11 +133,11 @@ define(function (require) { $scope.responseValueAggs = editableVis.aggs.getResponseAggs().filter(function (agg) { return _.get(agg, 'schema.group') === 'metrics'; }); - } catch (e) { - // this can fail when the agg.type is changed but the - // params have not been set yet. watcher will trigger again - // when the params update } + // this can fail when the agg.type is changed but the + // params have not been set yet. watcher will trigger again + // when the params update + catch (e) {} // eslint-disable-line no-empty }, true); $state.replace(); diff --git a/src/plugins/kibana/public/visualize/saved_visualizations/saved_visualizations.js b/src/plugins/kibana/public/visualize/saved_visualizations/saved_visualizations.js index 45bf73e286d6e..d2ea77ace4712 100644 --- a/src/plugins/kibana/public/visualize/saved_visualizations/saved_visualizations.js +++ b/src/plugins/kibana/public/visualize/saved_visualizations/saved_visualizations.js @@ -69,7 +69,7 @@ define(function (require) { var typeName = source.typeName; if (source.visState) { try { typeName = JSON.parse(source.visState).type; } - catch (e) { /* missing typename handled below */ } + catch (e) { /* missing typename handled below */ } // eslint-disable-line no-empty } if (!typeName || !visTypes.byName[typeName]) { diff --git a/src/ui/public/utils/query_string.js b/src/ui/public/utils/query_string.js index 2c181fdbc4811..02274179e4ca9 100644 --- a/src/ui/public/utils/query_string.js +++ b/src/ui/public/utils/query_string.js @@ -8,9 +8,9 @@ define(function (require) { function tryDecodeURIComponent(value) { try { return decodeURIComponent(value); - } catch (e) { - // Ignore any invalid uri component } + // Ignore any invalid uri component + catch (e) {} // eslint-disable-line no-empty } /**