Skip to content

Commit 2f4aec5

Browse files
author
Hector Arce De Las Heras
committed
Fix typescript & eslint errors
1 parent 97342a1 commit 2f4aec5

File tree

5 files changed

+11
-10
lines changed

5 files changed

+11
-10
lines changed

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@
152152
"tsc-alias": "1.8.10",
153153
"typedoc": "^0.26.2",
154154
"typedoc-plugin-markdown": "^4.1.0",
155-
"typescript": "*",
155+
"typescript": "^5.4.5",
156156
"vite": "^5.3.1",
157157
"vite-tsconfig-paths": "^4.3.2",
158158
"yarn-deduplicate": "^6.0.2"
@@ -169,7 +169,6 @@
169169
"strip-ansi": "^6.0.1",
170170
"string-width": "^4.2.2",
171171
"wrap-ansi": "^7.0.0",
172-
"@typescript-eslint/utils": "6.13.0",
173172
"@babel/highlight": "7.24.1 "
174173
},
175174
"bugs": {

src/components/input/__tests__/input.test.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ function backspace(element) {
5656

5757
const writeText = jest.fn();
5858

59+
// eslint-disable-next-line n/no-unsupported-features/node-builtins
5960
Object.assign(navigator, {
6061
clipboard: {
6162
writeText,

src/components/inputCurrency/__tests__/inputCurrency.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import * as React from 'react';
33

44
import { axe } from 'jest-axe';
55

6-
import { InputContentPosition, InputState } from '@/components/input/types';
6+
import { FormatNumber, InputContentPosition, InputState } from '@/components/input/types';
77
import { renderProvider } from '@/tests/renderProvider/renderProvider.utility';
88
import { POSITIONS } from '@/types/positions';
99

@@ -28,7 +28,7 @@ const format = {
2828
style: 'decimal',
2929
maximumFractionDigits: 3,
3030
minimumFractionDigits: 1,
31-
};
31+
} as FormatNumber;
3232

3333
describe('New Input Currency Component', () => {
3434
test('Should render InputCurrency component', async () => {

src/hooks/useInput/__tests__/useInput.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
import { act, renderHook } from '@testing-library/react-hooks';
22
import React, { ChangeEvent } from 'react';
33

4+
import { FormatNumber } from '@/components';
45
import * as validationsProvider from '@/provider/validations/validationsProvider';
56

67
import { useInput } from '../useInput';
78

89
describe('useInput Hook', () => {
910
it('useInput - on internal change should call parent onChange', () => {
1011
const onChange = jest.fn();
11-
const formatNumber = { style: 'decimal' };
12+
const formatNumber = { style: 'decimal' } as FormatNumber;
1213
const ref = React.createRef<HTMLInputElement | undefined>();
1314
const currentValue = '123234';
1415
const regex = new RegExp('^[0-9]*$');
@@ -43,7 +44,7 @@ describe('useInput Hook', () => {
4344
});
4445
it('useInput - on internal blur should call parent onBlur', () => {
4546
const onBlur = jest.fn();
46-
const formatNumber = { style: 'decimal' };
47+
const formatNumber = { style: 'decimal' } as FormatNumber;
4748
const { result } = renderHook(() => useInput({ onBlur, formatNumber }));
4849

4950
act(() => {

tsconfig.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"baseUrl": "./src",
1010
"paths": {
1111
"@/*": ["./*"],
12-
"fixtures/*": ["./__fixtures__/*"],
12+
"fixtures/*": ["./__fixtures__/*"]
1313
},
1414
"typeRoots": ["src/types", "node_modules/@types"],
1515
"types": ["jest"],
@@ -22,8 +22,8 @@
2222
"strict": true,
2323
"noImplicitAny": false,
2424
"plugins": [],
25-
"skipLibCheck": true,
25+
"skipLibCheck": true
2626
},
27-
"exclude": [],
28-
"references": [{ "path": "./tsconfig.node.json" }],
27+
"exclude": ["./vite.config.ts"],
28+
"references": [{ "path": "./tsconfig.node.json" }]
2929
}

0 commit comments

Comments
 (0)