Skip to content

Commit

Permalink
[eslint] reenable no-extra-semi and quotes rules (#9473)
Browse files Browse the repository at this point in the history
* [eslint] re-enable no-extra-semi and quotes rules

* [eslint] update to version 0.2.2 of eslint config

* [eslint] autofix
  • Loading branch information
spalger committed Dec 14, 2016
1 parent 617f218 commit e488a16
Show file tree
Hide file tree
Showing 357 changed files with 583 additions and 585 deletions.
2 changes: 0 additions & 2 deletions .eslintrc
Expand Up @@ -2,5 +2,3 @@
extends: '@elastic/kibana'
rules:
no-unused-vars: off
no-extra-semi: off
quotes: off
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -169,7 +169,7 @@
"wreck": "6.2.0"
},
"devDependencies": {
"@elastic/eslint-config-kibana": "0.2.1",
"@elastic/eslint-config-kibana": "0.2.2",
"angular-mocks": "1.4.7",
"auto-release-sinon": "1.0.3",
"babel-eslint": "6.1.2",
Expand Down
4 changes: 2 additions & 2 deletions src/cli_plugin/install/cleanup.js
Expand Up @@ -19,7 +19,7 @@ export function cleanPrevious(settings, logger) {
resolve();
}
});
};
}

export function cleanArtifacts(settings) {
// delete the working directory.
Expand All @@ -29,4 +29,4 @@ export function cleanArtifacts(settings) {
rimraf.sync(settings.plugins[0].path);
}
catch (e) {} // eslint-disable-line no-empty
};
}
2 changes: 1 addition & 1 deletion src/cli_plugin/install/download.js
Expand Up @@ -42,4 +42,4 @@ export function download(settings, logger) {
}

return tryNext();
};
}
2 changes: 1 addition & 1 deletion src/cli_plugin/install/index.js
Expand Up @@ -49,4 +49,4 @@ export default function pluginInstall(program) {
install file:///Path/to/my/x-pack.zip
install https://path.to/my/x-pack.zip`)
.action(processCommand);
};
}
2 changes: 1 addition & 1 deletion src/cli_plugin/install/pack.js
Expand Up @@ -140,4 +140,4 @@ export async function extract(settings, logger) {
logger.error(err);
throw new Error('Error extracting plugin archive');
}
};
}
4 changes: 2 additions & 2 deletions src/cli_plugin/install/settings.js
Expand Up @@ -21,7 +21,7 @@ export function parseMilliseconds(val) {
}

return result;
};
}

export function parse(command, options, kbnPackage) {
const settings = {
Expand All @@ -44,4 +44,4 @@ export function parse(command, options, kbnPackage) {
};

return settings;
};
}
2 changes: 1 addition & 1 deletion src/cli_plugin/lib/errors.js
@@ -1 +1 @@
export class UnsupportedProtocolError extends Error {};
export class UnsupportedProtocolError extends Error {}
2 changes: 1 addition & 1 deletion src/cli_plugin/lib/logger.js
Expand Up @@ -41,6 +41,6 @@ export default class Logger {
}
process.stderr.write(`${data}\n`);
this.previousLineEnded = true;
};
}

}
2 changes: 1 addition & 1 deletion src/cli_plugin/list/index.js
Expand Up @@ -29,4 +29,4 @@ export default function pluginList(program) {
)
.description('list installed plugins')
.action(processCommand);
};
}
2 changes: 1 addition & 1 deletion src/cli_plugin/list/settings.js
Expand Up @@ -6,4 +6,4 @@ export function parse(command, options) {
};

return settings;
};
}
2 changes: 1 addition & 1 deletion src/cli_plugin/remove/index.js
Expand Up @@ -39,4 +39,4 @@ export default function pluginRemove(program) {
`common examples:
remove x-pack`)
.action(processCommand);
};
}
2 changes: 1 addition & 1 deletion src/cli_plugin/remove/settings.js
Expand Up @@ -12,4 +12,4 @@ export function parse(command, options) {
settings.pluginPath = resolve(settings.pluginDir, settings.plugin);

return settings;
};
}
2 changes: 1 addition & 1 deletion src/core_plugins/console/public/src/app.js
Expand Up @@ -110,4 +110,4 @@ export default function init(input, output, sourceLocation = 'stored') {
loadSavedState();
setupAutosave();
mappings.retrieveAutocompleteInfoFromServer();
};
}
4 changes: 2 additions & 2 deletions src/core_plugins/console/public/src/input.js
Expand Up @@ -242,8 +242,8 @@ export function initializeInput($el, $actionsEl, $copyAsCurlEl, output) {
require('./input_resize')(input, output);

return input;
};
}

