Skip to content
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
10 changes: 10 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,16 @@ module.exports = {
},
},

/**
* Lens overrides
*/
{
files: ['x-pack/plugins/lens/**/*.ts', 'x-pack/plugins/lens/**/*.tsx'],
rules: {
'@typescript-eslint/no-explicit-any': 'error',
},
},

/**
* disable jsx-a11y for kbn-ui-framework
*/
Expand Down
3 changes: 2 additions & 1 deletion x-pack/plugins/lens/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@
import * as Joi from 'joi';
import { Server } from 'hapi';
import { resolve } from 'path';
import { LegacyPluginInitializer } from 'src/legacy/types';

import { PLUGIN_ID } from './common';

const NOT_INTERNATIONALIZED_PRODUCT_NAME = 'Lens Visualizations';

export const lens = (kibana: any) => {
export const lens: LegacyPluginInitializer = kibana => {
return new kibana.Plugin({
id: PLUGIN_ID,
configPrefix: `xpack.${PLUGIN_ID}`,
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/lens/public/drag_drop/drag_drop.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ describe('DragDrop', () => {
test('droppable is reflected in the className', () => {
const component = render(
<DragDrop
onDrop={(x: any) => {
onDrop={(x: unknown) => {
throw x;
}}
droppable
Expand Down
12 changes: 6 additions & 6 deletions x-pack/plugins/lens/public/editor_frame_plugin/editor_frame.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@ interface DatasourceState {
datasourceName: string;
visualizationName: string;

datasourceState: any;
visualizationState: any;
datasourceState: unknown;
visualizationState: unknown;
}

interface UpdateDatasourceAction {
type: 'UPDATE_DATASOURCE';
payload: any;
payload: unknown;
}

interface UpdateVisualizationAction {
type: 'UPDATE_VISUALIZATION';
payload: any;
payload: unknown;
}

type Action = UpdateDatasourceAction | UpdateVisualizationAction;
Expand Down Expand Up @@ -86,7 +86,7 @@ export function EditorFrame(props: EditorFrameProps) {
render={props.datasources[state.datasourceName].renderDataPanel}
nativeProps={{
state: state.datasourceState,
setState: (newState: any) =>
setState: (newState: unknown) =>
dispatch({
type: 'UPDATE_DATASOURCE',
payload: newState,
Expand All @@ -106,7 +106,7 @@ export function EditorFrame(props: EditorFrameProps) {
})
),
state: state.visualizationState,
setState: (newState: any) =>
setState: (newState: unknown) =>
dispatch({
type: 'UPDATE_VISUALIZATION',
payload: newState,
Expand Down