[eslint] reenable no-extra-semi and quotes rules (#9473)

* [eslint] re-enable no-extra-semi and quotes rules

* [eslint] update to version 0.2.2 of eslint config

* [eslint] autofix
This commit is contained in:
Spencer 2016-12-13 18:17:47 -07:00 committed by GitHub
parent 617f21829b
commit e488a16e6f
357 changed files with 583 additions and 585 deletions

View file

@ -2,5 +2,3 @@
extends: '@elastic/kibana'
rules:
no-unused-vars: off
no-extra-semi: off
quotes: off

View file

@ -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",

View file

@ -19,7 +19,7 @@ export function cleanPrevious(settings, logger) {
resolve();
}
});
};
}
export function cleanArtifacts(settings) {
// delete the working directory.
@ -29,4 +29,4 @@ export function cleanArtifacts(settings) {
rimraf.sync(settings.plugins[0].path);
}
catch (e) {} // eslint-disable-line no-empty
};
}

View file

@ -42,4 +42,4 @@ export function download(settings, logger) {
}
return tryNext();
};
}

View file

@ -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);
};
}

View file

@ -140,4 +140,4 @@ export async function extract(settings, logger) {
logger.error(err);
throw new Error('Error extracting plugin archive');
}
};
}

View file

@ -21,7 +21,7 @@ export function parseMilliseconds(val) {
}
return result;
};
}
export function parse(command, options, kbnPackage) {
const settings = {
@ -44,4 +44,4 @@ export function parse(command, options, kbnPackage) {
};
return settings;
};
}

View file

@ -1 +1 @@
export class UnsupportedProtocolError extends Error {};
export class UnsupportedProtocolError extends Error {}

View file

@ -41,6 +41,6 @@ export default class Logger {
}
process.stderr.write(`${data}\n`);
this.previousLineEnded = true;
};
}
}

View file

@ -29,4 +29,4 @@ export default function pluginList(program) {
)
.description('list installed plugins')
.action(processCommand);
};
}

View file

@ -6,4 +6,4 @@ export function parse(command, options) {
};
return settings;
};
}

View file

@ -39,4 +39,4 @@ export default function pluginRemove(program) {
`common examples:
remove x-pack`)
.action(processCommand);
};
}

View file

@ -12,4 +12,4 @@ export function parse(command, options) {
settings.pluginPath = resolve(settings.pluginDir, settings.plugin);
return settings;
};
}

View file

@ -110,4 +110,4 @@ export default function init(input, output, sourceLocation = 'stored') {
loadSavedState();
setupAutosave();
mappings.retrieveAutocompleteInfoFromServer();
};
}

View file

@ -242,8 +242,8 @@ export function initializeInput($el, $actionsEl, $copyAsCurlEl, output) {
require('./input_resize')(input, output);
return input;
};
}
export default function getInput() {
return input;
};
}

View file

@ -65,8 +65,8 @@ export function initializeOutput($el) {
}
return output;
};
}
export default function getOutput() {
return output;
};
}

View file

@ -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';

View file

@ -45,4 +45,4 @@ export default function mapUri(server, prefix) {
const mappedUrl = formatUrl(mappedUrlComponents);
done(null, mappedUrl, mappedHeaders);
};
};
}

View file

@ -10,4 +10,4 @@ export default function (kibana) {
});
};
}

View file

@ -10,4 +10,4 @@ export default function (kibana) {
});
};
}

View file

@ -83,4 +83,4 @@ export default function HistogramVisType(Private) {
}
])
});
};
}

View file

@ -79,4 +79,4 @@ export default function HistogramVisType(Private) {
}
])
});
};
}

View file

@ -89,4 +89,4 @@ export default function HistogramVisType(Private) {
}
])
});
};
}

View file

@ -70,4 +70,4 @@ export default function HistogramVisType(Private) {
}
])
});
};
}

View file

@ -113,4 +113,4 @@ export default function TileMapVisType(Private, getAppState, courier, config) {
}
])
});
};
}

View file

@ -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; });

View file

@ -15,4 +15,4 @@ export function loadPanelProvider(Private) { // Inject services here
}
};
};
}

