diff --git a/.commitlintrc.mjs b/.commitlintrc.mjs index 52e6c21..e3610d9 100644 --- a/.commitlintrc.mjs +++ b/.commitlintrc.mjs @@ -1,4 +1,4 @@ -export default { +const config = { extends: ['@commitlint/config-conventional'], rules: { 'type-enum': [ @@ -26,3 +26,5 @@ export default { }, ignores: [(message) => message.includes('WIP'), (message) => message.includes('wip')], }; + +export default config; diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index 6b10a5b..0000000 --- a/.eslintrc.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "extends": [ - "next/core-web-vitals", - "next/typescript" - ] -} diff --git a/.github/workflows/vitest.yml b/.github/workflows/vitest.yml index b9418cc..c5fa3da 100644 --- a/.github/workflows/vitest.yml +++ b/.github/workflows/vitest.yml @@ -46,4 +46,4 @@ jobs: run: npm ci - name: Run ESLint - run: npm run lint + run: npx eslint diff --git a/Components/Repo/Repo.tsx b/Components/Repo/Repo.tsx index 4597781..a659670 100644 --- a/Components/Repo/Repo.tsx +++ b/Components/Repo/Repo.tsx @@ -1,4 +1,4 @@ -import { useState } from 'react'; +import { useState, useMemo } from 'react'; import classes from './Repo.module.css'; import { IconSettings, @@ -22,6 +22,8 @@ type RepoProps = Omit & { export default function Repo(props: RepoProps) { const isMobile = useMedia({ maxWidth: 1000 }); + const currentDate = useMemo(() => new Date(), []); + //Load displayDetails from LocalStorage const displayDetailsFromLS = (): boolean => { const key = `displayDetailsRepo${props.id}`; @@ -110,7 +112,7 @@ export default function Repo(props: RepoProps) { > {props.lastSave === 0 ? '-' - : formatDistanceStrict(fromUnixTime(props.lastSave), Date.now(), { + : formatDistanceStrict(fromUnixTime(props.lastSave), currentDate, { addSuffix: true, })} @@ -177,7 +179,7 @@ export default function Repo(props: RepoProps) { > {props.lastSave === 0 ? '-' - : formatDistanceStrict(fromUnixTime(props.lastSave), Date.now(), { + : formatDistanceStrict(fromUnixTime(props.lastSave), currentDate, { addSuffix: true, })} @@ -223,7 +225,7 @@ export default function Repo(props: RepoProps) { > {props.lastSave === 0 ? '-' - : formatDistanceStrict(fromUnixTime(props.lastSave), Date.now(), { + : formatDistanceStrict(fromUnixTime(props.lastSave), currentDate, { addSuffix: true, })} diff --git a/Components/WizardSteps/WizardStep1/WizardStep1.tsx b/Components/WizardSteps/WizardStep1/WizardStep1.tsx index ef5b7b3..d417ddc 100644 --- a/Components/WizardSteps/WizardStep1/WizardStep1.tsx +++ b/Components/WizardSteps/WizardStep1/WizardStep1.tsx @@ -48,15 +48,7 @@ function WizardStep1() { Vorta . -
- Vorta runs on Linux, MacOS and Windows (via Windows’ Linux Subsystem (WSL)). Find the right - way to install it{' '} - - just here - - . - Vorta GIF ); } diff --git a/Components/WizardSteps/WizardStep2/WizardStep2.tsx b/Components/WizardSteps/WizardStep2/WizardStep2.tsx index 72d29ac..e4f760b 100644 --- a/Components/WizardSteps/WizardStep2/WizardStep2.tsx +++ b/Components/WizardSteps/WizardStep2/WizardStep2.tsx @@ -69,8 +69,8 @@ function WizardStep2(props: WizardStepProps) {

Pika, Vorta...

- To "Initialize a new repository" or "Add existing repository", copy this into the field - "Repository URL" of your graphical client : + To "Initialize a new repository" or "Add existing repository", copy this + into the field "Repository URL" of your graphical client :
Check the fingerprint of server
To check that you are talking to the right server, please make sure to validate one of the - following key's fingerprint when you first connect : + following key's fingerprint when you first connect :
  • ECDSA : {wizardEnv?.SSH_SERVER_FINGERPRINT_ECDSA} diff --git a/Components/WizardSteps/WizardStep3/WizardStep3.tsx b/Components/WizardSteps/WizardStep3/WizardStep3.tsx index 5d70c4b..1b065f1 100644 --- a/Components/WizardSteps/WizardStep3/WizardStep3.tsx +++ b/Components/WizardSteps/WizardStep3/WizardStep3.tsx @@ -102,7 +102,7 @@ function WizardStep3(props: WizardStepProps) { }} >
    - borg export-tar --tar-filter="gzip -9" ssh:// + borg export-tar --tar-filter="gzip -9" ssh:// {UNIX_USER}@{FQDN} {SSH_SERVER_PORT}/./ {props.selectedRepo?.repositoryName} diff --git a/Containers/RepoList/RepoList.tsx b/Containers/RepoList/RepoList.tsx index 0048a5b..d9160f0 100644 --- a/Containers/RepoList/RepoList.tsx +++ b/Containers/RepoList/RepoList.tsx @@ -42,8 +42,16 @@ export default function RepoList() { const [displayRepoAdd, setDisplayRepoAdd] = useState(false); const [displayRepoEdit, setDisplayRepoEdit] = useState(false); const [wizardEnv, setWizardEnv] = useState>(); - const [sortOption, setSortOption] = useState('alias-asc'); - const [searchQuery, setSearchQuery] = useState(''); + + const [sortOption, setSortOption] = useState(() => { + const savedSort = localStorage.getItem('repoSort'); + return (savedSort as SortOption) || 'alias-asc'; + }); + + const [searchQuery, setSearchQuery] = useState(() => { + const savedSearch = localStorage.getItem('repoSearch'); + return savedSearch || ''; + }); const toastOptions: ToastOptions = { position: 'top-right', @@ -55,21 +63,10 @@ export default function RepoList() { progress: undefined, }; - // Load filters from localStorage useEffect(() => { - const savedSort = localStorage.getItem('repoSort'); - const savedSearch = localStorage.getItem('repoSearch'); - if (savedSort) setSortOption(savedSort as SortOption); - if (savedSearch) setSearchQuery(savedSearch); - }, []); - - useEffect(() => { - if (router.pathname === '/manage-repo/add') { - setDisplayRepoAdd(!displayRepoAdd); - } - if (router.pathname.startsWith('/manage-repo/edit')) { - setDisplayRepoEdit(!displayRepoEdit); - } + // eslint-disable-next-line react-hooks/set-state-in-effect + setDisplayRepoAdd(router.pathname === '/manage-repo/add'); + setDisplayRepoEdit(router.pathname.startsWith('/manage-repo/edit')); const fetchWizardEnv = async () => { try { @@ -81,7 +78,7 @@ export default function RepoList() { } }; fetchWizardEnv(); - }, []); + }, [router.pathname]); const fetcher = async (url: string) => await fetch(url).then((res) => res.json()); const { data, error } = useSWR('/api/v1/repositories', fetcher); diff --git a/Containers/SetupWizard/SetupWizard.tsx b/Containers/SetupWizard/SetupWizard.tsx index b070668..39c0dd2 100644 --- a/Containers/SetupWizard/SetupWizard.tsx +++ b/Containers/SetupWizard/SetupWizard.tsx @@ -63,7 +63,10 @@ function SetupWizard(props: SetupWizardProps) { //Component did update useEffect(() => { //Go to the step in the URL param when URL change - props.step && setStep(props.step); + if (props.step) { + // eslint-disable-next-line react-hooks/set-state-in-effect + setStep(props.step); + } }, [props.step]); //Options for react-select diff --git a/Containers/UserSettings/AppriseAlertSettings/AppriseAlertSettings.tsx b/Containers/UserSettings/AppriseAlertSettings/AppriseAlertSettings.tsx index e9efe23..6b77206 100644 --- a/Containers/UserSettings/AppriseAlertSettings/AppriseAlertSettings.tsx +++ b/Containers/UserSettings/AppriseAlertSettings/AppriseAlertSettings.tsx @@ -58,6 +58,7 @@ export default function AppriseAlertSettings() { } }; getAppriseAlert(); + // eslint-disable-next-line react-hooks/exhaustive-deps }, []); ////Functions diff --git a/Containers/UserSettings/AppriseAlertSettings/AppriseURLs/AppriseURLs.tsx b/Containers/UserSettings/AppriseAlertSettings/AppriseURLs/AppriseURLs.tsx index 878b0e7..e5b87f7 100644 --- a/Containers/UserSettings/AppriseAlertSettings/AppriseURLs/AppriseURLs.tsx +++ b/Containers/UserSettings/AppriseAlertSettings/AppriseURLs/AppriseURLs.tsx @@ -47,6 +47,7 @@ export default function AppriseURLs() { } }; getAppriseServices(); + // eslint-disable-next-line react-hooks/exhaustive-deps }, []); //Form submit handler to modify Apprise services diff --git a/Containers/UserSettings/EmailAlertSettings/EmailAlertSettings.tsx b/Containers/UserSettings/EmailAlertSettings/EmailAlertSettings.tsx index b9aad9c..ff67786 100644 --- a/Containers/UserSettings/EmailAlertSettings/EmailAlertSettings.tsx +++ b/Containers/UserSettings/EmailAlertSettings/EmailAlertSettings.tsx @@ -56,6 +56,7 @@ export default function EmailAlertSettings() { } }; dataFetch(); + // eslint-disable-next-line react-hooks/exhaustive-deps }, []); ////Functions diff --git a/Containers/UserSettings/Integrations/Integrations.tsx b/Containers/UserSettings/Integrations/Integrations.tsx index 9897fce..90c5748 100644 --- a/Containers/UserSettings/Integrations/Integrations.tsx +++ b/Containers/UserSettings/Integrations/Integrations.tsx @@ -84,6 +84,7 @@ export default function Integrations() { ////LifeCycle useEffect(() => { fetchTokenList(); + // eslint-disable-next-line react-hooks/exhaustive-deps }, []); // Permissions handler diff --git a/Containers/UserSettings/UserSettings.tsx b/Containers/UserSettings/UserSettings.tsx index ea6d9ba..a561fb2 100644 --- a/Containers/UserSettings/UserSettings.tsx +++ b/Containers/UserSettings/UserSettings.tsx @@ -41,7 +41,8 @@ export default function UserSettings({ data }: UserSettingsProps) { if (tab === 'Integrations' && wizardEnv?.DISABLE_INTEGRATIONS === 'true') { setTab('General'); } - }, [wizardEnv, tab]); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [wizardEnv?.DISABLE_INTEGRATIONS]); return (
    diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 0000000..2044e89 --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,16 @@ +import { defineConfig, globalIgnores } from 'eslint/config'; +import nextVitals from 'eslint-config-next/core-web-vitals'; + +const eslintConfig = defineConfig([ + ...nextVitals, + // Override default ignores of eslint-config-next. + globalIgnores([ + // Default ignores of eslint-config-next: + '.next/**', + 'out/**', + 'build/**', + 'next-env.d.ts', + ]), +]); + +export default eslintConfig; diff --git a/next-env.d.ts b/next-env.d.ts index 1970904..7996d35 100644 --- a/next-env.d.ts +++ b/next-env.d.ts @@ -1,6 +1,6 @@ /// /// -import "./.next/types/routes.d.ts"; +import "./.next/dev/types/routes.d.ts"; // NOTE: This file should not be edited // see https://nextjs.org/docs/pages/api-reference/config/typescript for more information. diff --git a/package-lock.json b/package-lock.json index 09235be..89c1389 100644 --- a/package-lock.json +++ b/package-lock.json @@ -37,6 +37,7 @@ "@types/nprogress": "^0.2.3", "@types/react": "^19.2.7", "@types/supertest": "^6.0.3", + "eslint": "^9.39.1", "eslint-config-next": "^16.0.7", "husky": "^9.1.7", "node-mocks-http": "^1.17.2", @@ -1949,7 +1950,6 @@ "integrity": "sha512-aw1gNayWpdI/jSYVgzN5pL0cfzU02GT3NBpeT/DXbx1/1x7ZKxFPd9bwrzygx/qiwIQiJ1sw/zD8qY/kRvlGHA==", "dev": true, "license": "Apache-2.0", - "peer": true, "dependencies": { "@eslint/object-schema": "^2.1.7", "debug": "^4.3.1", @@ -1965,7 +1965,6 @@ "integrity": "sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==", "dev": true, "license": "Apache-2.0", - "peer": true, "dependencies": { "@eslint/core": "^0.17.0" }, @@ -1979,7 +1978,6 @@ "integrity": "sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==", "dev": true, "license": "Apache-2.0", - "peer": true, "dependencies": { "@types/json-schema": "^7.0.15" }, @@ -1993,7 +1991,6 @@ "integrity": "sha512-Kr+LPIUVKz2qkx1HAMH8q1q6azbqBAsXJUxBl/ODDuVPX45Z9DfwB8tPjTi6nNZ8BuM3nbJxC5zCAg5elnBUTQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", @@ -2018,7 +2015,6 @@ "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -2035,8 +2031,7 @@ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/@eslint/js": { "version": "9.39.1", @@ -2044,7 +2039,6 @@ "integrity": "sha512-S26Stp4zCy88tH94QbBv3XCuzRQiZ9yXofEILmglYTh/Ug/a9/umqvgFtYBAo3Lp0nsI/5/qH1CCrbdK3AP1Tw==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, @@ -2058,7 +2052,6 @@ "integrity": "sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==", "dev": true, "license": "Apache-2.0", - "peer": true, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } @@ -2069,7 +2062,6 @@ "integrity": "sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==", "dev": true, "license": "Apache-2.0", - "peer": true, "dependencies": { "@eslint/core": "^0.17.0", "levn": "^0.4.1" @@ -2109,7 +2101,6 @@ "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", "dev": true, "license": "Apache-2.0", - "peer": true, "engines": { "node": ">=18.18.0" } @@ -2120,7 +2111,6 @@ "integrity": "sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ==", "dev": true, "license": "Apache-2.0", - "peer": true, "dependencies": { "@humanfs/core": "^0.19.1", "@humanwhocodes/retry": "^0.4.0" @@ -2135,7 +2125,6 @@ "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", "dev": true, "license": "Apache-2.0", - "peer": true, "engines": { "node": ">=12.22" }, @@ -2150,7 +2139,6 @@ "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", "dev": true, "license": "Apache-2.0", - "peer": true, "engines": { "node": ">=18.18" }, @@ -3933,8 +3921,7 @@ "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/@types/json5": { "version": "0.0.29", @@ -4683,7 +4670,6 @@ "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "dev": true, "license": "MIT", - "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -4697,7 +4683,6 @@ "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, "license": "MIT", - "peer": true, "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } @@ -5459,7 +5444,6 @@ "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -5581,8 +5565,7 @@ "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/define-data-property": { "version": "1.1.4", @@ -5997,7 +5980,6 @@ "integrity": "sha512-BhHmn2yNOFA9H9JmmIVKJmd288g9hrVRDkdoIgRCRuSySRUHH7r/DI6aAXW9T1WwUuY3DFgrcaqB+deURBLR5g==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.1", @@ -6348,7 +6330,6 @@ "integrity": "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==", "dev": true, "license": "BSD-2-Clause", - "peer": true, "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" @@ -6379,7 +6360,6 @@ "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -6397,7 +6377,6 @@ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -6415,7 +6394,6 @@ "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" @@ -6432,8 +6410,7 @@ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/eslint/node_modules/locate-path": { "version": "6.0.0", @@ -6441,7 +6418,6 @@ "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "p-locate": "^5.0.0" }, @@ -6458,7 +6434,6 @@ "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "yocto-queue": "^0.1.0" }, @@ -6475,7 +6450,6 @@ "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "p-limit": "^3.0.2" }, @@ -6492,7 +6466,6 @@ "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=8" } @@ -6503,7 +6476,6 @@ "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=10" }, @@ -6517,7 +6489,6 @@ "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==", "dev": true, "license": "BSD-2-Clause", - "peer": true, "dependencies": { "acorn": "^8.15.0", "acorn-jsx": "^5.3.2", @@ -6536,7 +6507,6 @@ "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", "dev": true, "license": "BSD-3-Clause", - "peer": true, "dependencies": { "estraverse": "^5.1.0" }, @@ -6550,7 +6520,6 @@ "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, "license": "BSD-2-Clause", - "peer": true, "dependencies": { "estraverse": "^5.2.0" }, @@ -6640,16 +6609,14 @@ "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/fast-uri": { "version": "3.1.0", @@ -6703,7 +6670,6 @@ "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "flat-cache": "^4.0.0" }, @@ -6754,7 +6720,6 @@ "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "flatted": "^3.2.9", "keyv": "^4.5.4" @@ -6768,8 +6733,7 @@ "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", "dev": true, - "license": "ISC", - "peer": true + "license": "ISC" }, "node_modules/for-each": { "version": "0.3.5", @@ -6993,7 +6957,6 @@ "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, "license": "ISC", - "peer": true, "dependencies": { "is-glob": "^4.0.3" }, @@ -7023,7 +6986,6 @@ "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=18" }, @@ -7087,7 +7049,6 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=8" } @@ -7210,7 +7171,6 @@ "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">= 4" } @@ -7257,7 +7217,6 @@ "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=0.8.19" } @@ -7739,8 +7698,7 @@ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "dev": true, - "license": "ISC", - "peer": true + "license": "ISC" }, "node_modules/iterator.prototype": { "version": "1.1.5", @@ -7815,8 +7773,7 @@ "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", @@ -7836,8 +7793,7 @@ "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/json5": { "version": "2.2.3", @@ -7901,7 +7857,6 @@ "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "json-buffer": "3.0.1" } @@ -7932,7 +7887,6 @@ "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "prelude-ls": "^1.2.1", "type-check": "~0.4.0" @@ -8617,7 +8571,6 @@ "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", @@ -8736,7 +8689,6 @@ "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=8" } @@ -8848,7 +8800,6 @@ "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">= 0.8.0" } @@ -8892,7 +8843,6 @@ "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=6" } @@ -9407,7 +9357,6 @@ "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "shebang-regex": "^3.0.0" }, @@ -9421,7 +9370,6 @@ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=8" } @@ -9748,7 +9696,6 @@ "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=8" }, @@ -9804,7 +9751,6 @@ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "has-flag": "^4.0.0" }, @@ -9996,7 +9942,6 @@ "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "prelude-ls": "^1.2.1" }, @@ -10245,7 +10190,6 @@ "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, "license": "BSD-2-Clause", - "peer": true, "dependencies": { "punycode": "^2.1.0" } @@ -10527,7 +10471,6 @@ "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, "license": "ISC", - "peer": true, "dependencies": { "isexe": "^2.0.0" }, @@ -10650,7 +10593,6 @@ "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=0.10.0" } diff --git a/package.json b/package.json index 8d51922..d7c4f78 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "dev": "next dev", "build": "next build", "start": "next start", - "lint": "next lint", + "lint": "npx eslint", "test": "vitest", "setup": "npm install && npm run setup:hooks", "setup:hooks": "npx husky install", @@ -42,6 +42,7 @@ "@types/nprogress": "^0.2.3", "@types/react": "^19.2.7", "@types/supertest": "^6.0.3", + "eslint": "^9.39.1", "eslint-config-next": "^16.0.7", "husky": "^9.1.7", "node-mocks-http": "^1.17.2", diff --git a/tsconfig.json b/tsconfig.json index 9e93419..202454f 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,5 @@ { "compilerOptions": { - "baseUrl": ".", "paths": { "~/*": [ "./*"