ESLint: Use --fix with updated rules to order imports

This applies the updated sorting rules to the files by running `npm run lint:js:fix`
This commit is contained in:
regexowl 2022-12-02 10:22:45 +01:00 committed by Sanne Raymaekers
parent b55d5242a9
commit ab1a7f4aab
54 changed files with 202 additions and 109 deletions

View file

@ -1,4 +1,6 @@
import React, { useEffect, useState } from 'react';
import { useFormApi } from '@data-driven-forms/react-form-renderer';
import {
Text,
TextContent,
@ -8,7 +10,6 @@ import {
TextListVariants,
TextVariants,
} from '@patternfly/react-core';
import { useFormApi } from '@data-driven-forms/react-form-renderer';
import { Button, Popover } from '@patternfly/react-core';
import { HelpIcon } from '@patternfly/react-icons';
import {
@ -19,6 +20,7 @@ import {
Thead,
Tr,
} from '@patternfly/react-table';
import api from '../../../api';
const ActivationKeyInformation = () => {

View file

@ -1,5 +1,7 @@
import React, { useEffect, useState } from 'react';
import PropTypes from 'prop-types';
import useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';
import useFormApi from '@data-driven-forms/react-form-renderer/use-form-api';
import {
FormGroup,
Select,
@ -7,8 +9,8 @@ import {
SelectVariant,
Spinner,
} from '@patternfly/react-core';
import useFormApi from '@data-driven-forms/react-form-renderer/use-form-api';
import useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';
import PropTypes from 'prop-types';
import api from '../../../api';
const ActivationKeys = ({ label, isRequired, ...props }) => {

View file

@ -1,6 +1,7 @@
import React from 'react';
import { Button, FormGroup } from '@patternfly/react-core';
import useFormApi from '@data-driven-forms/react-form-renderer/use-form-api';
import { Button, FormGroup } from '@patternfly/react-core';
const AzureAuthButton = () => {
const { getState } = useFormApi();

View file

@ -1,4 +1,5 @@
import React from 'react';
import { Alert, Button } from '@patternfly/react-core';
import { ExternalLinkAltIcon } from '@patternfly/react-icons';

View file

@ -1,7 +1,8 @@
import React, { useContext, useState } from 'react';
import { Button } from '@patternfly/react-core';
import { FormSpy } from '@data-driven-forms/react-form-renderer';
import WizardContext from '@data-driven-forms/react-form-renderer/wizard-context';
import { Button } from '@patternfly/react-core';
import PropTypes from 'prop-types';
const CustomButtons = ({

View file

@ -1,7 +1,8 @@
import React, { useContext, useEffect, useState } from 'react';
import { useFormApi } from '@data-driven-forms/react-form-renderer';
import { Button } from '@patternfly/react-core';
import WizardContext from '@data-driven-forms/react-form-renderer/wizard-context';
import { Button } from '@patternfly/react-core';
import PropTypes from 'prop-types';
// FileSystemconfigButtons are defined separately to display errors inside of the button footer

View file

@ -1,8 +1,8 @@
import React, { useEffect, useState } from 'react';
import { ToggleGroup, ToggleGroupItem } from '@patternfly/react-core';
import useFormApi from '@data-driven-forms/react-form-renderer/use-form-api';
import useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';
import useFormApi from '@data-driven-forms/react-form-renderer/use-form-api';
import { ToggleGroup, ToggleGroupItem } from '@patternfly/react-core';
const FileSystemConfigToggle = ({ ...props }) => {
const { change, getState } = useFormApi();

View file

@ -1,9 +1,8 @@
import React, { useEffect, useRef, useState } from 'react';
import {
HelpIcon,
MinusCircleIcon,
PlusCircleIcon,
} from '@patternfly/react-icons';
import { FormSpy } from '@data-driven-forms/react-form-renderer';
import useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';
import useFormApi from '@data-driven-forms/react-form-renderer/use-form-api';
import {
Alert,
Button,
@ -12,6 +11,12 @@ import {
TextContent,
TextVariants,
} from '@patternfly/react-core';
import {
HelpIcon,
MinusCircleIcon,
PlusCircleIcon,
} from '@patternfly/react-icons';
import styles from '@patternfly/react-styles/css/components/Table/table';
import {
TableComposable,
Tbody,
@ -20,14 +25,11 @@ import {
Thead,
Tr,
} from '@patternfly/react-table';
import styles from '@patternfly/react-styles/css/components/Table/table';
import useFormApi from '@data-driven-forms/react-form-renderer/use-form-api';
import useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';
import { v4 as uuidv4 } from 'uuid';
import { FormSpy } from '@data-driven-forms/react-form-renderer';
import MountPoint from './MountPoint';
import SizeUnit from './SizeUnit';
import { UNIT_GIB } from '../../../constants';
let initialRow = {

View file

@ -1,13 +1,15 @@
import React, { useState } from 'react';
import PropTypes from 'prop-types';
import useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';
import useFormApi from '@data-driven-forms/react-form-renderer/use-form-api';
import {
FormGroup,
Select,
SelectOption,
SelectVariant,
} from '@patternfly/react-core';
import useFormApi from '@data-driven-forms/react-form-renderer/use-form-api';
import useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';
import PropTypes from 'prop-types';
import { RELEASES } from '../../../constants';
import isRhel from '../../../Utilities/isRhel';

View file

@ -1,12 +1,14 @@
import path from 'path';
import React, { useEffect, useState } from 'react';
import PropTypes from 'prop-types';
import path from 'path';
import {
Select,
SelectOption,
SelectVariant,
TextInput,
} from '@patternfly/react-core';
import PropTypes from 'prop-types';
const MountPoint = ({ ...props }) => {
// check '/' last!

View file

@ -1,7 +1,7 @@
import React, { useCallback, useEffect, useRef, useState } from 'react';
import useFormApi from '@data-driven-forms/react-form-renderer/use-form-api';
import useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';
import PropTypes from 'prop-types';
import useFormApi from '@data-driven-forms/react-form-renderer/use-form-api';
import {
DualListSelector,
DualListSelectorControl,
@ -18,6 +18,8 @@ import {
AngleLeftIcon,
AngleRightIcon,
} from '@patternfly/react-icons';
import PropTypes from 'prop-types';
import api from '../../../api';
// the fields isHidden and isSelected should not be included in the package list sent for image creation

View file

@ -1,4 +1,5 @@
import React, { useRef } from 'react';
import Radio from '@data-driven-forms/pf4-component-mapper/radio';
import PropTypes from 'prop-types';

View file

@ -1,5 +1,6 @@
import React, { useEffect, useState } from 'react';
import PropTypes from 'prop-types';
import useFormApi from '@data-driven-forms/react-form-renderer/use-form-api';
import {
Button,
DescriptionList,
@ -21,6 +22,7 @@ import {
TextListVariants,
TextVariants,
} from '@patternfly/react-core';
import { HelpIcon } from '@patternfly/react-icons';
import {
TableComposable,
Tbody,
@ -29,12 +31,13 @@ import {
Thead,
Tr,
} from '@patternfly/react-table';
import { HelpIcon } from '@patternfly/react-icons';
import useFormApi from '@data-driven-forms/react-form-renderer/use-form-api';
import PropTypes from 'prop-types';
import ActivationKeyInformation from './ActivationKeyInformation';
import { googleAccType } from '../steps/googleCloud';
import { RELEASES, UNIT_GIB, UNIT_MIB } from '../../../constants';
import isRhel from '../../../Utilities/isRhel';
import { googleAccType } from '../steps/googleCloud';
const FSReviewTable = ({ ...props }) => {
return (

View file

@ -1,11 +1,12 @@
import React, { useEffect, useState } from 'react';
import PropTypes from 'prop-types';
import {
Select,
SelectOption,
SelectVariant,
TextInput,
} from '@patternfly/react-core';
import PropTypes from 'prop-types';
import { UNIT_GIB, UNIT_KIB, UNIT_MIB } from '../../../constants';

View file

@ -1,7 +1,7 @@
import React, { useEffect, useState } from 'react';
import PropTypes from 'prop-types';
import useFormApi from '@data-driven-forms/react-form-renderer/use-form-api';
import useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';
import useFormApi from '@data-driven-forms/react-form-renderer/use-form-api';
import {
Checkbox,
FormGroup,
@ -9,6 +9,7 @@ import {
TextVariants,
Tile,
} from '@patternfly/react-core';
import PropTypes from 'prop-types';
const TargetEnvironment = ({ label, isRequired, ...props }) => {
const { getState, change } = useFormApi();