View file

@ -21,4 +21,4 @@ export function searchLoaderProvider(savedSearches, Private) { // Inject service
};
});
};
};
}

View file

@ -20,4 +20,4 @@ export function visualizationLoaderProvider(savedVisualizations, Private) { // I
};
});
};
};
}

View file

@ -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);

View file

@ -1,3 +1,3 @@
export function savedDashboardRegister(savedDashboards) {
return savedDashboards;
};
}

View file

@ -593,4 +593,4 @@ function discoverController($scope, config, courier, $route, $window, Notifier,
}
init();
};
}

View file

@ -1,3 +1,3 @@
export default function savedSearchObjectFn(savedSearches) {
return savedSearches;
};
}

View file

@ -23,4 +23,4 @@ export default function (indexPattern) {
});
return dateScripts;
};
}

View file

@ -30,4 +30,4 @@ export default function GetFieldTypes() {
}
];
};
};
}

View file

@ -4,4 +4,4 @@ export default function RefreshKibanaIndexFn(es, kbnIndex) {
index: kbnIndex
});
};
};
}

View file

@ -363,4 +363,4 @@ function VisEditor($scope, $route, timefilter, AppState, $location, kbnUrl, $tim
}
init();
};
}

View file

@ -1,3 +1,3 @@
export default function savedVisualizationFn(savedVisualizations) {
return savedVisualizations;
};
}

View file

@ -10,4 +10,4 @@ export default function (kibana) {
});
};
}

View file

@ -10,4 +10,4 @@ export default function (kibana) {
});
};
}

View file

@ -7,4 +7,4 @@ export default function (kibana) {
]
}
});
};
}

View file

@ -9,4 +9,4 @@ export default function (kibana) {
}
}
});
};
}

View file

@ -8,4 +8,4 @@ export default function (kibana) {
}
});
};
}

View file

@ -5,4 +5,4 @@ export default function (kibana) {
visTypes: ['plugins/tagcloud/tag_cloud_vis']
}
});
};
}

View file

@ -226,7 +226,7 @@ class TagCloud extends EventEmitter {
resolveWhenDone();
});
};
}
_makeTextSizeMapper() {
const mapSizeToFontSize = D3_SCALING_FUNCTIONS[this._textScale]();

View file

@ -158,7 +158,7 @@ app.controller('timelion', function (
if (!$scope.running) $scope.search();
startRefresh();
}, interval.value);
};
}
startRefresh();
}
});
@ -234,7 +234,7 @@ app.controller('timelion', function (
}
}
});
};
}
function saveExpression(title) {
savedVisualizations.get({type: 'timelion'}).then(function (savedExpression) {
@ -248,7 +248,7 @@ app.controller('timelion', function (
if (id) notify.info('Saved expression as "' + savedExpression.title + '"');
});
});
};
}
function dismissNotifications() {
unsafeNotifications.splice(0, unsafeNotifications.length);

View file

@ -22,7 +22,7 @@ define(function (require) {
};
getFunctions();
checkElasticsearch();
};
}
function getFunctions() {
return $http.get('../api/timelion/functions').then(function (resp) {
@ -61,7 +61,7 @@ define(function (require) {
}
return $scope.es.valid;
});
};
}
init();
}
};

View file

@ -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();

View file

@ -40,4 +40,4 @@ function roundInterval(interval) {
default:
return '1y';
}
};
}

View file

@ -19,7 +19,7 @@ module.exports = function xaxisFormatterProvider(config, timefilter) {
}
return config.get('dateFormat');
};
}
return function (esInterval) {
return getFormat(esInterval);

View file

@ -15,7 +15,7 @@ module.exports = function () {
});
}(nestedObj));
return flatObj;
};
}
const timelionDefaults = flattenWith('.', configFile);
return _.reduce(timelionDefaults, (result, value, key) => {

View file

@ -46,4 +46,4 @@ export default function toSeriesList(aggs, config) {
label: name
};
});
};
}

View file

@ -35,7 +35,7 @@ function initSeasonalComponents(samplePoints, seasonLength) {
});
return seasonals;
};
}
// This is different from the DES method of establishing trend because it looks for
// the difference in points between seasons

