Skip to content

Commit

Permalink
[6.x] Use version 0.9.0 of eslint-config-kibana (#13183)
Browse files Browse the repository at this point in the history
Backports PR #13177
  • Loading branch information
weltenwort authored Aug 1, 2017
1 parent c830f0c commit 4182eba
Show file tree
Hide file tree
Showing 14 changed files with 15 additions and 68 deletions.
6 changes: 4 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
---
extends: '@elastic/kibana'
extends:
- '@elastic/eslint-config-kibana'
- '@elastic/eslint-config-kibana/jest'

settings:
import/resolver:
'@elastic/eslint-import-resolver-kibana':
rootPackageName: 'kibana'
kibanaPath: .
kibanaPath: .
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@
"yauzl": "2.7.0"
},
"devDependencies": {
"@elastic/eslint-config-kibana": "0.8.1",
"@elastic/eslint-config-kibana": "0.9.0",
"@elastic/eslint-import-resolver-kibana": "0.8.1",
"@elastic/eslint-plugin-kibana-custom": "1.0.3",
"angular-mocks": "1.4.7",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,6 @@ describe('parseSettings', () => {
});
});

it('returns the true for "true"', () => {
const settings = 'pad=true';
expect(parseSettings(settings)).to.eql({
pad: true,
});
});

it('returns the true for 1', () => {
const settings = 'pad=1';
expect(parseSettings(settings)).to.eql({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,30 +160,4 @@ describe('Controller', function () {
expect(spiedTabify).to.have.property('callCount', 1);
expect(spiedTabify.firstCall.args[2]).to.have.property('partialRows', false);
});

it('passes partialRows:true to tabify based on the vis params', function () {
// spy on the tabify private module
const spiedTabify = sinon.spy(Private(AggResponseTabifyProvider));
Private.stub(AggResponseTabifyProvider, spiedTabify);

const vis = new OneRangeVis({ showPartialRows: true });
initController(vis);
attachEsResponseToScope(fixtures.oneRangeBucket);

expect(spiedTabify).to.have.property('callCount', 1);
expect(spiedTabify.firstCall.args[2]).to.have.property('partialRows', true);
});

it('passes partialRows:false to tabify based on the vis params', function () {
// spy on the tabify private module
const spiedTabify = sinon.spy(Private(AggResponseTabifyProvider));
Private.stub(AggResponseTabifyProvider, spiedTabify);

const vis = new OneRangeVis({ showPartialRows: false });
initController(vis);
attachEsResponseToScope(fixtures.oneRangeBucket);

expect(spiedTabify).to.have.property('callCount', 1);
expect(spiedTabify.firstCall.args[2]).to.have.property('partialRows', false);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,19 @@ describe(filename, function () {
});
});

it('eq', function () {
it('gt', function () {
return invoke(fn, [seriesList, 'gt', 17, 0]).then(function (r) {
expect(_.map(r.output.list[0].data, 1)).to.eql([-51, 17, 0, 0]);
});
});

it('eq', function () {
it('lt', function () {
return invoke(fn, [seriesList, 'lt', 17, 0]).then(function (r) {
expect(_.map(r.output.list[0].data, 1)).to.eql([0, 17, 82, 20]);
});
});

it('eq', function () {
it('lte', function () {
return invoke(fn, [seriesList, 'lte', 17, 0]).then(function (r) {
expect(_.map(r.output.list[0].data, 1)).to.eql([0, 0, 82, 20]);
});
Expand Down
2 changes: 1 addition & 1 deletion src/server/mappings/lib/__tests__/get_property.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ describe('getProperty(mappings, path)', () => {
test('bar.baz.box', MAPPINGS.rootType.properties.bar.properties.baz.fields.box);
});
});
describe('string key', () => {
describe('array of string keys', () => {
it('finds root properties', () => {
test(['foo'], MAPPINGS.rootType.properties.foo);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,6 @@ describe('hashUrl', function () {
expect(hashUrl(states, url)).to.be(url);
});

it('if empty hash without query', () => {
const url = 'https://localhost:5601/app/kibana#';
expect(hashUrl(states, url)).to.be(url);
});

it('if hash is just a path', () => {
const url = 'https://localhost:5601/app/kibana#/discover';
expect(hashUrl(states, url)).to.be(url);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,6 @@ describe('unhashUrl', () => {
expect(unhashUrl(url, unhashableStates)).to.be(url);
});

it('if empty hash without query', () => {
const url = 'https://localhost:5601/app/kibana#';
expect(unhashUrl(url, unhashableStates)).to.be(url);
});

it('if hash is just a path', () => {
const url = 'https://localhost:5601/app/kibana#/discover';
expect(unhashUrl(url, unhashableStates)).to.be(url);
Expand Down
2 changes: 1 addition & 1 deletion src/ui/public/utils/lodash-mixins/__tests__/_move.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ describe('_.move', function () {
});


it('moves an object up based on a where callback', function () {
it('moves an object down based on a where callback', function () {
const list = [
{ v: 1 },
{ v: 1 },
Expand Down
2 changes: 1 addition & 1 deletion src/ui/public/vis/__tests__/_agg_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ describe('AggConfig', function () {
expect(objs[3]).to.have.property('id', '4');
});

it('assigns ids relative to the other items in the list', function () {
it('assigns ids relative to the other only item in the list', function () {
const objs = [
{ id: '100' },
{},
Expand Down
4 changes: 2 additions & 2 deletions src/ui/public/vislib/__tests__/lib/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ describe('Vislib Data Class Test Suite', function () {
});

it('should return all points from every series', testLength(seriesData));
it('should return all points from every series', testLength(rowsData));
it('should return all points from every series', testLength(colsData));
it('should return all points from every series in the rows', testLength(rowsData));
it('should return all points from every series in the columns', testLength(colsData));

function testLength(inputData) {
return function () {
Expand Down
1 change: 1 addition & 0 deletions test/api_integration/apis/scripts/languages.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export default function ({ getService }) {
})
));

// eslint-disable-next-line jest/no-disabled-tests
it.skip('should only return langs enabled for inline scripting', () => (
supertest.get('/api/kibana/scripts/languages')
.expect(200)
Expand Down
2 changes: 1 addition & 1 deletion test/functional/apps/discover/_shared_links.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export default function ({ getService, getPageObjects }) {
});

// NOTE: This test has to run immediately after the test above
it('should show toast message for copy to clipboard', function () {
it('should show toast message for copy to clipboard of short URL', function () {
return PageObjects.discover.clickCopyToClipboard()
.then(function () {
return PageObjects.header.getToastMessage();
Expand Down
13 changes: 0 additions & 13 deletions ui_framework/.eslintrc

This file was deleted.

0 comments on commit 4182eba

Please sign in to comment.