Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import js from '@eslint/js';
import tseslint from 'typescript-eslint';
import next from 'eslint-config-next';
import prettier from 'eslint-config-prettier/flat';

export default tseslint.config(
{
ignores: ['.next/**', 'node_modules/**', 'public/**', 'out/**', 'coverage/**'],
},
js.configs.recommended,
...tseslint.configs.recommended,
...next,
prettier,
{
rules: {
'no-console': 'off',
'max-len': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@next/next/inline-script-id': 'off',
'react/jsx-key': 'off',
'no-async-promise-executor': 'off',
'no-undef': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-non-null-asserted-optional-chain': 'off',
'@typescript-eslint/no-inferrable-types': 'off',
'no-prototype-builtins': 'warn',
'@typescript-eslint/no-empty-object-type': 'warn',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@next/next/no-before-interactive-script-outside-document': 'off',
'prefer-const': 'warn',
},
},
);
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

23 changes: 0 additions & 23 deletions .eslintrc.json

This file was deleted.

1 change: 0 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,6 @@ module.exports = {
];
},
images: {
domains: ['cdn-images-1.medium.com', process.env.CLOUDFLARE_STATIC_ASSETS_HOST, 'haveibeenpwned.com'],
remotePatterns: [
{
protocol: 'https',
Expand Down
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
"prod": "next export",
"cypress:open": "cypress open",
"cypress:run": "cypress run --browser chrome",
"lint": "eslint --quiet './**/*.{js,ts,tsx}'",
"lint": "eslint --quiet .",
"add:npmrc": "echo \"registry=https://registry.yarnpkg.com/\" >> .npmrc && echo \"@internxt:registry=https://npm.pkg.github.com\" >> .npmrc && echo \"//npm.pkg.github.com/:_authToken=$NPM_TOKEN\" >> .npmrc && echo \"always-auth=true\" >> .npmrc",
"vercel:install": "yarn run add:npmrc && yarn install"
"vercel:install": "yarn run add:npmrc && yarn install",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@cemalgnlts/mailjs": "^3.0.1",
Expand All @@ -41,7 +42,6 @@
"docx": "^9.5.1",
"dompurify": "^3.4.13",
"dotenv": "^8.2.0",
"eslint-config-next": "13",
"exifr": "^7.1.3",
"hamburger-react": "^2.4.1",
"jszip": "^3.10.1",
Expand Down Expand Up @@ -73,20 +73,22 @@
"@svgr/webpack": "^6.5.1",
"@types/jest": "^29.4.0",
"@types/memory-cache": "^0.2.1",
"@types/node": "^15.0.1",
"@typescript-eslint/eslint-plugin": "^4.22.0",
"@typescript-eslint/parser": "^4.22.0",
"@types/node": "^22.20.1",
"@types/react": "^18.2.31",
"@types/react-dom": "^18.3.7",
"cypress": "^13.12.0",
"eslint": "^7.32.0",
"eslint-config-prettier": "^9.1.0",
"eslint": "^10.8.0",
"eslint-config-prettier": "^10.1.8",
"next-unused": "^0.0.6",
"postcss": "8.5.23",
"prettier": "2.7.1",
"prettier-plugin-tailwindcss": "0.1.13",
"reset-css": "5.0.1",
"sass": "1.41.0",
"tailwindcss": "^3.4.10",
"typescript": "^4.1.5"
"typescript": "^5.9.3",
"typescript-eslint": "^8.66.0",
"eslint-config-next": "16.2.11"
},
"browser": {
"child_process": false
Expand All @@ -107,8 +109,6 @@
"jspdf": "^4.2.0",
"**/@cypress/request/qs": "^6.15.2",
"minimatch": "^10.2.3",
"picomatch": "^2.3.2",
"tinyglobby/picomatch": "^4.0.3",
"sharp": "^0.35.0"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/metadataRemover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ async function handleWordMetadata(file: File): Promise<Blob> {
});

const buffer = await Packer.toBuffer(originalDoc);
return new Blob([buffer], { type: file.type });
return new Blob([new Uint8Array(buffer)], { type: file.type });
} catch (error) {
console.warn('Error copying document content:', error);
return new Blob([arrayBuffer], { type: file.type });
Expand Down
2 changes: 1 addition & 1 deletion src/pages/api/stripe/get_coupons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface PromotionCode {
percentOff: string;
}

export default async function handler(req: NextApiRequest, res: NextApiResponse): Promise<PromotionCode | void> {
export default async function handler(req: NextApiRequest, res: NextApiResponse): Promise<any> {
if (req.method === 'OPTIONS') {
res.status(200).json({});
}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/api/stripe/stripe_products.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export interface Product {

const PRODUCTS_URL = `${process.env.NEXT_PUBLIC_PAYMENTS_API}/prices`;

export default async function handler(req: NextApiRequest, res: NextApiResponse): Promise<void> {
export default async function handler(req: NextApiRequest, res: NextApiResponse): Promise<any> {
if (req.method === 'GET') {
const { currency } = req.query;

Expand Down
2 changes: 1 addition & 1 deletion src/services/file-converter.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ const handleImageToTextConverter = async (imageToConvert: File) => {
});

const pdfBytes = await pdfDoc.save();
const blob = new Blob([pdfBytes], { type: 'application/pdf' });
const blob = new Blob([pdfBytes.buffer as ArrayBuffer], { type: 'application/pdf' });
const url = window.URL.createObjectURL(blob);

downloadBlob(url, filename);
Expand Down
8 changes: 4 additions & 4 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@/assets/*": ["assets/*"],
"@/*": ["./*"]
},
"target": "es5",
"target": "es2022",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
Expand All @@ -21,7 +21,7 @@
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "react-jsx",
Expand All @@ -31,9 +31,9 @@
"name": "next"
}
],
"strictNullChecks": true
"strictNullChecks": true,
"types": ["cypress", "node"]
},
"types": ["cypress", "node"],
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", ".next/dev/types/**/*.ts"],
"exclude": ["node_modules"]
}
Loading
Loading