Skip to content
Open
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
3 changes: 1 addition & 2 deletions packages/core/src/testers/testers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import isEmpty from 'lodash/isEmpty';
import get from 'lodash/get';
import endsWith from 'lodash/endsWith';
import last from 'lodash/last';
import isArray from 'lodash/isArray';
import reduce from 'lodash/reduce';
import toPairs from 'lodash/toPairs';
import includes from 'lodash/includes';
Expand Down Expand Up @@ -483,7 +482,7 @@ const traverse = (
pred: (obj: JsonSchema) => boolean,
rootSchema: JsonSchema
): boolean => {
if (isArray(any)) {
if (Array.isArray(any)) {
return reduce(
any,
(acc, el) => acc || traverse(el, pred, rootSchema),
Expand Down
3 changes: 1 addition & 2 deletions packages/core/src/util/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
*/

import isEmpty from 'lodash/isEmpty';
import isArray from 'lodash/isArray';
import includes from 'lodash/includes';
import find from 'lodash/find';
import { resolveData, resolveSchema } from './resolvers';
Expand Down Expand Up @@ -100,7 +99,7 @@ export const deriveTypes = (jsonSchema: JsonSchema): string[] => {
if (!isEmpty(jsonSchema.type) && typeof jsonSchema.type === 'string') {
return [jsonSchema.type];
}
if (isArray(jsonSchema.type)) {
if (Array.isArray(jsonSchema.type)) {
return jsonSchema.type;
}
if (
Expand Down
5 changes: 3 additions & 2 deletions packages/react/src/Renderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,10 @@ export class RendererComponent<
* Stateless Renderer.
*
* @template P type of any renderer props
* @deprecated Use React.FunctionComponent instead
*/
export type StatelessRenderer<P extends RendererProps> =
React.StatelessComponent<P>;
React.FunctionComponent<P>;

/**
* Represents a Renderer, which might either be a component or a function.
Expand All @@ -57,4 +58,4 @@ export type Renderer =
// TODO fix @typescript-eslint/ban-types
// eslint-disable-next-line @typescript-eslint/ban-types
| RendererComponent<RendererProps & any, {}>
| StatelessRenderer<RendererProps & any>;
| React.FunctionComponent<RendererProps & any>;
3 changes: 1 addition & 2 deletions packages/vue-vuetify/src/controls/StringControlRenderer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ import {
type RendererProps,
} from '@jsonforms/vue';
import every from 'lodash/every';
import isArray from 'lodash/isArray';
import isString from 'lodash/isString';
import { defineComponent } from 'vue';
import { VCombobox, VTextField } from 'vuetify/components';
Expand Down Expand Up @@ -123,7 +122,7 @@ const controlRenderer = defineComponent({

if (
suggestions === undefined ||
!isArray(suggestions) ||
!Array.isArray(suggestions) ||
!every(suggestions, isString)
) {
// check for incorrect data
Expand Down