Skip to content

Commit

Permalink
feat: script and type
Browse files Browse the repository at this point in the history
  • Loading branch information
SAINIAbhishek committed Nov 20, 2024
1 parent ceb10d6 commit 4e1078e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
6 changes: 2 additions & 4 deletions frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ If you are developing a production application, we recommend updating the config
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "bundler",
"moduleResolution": "node",
"jsx": "react-jsx",
"strict": true,
"noImplicitAny": true,
Expand All @@ -49,7 +49,6 @@ If you are developing a production application, we recommend updating the config
"esModuleInterop": true,
"lib": ["ESNext", "DOM", "DOM.Iterable"],
"resolveJsonModule": true,
"allowImportingTsExtensions": true,
"noEmit": true,
"types": ["vite/client"],
"typeRoots": ["./@types", "./node_modules/@types"]
Expand All @@ -60,7 +59,7 @@ If you are developing a production application, we recommend updating the config

- **target: "ESNext":** Set the JavaScript language version for the output code to the latest ECMAScript features.
- **module: "ESNext":** Use the latest ECMAScript module features like import and export.
- **moduleResolution: "bundler":** Tells TypeScript how to resolve modules, optimized for bundlers like Vite.
- **moduleResolution: "node":** Tells TypeScript to use the latest module system available in JavaScript, which is ECMAScript Modules (ESM).
- **jsx: "react-jsx":** Enable the React 17 JSX transform without needing to import React in each JSX file.
- **strict: true:** Enables strict type-checking settings for better type safety.
- **noImplicitAny: true:** Prevents variables from being implicitly typed as any.
Expand All @@ -74,7 +73,6 @@ If you are developing a production application, we recommend updating the config
- **esModuleInterop: true:** Allows compatibility with CommonJS-style modules.
- **lib: ["ESNext", "DOM", "DOM.Iterable"]:** Specifies the libraries to include during compilation, ensuring support for the latest JavaScript and DOM features.
- **resolveJsonModule: true:** Allows importing JSON files as modules.
- **allowImportingTsExtensions: true:** Enables importing TypeScript files with .ts and .tsx extensions.
- **noEmit: true:** Prevents TypeScript from emitting JavaScript files during compilation, useful when using a bundler.
- **types: ["vite/client"]:** Specifies types related to Vite’s client-side environment for better type checking.
- **typeRoots: ["./@types", "./node_modules/@types"]:** Defines directories where TypeScript should look for type declarations.
Expand Down
5 changes: 3 additions & 2 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@
"lint": "npx eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"lint:fix": "npm run lint --fix",
"preview": "vite preview",
"format": "npx prettier . --write",
"format": "npx prettier \"**/*.+(json|ts|tsx)\" --write",
"install:packages": "npm i",
"upgrade:packages": "npm update --save-dev && npm update --save",
"audit": "npm audit --audit-level=high",
"audit:fix": "npm audit fix --force"
"audit:fix": "npm audit fix --force",
"types:check": "tsc --noEmit --pretty"
},
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^6.7.0",
Expand Down
3 changes: 1 addition & 2 deletions frontend/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "bundler",
"moduleResolution": "node",
"jsx": "react-jsx",
"strict": true,
"noImplicitAny": true,
Expand All @@ -17,7 +17,6 @@
"esModuleInterop": true,
"lib": ["ESNext", "DOM", "DOM.Iterable"],
"resolveJsonModule": true,
"allowImportingTsExtensions": true,
"noEmit": true,
"types": ["vite/client"],
"typeRoots": ["./@types", "./node_modules/@types"]
Expand Down

0 comments on commit 4e1078e

Please sign in to comment.