export default function getInput() {
return input;
};
}
4 changes: 2 additions & 2 deletions src/core_plugins/console/public/src/output.js
Expand Up @@ -65,8 +65,8 @@ export function initializeOutput($el) {
}

return output;
};
}

export default function getOutput() {
return output;
};
}
2 changes: 1 addition & 1 deletion src/core_plugins/elasticsearch/lib/create_proxy.js
Expand Up @@ -39,7 +39,7 @@ function createProxy(server, method, route, config) {
assign(options.config, config);

server.route(options);
};
}

createProxy.createPath = function createPath(path) {
const pre = '/elasticsearch';
Expand Down
2 changes: 1 addition & 1 deletion src/core_plugins/elasticsearch/lib/map_uri.js
Expand Up @@ -45,4 +45,4 @@ export default function mapUri(server, prefix) {
const mappedUrl = formatUrl(mappedUrlComponents);
done(null, mappedUrl, mappedHeaders);
};
};
}
2 changes: 1 addition & 1 deletion src/core_plugins/kbn_doc_views/index.js
Expand Up @@ -10,4 +10,4 @@ export default function (kibana) {

});

};
}
2 changes: 1 addition & 1 deletion src/core_plugins/kbn_vislib_vis_types/index.js
Expand Up @@ -10,4 +10,4 @@ export default function (kibana) {

});

};
}
2 changes: 1 addition & 1 deletion src/core_plugins/kbn_vislib_vis_types/public/area.js
Expand Up @@ -83,4 +83,4 @@ export default function HistogramVisType(Private) {
}
])
});
};
}
2 changes: 1 addition & 1 deletion src/core_plugins/kbn_vislib_vis_types/public/histogram.js
Expand Up @@ -79,4 +79,4 @@ export default function HistogramVisType(Private) {
}
])
});
};
}
2 changes: 1 addition & 1 deletion src/core_plugins/kbn_vislib_vis_types/public/line.js
Expand Up @@ -89,4 +89,4 @@ export default function HistogramVisType(Private) {
}
])
});
};
}
2 changes: 1 addition & 1 deletion src/core_plugins/kbn_vislib_vis_types/public/pie.js
Expand Up @@ -70,4 +70,4 @@ export default function HistogramVisType(Private) {
}
])
});
};
}
2 changes: 1 addition & 1 deletion src/core_plugins/kbn_vislib_vis_types/public/tile_map.js
Expand Up @@ -113,4 +113,4 @@ export default function TileMapVisType(Private, getAppState, courier, config) {
}
])
});
};
}
Expand Up @@ -24,7 +24,7 @@ describe('dashboard panels', function () {
$compile($el)($scope);
$scope.$digest();
});
};
}

function findPanelWithVisualizationId(id) {
return $scope.state.panels.find((panel) => { return panel.id === id; });
Expand Down
Expand Up @@ -15,4 +15,4 @@ export function loadPanelProvider(Private) { // Inject services here
}

};
};
}
Expand Up @@ -21,4 +21,4 @@ export function searchLoaderProvider(savedSearches, Private) { // Inject service
};
});
};
};
}
Expand Up @@ -20,4 +20,4 @@ export function visualizationLoaderProvider(savedVisualizations, Private) { // I
};
});
};
};
}
Expand Up @@ -106,7 +106,7 @@ app.directive('dashboardGrid', function ($compile, Notifier) {
});

added.forEach(addPanel);
};
}

// ensure that every panel can be serialized now that we are done
$state.panels.forEach(PanelUtils.makeSerializeable);
Expand Down
@@ -1,3 +1,3 @@
export function savedDashboardRegister(savedDashboards) {
return savedDashboards;
};
}
Expand Up @@ -593,4 +593,4 @@ function discoverController($scope, config, courier, $route, $window, Notifier,
}

init();
};
}
@@ -1,3 +1,3 @@
export default function savedSearchObjectFn(savedSearches) {
return savedSearches;
};
}
Expand Up @@ -23,4 +23,4 @@ export default function (indexPattern) {
});

return dateScripts;
};
}
Expand Up @@ -30,4 +30,4 @@ export default function GetFieldTypes() {
}
];
};
};
}
Expand Up @@ -4,4 +4,4 @@ export default function RefreshKibanaIndexFn(es, kbnIndex) {
index: kbnIndex
});
};
};
}
2 changes: 1 addition & 1 deletion src/core_plugins/kibana/public/visualize/editor/editor.js
Expand Up @@ -363,4 +363,4 @@ function VisEditor($scope, $route, timefilter, AppState, $location, kbnUrl, $tim
}