View file

@ -19,7 +19,7 @@ function unflatten(data) {
});
return result[''] || result;
};
}
module.exports = new Chainable('props', {
args: [

View file

@ -78,4 +78,4 @@ export default function GeoHashGridAggResponseFixture() {
}
}
};
};
}

View file

@ -1,35 +1,35 @@
export default {
"took": 35,
"timed_out": false,
"_shards": {
"total": 7,
"successful": 7,
"failed": 0
'took': 35,
'timed_out': false,
'_shards': {
'total': 7,
'successful': 7,
'failed': 0
},
"hits": {
"total": 218512,
"max_score": 0,
"hits": []
'hits': {
'total': 218512,
'max_score': 0,
'hits': []
},
"aggregations": {
"1": {
"buckets": {
"*-1024.0": {
"to": 1024,
"to_as_string": "1024.0",
"doc_count": 20904
'aggregations': {
'1': {
'buckets': {
'*-1024.0': {
'to': 1024,
'to_as_string': '1024.0',
'doc_count': 20904
},
"1024.0-2560.0": {
"from": 1024,
"from_as_string": "1024.0",
"to": 2560,
"to_as_string": "2560.0",
"doc_count": 23358
'1024.0-2560.0': {
'from': 1024,
'from_as_string': '1024.0',
'to': 2560,
'to_as_string': '2560.0',
'doc_count': 23358
},
"2560.0-*": {
"from": 2560,
"from_as_string": "2560.0",
"doc_count": 174250
'2560.0-*': {
'from': 2560,
'from_as_string': '2560.0',
'doc_count': 174250
}
}
}

View file

@ -17,4 +17,4 @@ export default function (id, mapping) {
$$_partialFormatted: fakeVals('formatted'),
$$_flattened: fakeVals('_flattened')
};
};
}

View file

@ -19,4 +19,4 @@ export default function fitsFixture() {
_index: 'test-index'
});
});
};
}

View file

@ -13,4 +13,4 @@ export default function (Private, Promise) {
};
return courier;
};
}

View file

@ -22,4 +22,4 @@ export default function stubbedLogstashIndexPatternService(Private) {
return indexPattern;
};
}

View file

@ -35,4 +35,4 @@ export default function stubSearchSource(Private, $q, Promise) {
}
};
};
}

View file

@ -8,4 +8,4 @@ export default function (kbnServer, server, config) {
for (const [key, val] of config.getPendingSets()) {
server.log(['warning', 'config'], { key, val, tmpl });
}
};
}

View file

@ -8,4 +8,4 @@ function cloneBuffersCustomizer(val) {
export default function (vals) {
return cloneDeep(vals, cloneBuffersCustomizer);
};
}

View file

@ -31,7 +31,7 @@ describe('version_check request filter', function () {
});
return kbnServer;
};
}
let kbnServer;
beforeEach(async () => kbnServer = await makeServer());

View file

@ -100,4 +100,4 @@ export default function (server) {
}
}
};
};
}

View file

@ -6,4 +6,4 @@ export default function (program) {
program.isCommandSpecified = function () {
return program.args.some(isCommand);
};
};
}

View file

@ -12,4 +12,4 @@ export default function (kbnServer, server, config) {
options: loggingConfiguration(config)
}, cb);
});
};
}

View file

@ -69,4 +69,4 @@ export class LogInterceptor extends Stream.Transform {
this.push(downgraded || event);
next();
}
};
}

View file

@ -49,4 +49,4 @@ export default function (kbnServer, server, config) {
return reply.renderStatusPage();
}
}));
};
}

View file

@ -101,4 +101,4 @@ export default function ($el, sequence) {
const $event = new $.Event(type, _.defaults({ keyCode: keyCode }, modifierState));
$target.trigger($event);
}
};
}

View file

@ -52,4 +52,4 @@ export default function (Private) {
}
return StubIndexPattern;
};
}

View file

@ -37,4 +37,4 @@ export default function TileMapTooltipFormatter($compile, $rootScope, Private) {
return $el.html();
};
};
}

