Skip to content

Commit f248436

Browse files
committed
fix: type issue
1 parent 740d027 commit f248436

3 files changed

Lines changed: 6 additions & 57 deletions

File tree

README.md

Lines changed: 1 addition & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,3 @@
11
# React + TypeScript + Vite
22

3-
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
4-
5-
Currently, two official plugins are available:
6-
7-
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
8-
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
9-
10-
## Expanding the ESLint configuration
11-
12-
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
13-
14-
```js
15-
export default tseslint.config({
16-
extends: [
17-
// Remove ...tseslint.configs.recommended and replace with this
18-
...tseslint.configs.recommendedTypeChecked,
19-
// Alternatively, use this for stricter rules
20-
...tseslint.configs.strictTypeChecked,
21-
// Optionally, add this for stylistic rules
22-
...tseslint.configs.stylisticTypeChecked,
23-
],
24-
languageOptions: {
25-
// other options...
26-
parserOptions: {
27-
project: ['./tsconfig.node.json', './tsconfig.app.json'],
28-
tsconfigRootDir: import.meta.dirname,
29-
},
30-
},
31-
})
32-
```
33-
34-
You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
35-
36-
```js
37-
// eslint.config.js
38-
import reactX from 'eslint-plugin-react-x'
39-
import reactDom from 'eslint-plugin-react-dom'
40-
41-
export default tseslint.config({
42-
plugins: {
43-
// Add the react-x and react-dom plugins
44-
'react-x': reactX,
45-
'react-dom': reactDom,
46-
},
47-
rules: {
48-
// other rules...
49-
// Enable its recommended typescript rules
50-
...reactX.configs['recommended-typescript'].rules,
51-
...reactDom.configs.recommended.rules,
52-
},
53-
})
54-
```
3+
- npx playwright install

biome.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
33
"vcs": {
4-
"enabled": false,
4+
"enabled": true,
55
"clientKind": "git",
6-
"useIgnoreFile": false
6+
"useIgnoreFile": true
77
},
88
"files": {
99
"ignoreUnknown": false,
10-
"ignore": ["tsconfig*.json"]
10+
"ignore": ["tsconfig*.json", "dist", "node_modules"]
1111
},
1212
"formatter": {
1313
"enabled": true,

src/features/JWPDecoder/libs/verify/verifyJWP.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export const verifyIssuedJwp = (jwk: string, jwp: string): VerifyResult => {
2020
publicJwkInstance.free();
2121
return { verified: result };
2222
} catch (error) {
23-
return { verified: false, message: error };
23+
return { verified: false, message: String(error) };
2424
}
2525
};
2626

@@ -37,6 +37,6 @@ export const verifyPresentedJwp = (jwk: string, jwp: string): VerifyResult => {
3737
publicJwkInstance.free();
3838
return { verified: result };
3939
} catch (error) {
40-
return { verified: false, message: error };
40+
return { verified: false, message: String(error) };
4141
}
4242
};

0 commit comments

Comments
 (0)