Skip to content

Commit

Permalink
🚨 Address linter errors found by maykin shared config
Browse files Browse the repository at this point in the history
  • Loading branch information
sergei-maertens committed Jan 6, 2025
1 parent 13b7d3e commit c913ed1
Show file tree
Hide file tree
Showing 12 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/components/AppDisplay.stories.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Body from 'components/Body';

import AppDisplay from './AppDisplay';
import {AppDisplay} from './AppDisplay';

export default {
title: 'Composites / App display',
Expand Down
2 changes: 1 addition & 1 deletion src/components/FormStep/FormStep.stories.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ export const Authenticated = {
},
};

export const govmetricEnabled = {
export const GovmetricEnabled = {
name: 'GovMetric enabled',
render,
args: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default {
},
};

export const withoutPayment = {
export const WithoutPayment = {
play: async ({canvasElement, args}) => {
const canvas = within(canvasElement);

Expand All @@ -50,7 +50,7 @@ export const withoutPayment = {
},
};

export const withPayment = {
export const WithPayment = {
parameters: {
reactRouter: {
location: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Summary/test.spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {MemoryRouter} from 'react-router-dom';
import {useAsync} from 'react-use';

import {testForm} from 'components/FormStart/fixtures';
import SubmissionSummary from 'components/Summary';
import {SubmissionSummary} from 'components/Summary';
import {SUBMISSION_ALLOWED} from 'components/constants';
import useRefreshSubmission from 'hooks/useRefreshSubmission';

Expand Down
2 changes: 1 addition & 1 deletion src/components/SummaryProgress/SummaryProgress.stories.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {withRouter} from 'storybook-addon-remix-react-router';

import SummaryProgress from './index';
import {SummaryProgress} from './index';

export default {
title: 'Private API / SummaryProgress',
Expand Down
2 changes: 1 addition & 1 deletion src/components/forms/RadioField/RadioField.stories.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {expect, userEvent, within} from '@storybook/test';

import {ConfigDecorator, FormikDecorator} from 'story-utils/decorators';

import RadioField from './RadioField';
import {RadioField} from './RadioField';

export default {
title: 'Pure React Components / Forms / RadioField',
Expand Down
1 change: 0 additions & 1 deletion src/components/forms/SelectField/SelectField.stories.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ export const MenuOpen = {
const delay = async delay => await new Promise(resolve => setTimeout(resolve, delay));

export const Async = {
name: 'Async',
render: function Render({getOptionsDelay, dynamicOptions, ...args}) {
const serializedOptions = JSON.stringify(dynamicOptions);
const getOptions = useCallback(async () => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/forms/TextField/TextField.stories.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {expect, userEvent, within} from '@storybook/test';

import {ConfigDecorator, FormikDecorator} from 'story-utils/decorators';

import TextField from './TextField';
import {TextField} from './TextField';

export default {
title: 'Pure React Components / Forms / TextField',
Expand Down
2 changes: 1 addition & 1 deletion src/formio/components/Email.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class Email extends Formio.Components.components.email {
const key = this.component.key;
const email = this.getValueAt(index) || '';
const callback = this.options.ofContext?.verifyEmailCallback;
callback && callback({key, email});
if (callback) callback({key, email});
});

return promise;
Expand Down
2 changes: 1 addition & 1 deletion src/formio/components/FileField.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const CSRFEnabledUrl = function (formio) {
try {
respData = typeof xhr.response === 'string' ? JSON.parse(xhr.response) : {};
respData = respData && respData.data ? respData.data : respData;
} catch (err) {
} catch {
respData = {};
}

Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useSessionTimeout.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const useSessionTimeout = onTimeout => {
const sessionMatch = useMatch('/sessie-verlopen');

const handleExpired = useCallback(() => {
onTimeout && onTimeout();
if (onTimeout) onTimeout();
if (!sessionMatch) navigate('/sessie-verlopen');
}, [onTimeout, navigate, sessionMatch]);

Expand Down
2 changes: 2 additions & 0 deletions src/jstests/formio/components/textfield.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ describe('TextField Component', () => {
componentCity.setValue('Amsterdam');

componentCity.handleSettingLocationData({postcode: '0000AA', houseNumber: '0'});
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
componentCity.setLocationData; // access the getter so the debounced method is created
componentCity._debouncedSetLocationData.flush();
await sleep(300);
Expand Down Expand Up @@ -107,6 +108,7 @@ describe('TextField Component', () => {
componentStreet.setValue('Beautiful Street');

componentStreet.handleSettingLocationData({postcode: '0000AA', houseNumber: '0'});
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
componentStreet.setLocationData; // access the getter so the debounced method is created
componentStreet._debouncedSetLocationData.flush();
await sleep(300);
Expand Down

0 comments on commit c913ed1

Please sign in to comment.