View file

@ -40,4 +40,4 @@ export default function TileMapConverterFn(Private, timefilter, $compile, $rootS
}
};
};
};
}

View file

@ -9,4 +9,4 @@ export default function (buckets) {
previous = bucket;
});
return buckets;
};
}

View file

@ -13,4 +13,4 @@ export default function biuldSplitProvider(Private) {
split.names = collectKeys(split.slices.children);
return split;
};
};
}

View file

@ -7,4 +7,4 @@ export default function collectKeys(children) {
.flattenDeep()
.union(keys)
.value();
};
}

View file

@ -89,4 +89,4 @@ export default function (vis, resp) {
walkBuckets(buckets[0], resp.aggregations);
return results;
};
}

View file

@ -10,4 +10,4 @@ export default function (bucket, agg) {
} else {
return bucket && bucket.buckets || [];
}
};
}

View file

@ -41,4 +41,4 @@ export default function HierarchicalTooltipFormaterProvider($rootScope, $compile
};
};
}

View file

@ -36,4 +36,4 @@ export default function transformAggregationProvider(Private) {
return branch;
});
};
};
}

View file

@ -94,4 +94,4 @@ export default function buildHierarchicalDataProvider(Private, Notifier) {
return result;
};
};
}

View file

@ -10,4 +10,4 @@ export default function NormalizeChartDataFactory(Private) {
tabify: Private(AggResponseTabifyTabifyProvider),
geoJson: Private(AggResponseGeoJsonGeoJsonProvider)
};
};
}

View file

@ -12,4 +12,4 @@ export default function PointSeriesAddToSiri() {
values: [point]
});
};
};
}

View file

@ -27,4 +27,4 @@ export default function PointSeriesFakeXAxis(Private) {
}
};
};
};
}

View file

@ -55,4 +55,4 @@ export default function PointSeriesGetAspects(Private) {
return aspects;
};
};
}

View file

@ -40,4 +40,4 @@ export default function PointSeriesGetPoint() {
return point;
};
};
}

View file

@ -60,4 +60,4 @@ export default function PointSeriesGetSeries(Private) {
return series;
};
};
}

View file

@ -17,4 +17,4 @@ export default function PointSeriesInitYAxis() {
const xAggOutput = x.agg.write();
chart.yScale = xAggOutput.metricScale || null;
};
};
}

View file

@ -24,4 +24,4 @@ export default function PointSeriesOrderedDateAxis(timefilter) {
chart.ordered.endzones = false;
}
};
};
}

View file

@ -40,4 +40,4 @@ export default function PointSeriesTooltipFormatter($compile, $rootScope) {
$tooltipScope.$apply();
return $tooltip[0].outerHTML;
};
};
}

View file

@ -33,4 +33,4 @@ export default function PointSeriesProvider(Private) {
delete chart.aspects;
return chart;
};
};
}

View file

@ -29,4 +29,4 @@ export default function AggResponseBucketsProvider() {
};
return Buckets;
};
}

View file

@ -47,4 +47,4 @@ export default function GetColumnsProvider(Private) {
return columns;
};
};
}

View file

@ -280,4 +280,4 @@ export default function TabbedAggResponseWriterProvider(Private) {
};
return TabbedAggResponseWriter;
};
}

View file

@ -35,4 +35,4 @@ export default function TableProvider() {
return Table;
};
}

View file

@ -21,4 +21,4 @@ export default function TableGroupProvider() {
};
return TableGroup;
};
}

View file

@ -101,4 +101,4 @@ export default function tabifyAggResponseProvider(Private, Notifier) {
}
return notify.timed('tabify agg response', tabifyAggResponse);
};
}

View file

@ -74,4 +74,4 @@ export default function AggParamsFactory(Private) {
};
return AggParams;
};
}

View file

@ -147,4 +147,4 @@ export default function AggTypeFactory(Private) {
};
return AggType;
};
}

View file

@ -17,4 +17,4 @@ export default function BucketAggTypeProvider(Private) {
};
return BucketAggType;
};
}

Some files were not shown because too many files have changed in this diff Show more