Skip to content

Commit

Permalink
refactor: optimize imports
Browse files Browse the repository at this point in the history
  • Loading branch information
iib0011 committed Jul 13, 2024
1 parent 424436d commit 3c5c0b9
Show file tree
Hide file tree
Showing 31 changed files with 59 additions and 63 deletions.
57 changes: 35 additions & 22 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/pages/list/duplicate/duplicate.service.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect, describe, it } from 'vitest';
import { describe, expect, it } from 'vitest';
import { duplicateList } from './service';

describe('duplicateList function', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
import { expect, describe, it } from 'vitest';
import {
TopItemsList,
SplitOperatorType,
SortingMethod,
DisplayFormat
} from './service';
import { describe, expect, it } from 'vitest';
import { TopItemsList } from './service';

describe('TopItemsList function', () => {
it('should handle sorting alphabetically ignoring case', () => {
Expand Down
1 change: 0 additions & 1 deletion src/pages/list/find-most-popular/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Box } from '@mui/material';
import React, { useState } from 'react';
import ToolTextInput from '../../../components/input/ToolTextInput';
import ToolTextResult from '../../../components/result/ToolTextResult';
import * as Yup from 'yup';
import ToolOptions from '../../../components/options/ToolOptions';
import {
DisplayFormat,
Expand Down
2 changes: 1 addition & 1 deletion src/pages/list/find-unique/find-unique.service.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect, describe, it } from 'vitest';
import { describe, expect } from 'vitest';

import { findUniqueCompute } from './service';

Expand Down
1 change: 0 additions & 1 deletion src/pages/list/find-unique/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Box } from '@mui/material';
import React, { useState } from 'react';
import ToolTextInput from '../../../components/input/ToolTextInput';
import ToolTextResult from '../../../components/result/ToolTextResult';
import * as Yup from 'yup';
import ToolOptions from '../../../components/options/ToolOptions';
import { findUniqueCompute, SplitOperatorType } from './service';
import ToolInputAndResult from '../../../components/ToolInputAndResult';
Expand Down
2 changes: 1 addition & 1 deletion src/pages/list/group/group.service.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect, describe, it } from 'vitest';
import { describe, expect, it } from 'vitest';

import { groupList, SplitOperatorType } from './service';

Expand Down
1 change: 0 additions & 1 deletion src/pages/list/group/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Box } from '@mui/material';
import React, { useState } from 'react';
import ToolTextInput from '../../../components/input/ToolTextInput';
import ToolTextResult from '../../../components/result/ToolTextResult';
import * as Yup from 'yup';
import ToolOptions from '../../../components/options/ToolOptions';
import { groupList, SplitOperatorType } from './service';
import ToolInputAndResult from '../../../components/ToolInputAndResult';
Expand Down
3 changes: 2 additions & 1 deletion src/pages/list/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ export const listTools = [
listWrap,
listRotate,
listShuffle,
listTruncate
listTruncate,
listDuplicate
];
1 change: 0 additions & 1 deletion src/pages/list/reverse/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Box } from '@mui/material';
import React, { useState } from 'react';
import ToolTextInput from '../../../components/input/ToolTextInput';
import ToolTextResult from '../../../components/result/ToolTextResult';
import * as Yup from 'yup';
import ToolOptions from '../../../components/options/ToolOptions';
import { reverseList, SplitOperatorType } from './service';
import ToolInputAndResult from '../../../components/ToolInputAndResult';
Expand Down
2 changes: 1 addition & 1 deletion src/pages/list/reverse/reverse.service.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect, describe, it } from 'vitest';
import { describe, expect } from 'vitest';
import { reverseList } from './service';

