Skip to content
This repository has been archived by the owner on Dec 6, 2024. It is now read-only.

Commit

Permalink
fix lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
ShantelPeters committed Nov 26, 2024
1 parent 2373efe commit a19afe3
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 20 deletions.
8 changes: 4 additions & 4 deletions epress_backend/src/product.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const pinToIPFS = async (product: Product) => {
const url = "https://api.pinata.cloud/pinning/pinFileToIPFS";

const blob = new Blob([JSON.stringify(product, null, 2)], {
type: "application/json"
type: "application/json",
});

const file = new File([blob], `${product.product_id}.txt`);
Expand All @@ -29,9 +29,9 @@ const pinToIPFS = async (product: Product) => {
const response = await fetch(url, {
method: "POST",
headers: {
Authorization: `Bearer ${PINATA_JWT}`
Authorization: `Bearer ${PINATA_JWT}`,
},
body: data
body: data,
});

return await response.json();
Expand All @@ -52,7 +52,7 @@ export const submitProduct = async (req: Request, res: Response) => {
image,
manufacturer,
manufactureDate,
expiryDate
expiryDate,
};

try {
Expand Down
16 changes: 8 additions & 8 deletions epress_backend/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */

/* Language and Environment */
"target": "ES2015", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
"target": "ES2015" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
// "jsx": "preserve", /* Specify what JSX code is generated. */
// "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */
Expand All @@ -25,9 +25,9 @@
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */

/* Modules */
"module": "ES6", /* Specify what module code is generated. */
"module": "ES6" /* Specify what module code is generated. */,
// "rootDir": "./", /* Specify the root folder within your source files. */
"moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */
"moduleResolution": "node" /* Specify how TypeScript looks up a file from a given module specifier. */,
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
Expand Down Expand Up @@ -55,7 +55,7 @@
// "sourceMap": true, /* Create source map files for emitted JavaScript files. */
// "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
// "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
"outDir": "./dist", /* Specify an output folder for all emitted files. */
"outDir": "./dist" /* Specify an output folder for all emitted files. */,
// "removeComments": true, /* Disable emitting comments. */
//"noEmit": false, /* Disable emitting files from a compilation. */
// "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
Expand All @@ -77,12 +77,12 @@
// "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
// "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */
// "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
"esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
"esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */,
// "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
"forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
"forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,

/* Type Checking */
"strict": true, /* Enable all strict type-checking options. */
"strict": true /* Enable all strict type-checking options. */,
// "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
// "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
// "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
Expand All @@ -104,7 +104,7 @@

/* Completeness */
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
"skipLibCheck": true /* Skip type checking all .d.ts files. */
"skipLibCheck": true /* Skip type checking all .d.ts files. */
},
"include": ["**/*", "./**/*.d.ts"],
"exclude": ["node_modules"]
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ export default function RootLayout({
</body>
</html>
);
}
}
2 changes: 1 addition & 1 deletion frontend/src/app/theme-script.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ export const themeScript = `
} else {
document.documentElement.classList.remove('dark')
}
`;
`;
6 changes: 4 additions & 2 deletions frontend/src/components/ContentSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ const ContentSection = () => (

const ContentHeader = () => (
<div className="my-28 text-center px-4 md:px-0">
<div className={`${poppins.variable} text-center text-secondary dark:text-textPrimary mb-6`}>
<div
className={`${poppins.variable} text-center text-secondary dark:text-textPrimary mb-6`}
>
<h2
className={`${poppins.variable} hidden md:block md:text-2xl lg:text-4xl
font-semibold font-poppins`}
Expand Down Expand Up @@ -204,4 +206,4 @@ const GuideContentImage = () => (
</div>
);

export default ContentSection;
export default ContentSection;
2 changes: 1 addition & 1 deletion frontend/src/components/HeroSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@ const SocialProofItem = (props: any) => (
</div>
);

export default HeroSection;
export default HeroSection;
2 changes: 1 addition & 1 deletion frontend/src/components/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ const NavLinks = () => (
))}
</ul>
);
export default NavBar;
export default NavBar;
2 changes: 1 addition & 1 deletion frontend/src/components/ThemeProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ export function useTheme() {
throw new Error('useTheme must be used within a ThemeProvider');
}
return context;
}
}
2 changes: 1 addition & 1 deletion frontend/src/components/ThemeToggle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ export default function ThemeToggle() {
)}
</button>
);
}
}

0 comments on commit a19afe3

Please sign in to comment.