Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use version 0.9.0 of eslint-config-kibana #13177

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.