describe('reverseList Function', () => {
Expand Down
1 change: 0 additions & 1 deletion src/pages/list/rotate/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Box } from '@mui/material';
import React, { useState } from 'react';
import ToolTextInput from '../../../components/input/ToolTextInput';
import ToolTextResult from '../../../components/result/ToolTextResult';
import * as Yup from 'yup';
import ToolOptions from '../../../components/options/ToolOptions';
import { rotateList, SplitOperatorType } from './service';
import ToolInputAndResult from '../../../components/ToolInputAndResult';
Expand Down
4 changes: 2 additions & 2 deletions src/pages/list/rotate/rotate.service.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { expect, describe, it } from 'vitest';
import { SplitOperatorType, rotateList } from './service';
import { describe, expect, it } from 'vitest';
import { rotateList, SplitOperatorType } from './service';

describe('rotate function', () => {
it('should rotate right side if right is set to true', () => {
Expand Down
1 change: 0 additions & 1 deletion src/pages/list/rotate/service.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { isNumber } from 'utils/string';
export type SplitOperatorType = 'symbol' | 'regex';

function rotateArray(array: string[], step: number, right: boolean): string[] {
Expand Down
2 changes: 0 additions & 2 deletions src/pages/list/shuffle/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@ import { Box } from '@mui/material';
import React, { useState } from 'react';
import ToolTextInput from '../../../components/input/ToolTextInput';
import ToolTextResult from '../../../components/result/ToolTextResult';
import * as Yup from 'yup';
import ToolOptions from '../../../components/options/ToolOptions';
import { shuffleList, SplitOperatorType } from './service';
import ToolInputAndResult from '../../../components/ToolInputAndResult';
import SimpleRadio from '../../../components/options/SimpleRadio';
import TextFieldWithDesc from '../../../components/options/TextFieldWithDesc';
import { formatNumber } from '../../../utils/number';
import { isNumber } from '../../../utils/string';

const initialValues = {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/list/shuffle/shuffle.service.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect, describe, it } from 'vitest';
import { describe, expect, it } from 'vitest';
import { shuffleList, SplitOperatorType } from './service';

describe('shuffle function', () => {
Expand Down
1 change: 0 additions & 1 deletion src/pages/list/sort/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Box } from '@mui/material';
import React, { useState } from 'react';
import ToolTextInput from '../../../components/input/ToolTextInput';
import ToolTextResult from '../../../components/result/ToolTextResult';
import * as Yup from 'yup';
import ToolOptions from '../../../components/options/ToolOptions';
import { Sort, SortingMethod, SplitOperatorType } from './service';
import ToolInputAndResult from '../../../components/ToolInputAndResult';
Expand Down
6 changes: 3 additions & 3 deletions src/pages/list/sort/sort.service.test.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// Import necessary modules and functions
import { describe, it, expect } from 'vitest';
import { describe, expect, it } from 'vitest';
import {
alphabeticSort,
lengthSort,
numericSort,
Sort,
SplitOperatorType,
SortingMethod
SortingMethod,
SplitOperatorType
} from './service';

// Define test cases for the numericSort function
Expand Down
2 changes: 1 addition & 1 deletion src/pages/list/truncate/truncate.service.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect, describe, it } from 'vitest';
import { describe, expect, it } from 'vitest';

import { SplitOperatorType, truncateList } from './service';

Expand Down
2 changes: 1 addition & 1 deletion src/pages/list/unwrap/unwrap.service.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect, describe, it } from 'vitest';
import { describe, expect, it } from 'vitest';
import { unwrapList } from './service';

describe('unwrapList function', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/list/wrap/wrap.service.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect, describe, it } from 'vitest';
import { describe, expect, it } from 'vitest';
import { SplitOperatorType, wrapList } from './service';

describe('wrap function', () => {
Expand Down
1 change: 0 additions & 1 deletion src/pages/number/generate/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Box } from '@mui/material';
import React, { useState } from 'react';
import ToolTextResult from '../../../components/result/ToolTextResult';
import * as Yup from 'yup';
import ToolOptions from '../../../components/options/ToolOptions';
import { listOfIntegers } from './service';
import ToolInputAndResult from '../../../components/ToolInputAndResult';
Expand Down
1 change: 0 additions & 1 deletion src/pages/number/sum/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Box } from '@mui/material';
import React, { useState } from 'react';
import ToolTextInput from '../../../components/input/ToolTextInput';
import ToolTextResult from '../../../components/result/ToolTextResult';
import * as Yup from 'yup';
import ToolOptions from '../../../components/options/ToolOptions';
import { compute, NumberExtractionType } from './service';
import RadioWithTextField from '../../../components/options/RadioWithTextField';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { expect, describe, it } from 'vitest';
import { createPalindromeList, createPalindrome } from './service';
import { describe, expect } from 'vitest';
import { createPalindrome, createPalindromeList } from './service';

describe('createPalindrome', () => {
test('should create palindrome by reversing the entire string', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect, describe, it } from 'vitest';
import { describe, expect, it } from 'vitest';
import { extractSubstring } from './service';

describe('extractSubstring', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/string/palindrome/palindrome.service.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect, describe, it } from 'vitest';
import { describe, expect } from 'vitest';
import { palindromeList } from './service';

describe('palindromeList', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect, describe, it } from 'vitest';
import { describe, expect, it } from 'vitest';
import { randomizeCase } from './service';

describe('randomizeCase', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/string/reverse/reverse.service.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect, describe, it } from 'vitest';
import { describe, expect, it } from 'vitest';
import { stringReverser } from './service';

describe('stringReverser', () => {
Expand Down
1 change: 0 additions & 1 deletion src/pages/string/split/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Box } from '@mui/material';
import React, { useState } from 'react';
import ToolTextInput from '../../../components/input/ToolTextInput';
import ToolTextResult from '../../../components/result/ToolTextResult';
import * as Yup from 'yup';
import ToolOptions from '../../../components/options/ToolOptions';
import { compute, SplitOperatorType } from './service';
import RadioWithTextField from '../../../components/options/RadioWithTextField';
Expand Down
1 change: 0 additions & 1 deletion src/pages/string/to-morse/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Box } from '@mui/material';
import React, { useState } from 'react';
import ToolTextInput from '../../../components/input/ToolTextInput';
import ToolTextResult from '../../../components/result/ToolTextResult';
import * as Yup from 'yup';
import ToolOptions from '../../../components/options/ToolOptions';
import { compute } from './service';
import TextFieldWithDesc from '../../../components/options/TextFieldWithDesc';
Expand Down
2 changes: 1 addition & 1 deletion src/pages/string/uppercase/uppercase.service.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect, describe, it } from 'vitest';
import { describe, expect, it } from 'vitest';
import { UppercaseInput } from './service';

describe('UppercaseInput', () => {
Expand Down

0 comments on commit 3c5c0b9

Please sign in to comment.