init();
};
}
@@ -1,3 +1,3 @@
export default function savedVisualizationFn(savedVisualizations) {
return savedVisualizations;
};
}
2 changes: 1 addition & 1 deletion src/core_plugins/markdown_vis/index.js
Expand Up @@ -10,4 +10,4 @@ export default function (kibana) {

});

};
}
2 changes: 1 addition & 1 deletion src/core_plugins/metric_vis/index.js
Expand Up @@ -10,4 +10,4 @@ export default function (kibana) {

});

};
}
2 changes: 1 addition & 1 deletion src/core_plugins/spy_modes/index.js
Expand Up @@ -7,4 +7,4 @@ export default function (kibana) {
]
}
});
};
}
2 changes: 1 addition & 1 deletion src/core_plugins/status_page/index.js
Expand Up @@ -9,4 +9,4 @@ export default function (kibana) {
}
}
});
};
}
2 changes: 1 addition & 1 deletion src/core_plugins/table_vis/index.js
Expand Up @@ -8,4 +8,4 @@ export default function (kibana) {
}
});

};
}
2 changes: 1 addition & 1 deletion src/core_plugins/tagcloud/index.js
Expand Up @@ -5,4 +5,4 @@ export default function (kibana) {
visTypes: ['plugins/tagcloud/tag_cloud_vis']
}
});
};
}
2 changes: 1 addition & 1 deletion src/core_plugins/tagcloud/public/tag_cloud.js
Expand Up @@ -226,7 +226,7 @@ class TagCloud extends EventEmitter {
resolveWhenDone();
});

};
}

_makeTextSizeMapper() {
const mapSizeToFontSize = D3_SCALING_FUNCTIONS[this._textScale]();
Expand Down
6 changes: 3 additions & 3 deletions src/core_plugins/timelion/public/app.js
Expand Up @@ -158,7 +158,7 @@ app.controller('timelion', function (
if (!$scope.running) $scope.search();
startRefresh();
}, interval.value);
};
}
startRefresh();
}
});
Expand Down Expand Up @@ -234,7 +234,7 @@ app.controller('timelion', function (
}
}
});
};
}

function saveExpression(title) {
savedVisualizations.get({type: 'timelion'}).then(function (savedExpression) {
Expand All @@ -248,7 +248,7 @@ app.controller('timelion', function (
if (id) notify.info('Saved expression as "' + savedExpression.title + '"');
});
});
};
}

function dismissNotifications() {
unsafeNotifications.splice(0, unsafeNotifications.length);
Expand Down
4 changes: 2 additions & 2 deletions src/core_plugins/timelion/public/directives/docs.js
Expand Up @@ -22,7 +22,7 @@ define(function (require) {
};
getFunctions();
checkElasticsearch();
};
}

function getFunctions() {
return $http.get('../api/timelion/functions').then(function (resp) {
Expand Down Expand Up @@ -61,7 +61,7 @@ define(function (require) {
}
return $scope.es.valid;
});
};
}
init();
}
};
Expand Down
Expand Up @@ -215,11 +215,11 @@ app.directive('timelionExpression', function ($compile, $http, $timeout, $rootSc
});

return bestFunction;
};
}

function getCaretPos() {
return $elem[0].selectionStart;
};
}

function digest() {
$rootScope.$$phase || $scope.$digest();
Expand Down
2 changes: 1 addition & 1 deletion src/core_plugins/timelion/public/lib/calculate_interval.js
Expand Up @@ -40,4 +40,4 @@ function roundInterval(interval) {
default:
return '1y';
}
};
}
Expand Up @@ -19,7 +19,7 @@ module.exports = function xaxisFormatterProvider(config, timefilter) {
}

return config.get('dateFormat');
};
}

return function (esInterval) {
return getFormat(esInterval);
Expand Down
Expand Up @@ -15,7 +15,7 @@ module.exports = function () {
});
}(nestedObj));
return flatObj;
};
}

const timelionDefaults = flattenWith('.', configFile);
return _.reduce(timelionDefaults, (result, value, key) => {
Expand Down
Expand Up @@ -46,4 +46,4 @@ export default function toSeriesList(aggs, config) {
label: name
};
});
};
}

0 comments on commit e488a16

Please sign in to comment.