diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 5441443..db09b1c 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -27,6 +27,7 @@ module.exports = { '@typescript-eslint/prefer-nullish-coalescing': 'off', '@typescript-eslint/no-unsafe-call': ['off'], '@stylistic/ts/indent': ['error', 4], + '@stylistic/ts/semi': ['error', 'never'], }, settings: { react: { diff --git a/e2e/home.spec.ts b/e2e/home.spec.ts index 555f7c6..8a7ad09 100644 --- a/e2e/home.spec.ts +++ b/e2e/home.spec.ts @@ -1,8 +1,8 @@ -import { test, expect } from '@playwright/test'; +import { test, expect } from '@playwright/test' test('has title', async ({ page }) => { - await page.goto('/'); + await page.goto('/') // Expect a title "to contain" a substring. - await expect(page).toHaveTitle(/WiSE/); -}); + await expect(page).toHaveTitle(/WiSE/) +}) diff --git a/package-lock.json b/package-lock.json index 70a2647..5648b32 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,6 +23,7 @@ }, "devDependencies": { "@playwright/test": "1.44.1", + "@stylistic/eslint-plugin": "^2.3.0", "@stylistic/eslint-plugin-ts": "1.7.2", "@testing-library/jest-dom": "6.4.2", "@testing-library/react": "15.0.2", @@ -1679,6 +1680,26 @@ "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==" }, + "node_modules/@stylistic/eslint-plugin": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin/-/eslint-plugin-2.3.0.tgz", + "integrity": "sha512-rtiz6u5gRyyEZp36FcF1/gHJbsbT3qAgXZ1qkad6Nr/xJ9wrSJkiSFFQhpYVTIZ7FJNRJurEcumZDCwN9dEI4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@stylistic/eslint-plugin-js": "2.3.0", + "@stylistic/eslint-plugin-jsx": "2.3.0", + "@stylistic/eslint-plugin-plus": "2.3.0", + "@stylistic/eslint-plugin-ts": "2.3.0", + "@types/eslint": "^8.56.10" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "peerDependencies": { + "eslint": ">=8.40.0" + } + }, "node_modules/@stylistic/eslint-plugin-js": { "version": "1.7.2", "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-js/-/eslint-plugin-js-1.7.2.tgz", @@ -1710,6 +1731,220 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/@stylistic/eslint-plugin-jsx": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-jsx/-/eslint-plugin-jsx-2.3.0.tgz", + "integrity": "sha512-tsQ0IEKB195H6X9A4iUSgLLLKBc8gUBWkBIU8tp1/3g2l8stu+PtMQVV/VmK1+3bem5FJCyvfcZIQ/WF1fsizA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@stylistic/eslint-plugin-js": "^2.3.0", + "@types/eslint": "^8.56.10", + "estraverse": "^5.3.0", + "picomatch": "^4.0.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "peerDependencies": { + "eslint": ">=8.40.0" + } + }, + "node_modules/@stylistic/eslint-plugin-jsx/node_modules/@stylistic/eslint-plugin-js": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-js/-/eslint-plugin-js-2.3.0.tgz", + "integrity": "sha512-lQwoiYb0Fs6Yc5QS3uT8+T9CPKK2Eoxc3H8EnYJgM26v/DgtW+1lvy2WNgyBflU+ThShZaHm3a6CdD9QeKx23w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/eslint": "^8.56.10", + "acorn": "^8.11.3", + "eslint-visitor-keys": "^4.0.0", + "espree": "^10.0.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "peerDependencies": { + "eslint": ">=8.40.0" + } + }, + "node_modules/@stylistic/eslint-plugin-jsx/node_modules/eslint-visitor-keys": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz", + "integrity": "sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@stylistic/eslint-plugin-jsx/node_modules/espree": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.1.0.tgz", + "integrity": "sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.12.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^4.0.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@stylistic/eslint-plugin-jsx/node_modules/picomatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/@stylistic/eslint-plugin-plus": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-plus/-/eslint-plugin-plus-2.3.0.tgz", + "integrity": "sha512-xboPWGUU5yaPlR+WR57GwXEuY4PSlPqA0C3IdNA/+1o2MuBi95XgDJcZiJ9N+aXsqBXAPIpFFb+WQ7QEHo4f7g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/eslint": "^8.56.10", + "@typescript-eslint/utils": "^7.12.0" + }, + "peerDependencies": { + "eslint": "*" + } + }, + "node_modules/@stylistic/eslint-plugin-plus/node_modules/@typescript-eslint/scope-manager": { + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.15.0.tgz", + "integrity": "sha512-Q/1yrF/XbxOTvttNVPihxh1b9fxamjEoz2Os/Pe38OHwxC24CyCqXxGTOdpb4lt6HYtqw9HetA/Rf6gDGaMPlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "7.15.0", + "@typescript-eslint/visitor-keys": "7.15.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@stylistic/eslint-plugin-plus/node_modules/@typescript-eslint/types": { + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.15.0.tgz", + "integrity": "sha512-aV1+B1+ySXbQH0pLK0rx66I3IkiZNidYobyfn0WFsdGhSXw+P3YOqeTq5GED458SfB24tg+ux3S+9g118hjlTw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@stylistic/eslint-plugin-plus/node_modules/@typescript-eslint/typescript-estree": { + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.15.0.tgz", + "integrity": "sha512-gjyB/rHAopL/XxfmYThQbXbzRMGhZzGw6KpcMbfe8Q3nNQKStpxnUKeXb0KiN/fFDR42Z43szs6rY7eHk0zdGQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/types": "7.15.0", + "@typescript-eslint/visitor-keys": "7.15.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@stylistic/eslint-plugin-plus/node_modules/@typescript-eslint/utils": { + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.15.0.tgz", + "integrity": "sha512-hfDMDqaqOqsUVGiEPSMLR/AjTSCsmJwjpKkYQRo1FNbmW4tBwBspYDwO9eh7sKSTwMQgBw9/T4DHudPaqshRWA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@typescript-eslint/scope-manager": "7.15.0", + "@typescript-eslint/types": "7.15.0", + "@typescript-eslint/typescript-estree": "7.15.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.56.0" + } + }, + "node_modules/@stylistic/eslint-plugin-plus/node_modules/@typescript-eslint/visitor-keys": { + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.15.0.tgz", + "integrity": "sha512-Hqgy/ETgpt2L5xueA/zHHIl4fJI2O4XUE9l4+OIfbJIRSnTJb/QscncdqqZzofQegIJugRIF57OJea1khw2SDw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "7.15.0", + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@stylistic/eslint-plugin-plus/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/@stylistic/eslint-plugin-ts": { "version": "1.7.2", "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-ts/-/eslint-plugin-ts-1.7.2.tgz", @@ -1827,6 +2062,205 @@ "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@stylistic/eslint-plugin/node_modules/@stylistic/eslint-plugin-js": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-js/-/eslint-plugin-js-2.3.0.tgz", + "integrity": "sha512-lQwoiYb0Fs6Yc5QS3uT8+T9CPKK2Eoxc3H8EnYJgM26v/DgtW+1lvy2WNgyBflU+ThShZaHm3a6CdD9QeKx23w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/eslint": "^8.56.10", + "acorn": "^8.11.3", + "eslint-visitor-keys": "^4.0.0", + "espree": "^10.0.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "peerDependencies": { + "eslint": ">=8.40.0" + } + }, + "node_modules/@stylistic/eslint-plugin/node_modules/@stylistic/eslint-plugin-ts": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-ts/-/eslint-plugin-ts-2.3.0.tgz", + "integrity": "sha512-wqOR38/uz/0XPnHX68ftp8sNMSAqnYGjovOTN7w00xnjS6Lxr3Sk7q6AaxWWqbMvOj7V2fQiMC5HWAbTruJsCg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@stylistic/eslint-plugin-js": "2.3.0", + "@types/eslint": "^8.56.10", + "@typescript-eslint/utils": "^7.12.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "peerDependencies": { + "eslint": ">=8.40.0" + } + }, + "node_modules/@stylistic/eslint-plugin/node_modules/@typescript-eslint/scope-manager": { + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.15.0.tgz", + "integrity": "sha512-Q/1yrF/XbxOTvttNVPihxh1b9fxamjEoz2Os/Pe38OHwxC24CyCqXxGTOdpb4lt6HYtqw9HetA/Rf6gDGaMPlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "7.15.0", + "@typescript-eslint/visitor-keys": "7.15.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@stylistic/eslint-plugin/node_modules/@typescript-eslint/types": { + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.15.0.tgz", + "integrity": "sha512-aV1+B1+ySXbQH0pLK0rx66I3IkiZNidYobyfn0WFsdGhSXw+P3YOqeTq5GED458SfB24tg+ux3S+9g118hjlTw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@stylistic/eslint-plugin/node_modules/@typescript-eslint/typescript-estree": { + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.15.0.tgz", + "integrity": "sha512-gjyB/rHAopL/XxfmYThQbXbzRMGhZzGw6KpcMbfe8Q3nNQKStpxnUKeXb0KiN/fFDR42Z43szs6rY7eHk0zdGQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/types": "7.15.0", + "@typescript-eslint/visitor-keys": "7.15.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@stylistic/eslint-plugin/node_modules/@typescript-eslint/utils": { + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.15.0.tgz", + "integrity": "sha512-hfDMDqaqOqsUVGiEPSMLR/AjTSCsmJwjpKkYQRo1FNbmW4tBwBspYDwO9eh7sKSTwMQgBw9/T4DHudPaqshRWA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@typescript-eslint/scope-manager": "7.15.0", + "@typescript-eslint/types": "7.15.0", + "@typescript-eslint/typescript-estree": "7.15.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.56.0" + } + }, + "node_modules/@stylistic/eslint-plugin/node_modules/@typescript-eslint/visitor-keys": { + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.15.0.tgz", + "integrity": "sha512-Hqgy/ETgpt2L5xueA/zHHIl4fJI2O4XUE9l4+OIfbJIRSnTJb/QscncdqqZzofQegIJugRIF57OJea1khw2SDw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "7.15.0", + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@stylistic/eslint-plugin/node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@stylistic/eslint-plugin/node_modules/eslint-visitor-keys": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz", + "integrity": "sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@stylistic/eslint-plugin/node_modules/espree": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.1.0.tgz", + "integrity": "sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.12.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^4.0.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@stylistic/eslint-plugin/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/@testing-library/dom": { "version": "10.0.0", "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-10.0.0.tgz", @@ -2575,9 +3009,10 @@ } }, "node_modules/acorn": { - "version": "8.11.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", - "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", + "license": "MIT", "bin": { "acorn": "bin/acorn" }, diff --git a/playwright.config.ts b/playwright.config.ts index d15a1f5..be5f67d 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -1,4 +1,4 @@ -import { defineConfig, devices } from '@playwright/test'; +import { defineConfig, devices } from '@playwright/test' /** * Read environment variables from file. @@ -74,4 +74,4 @@ export default defineConfig({ // url: 'http://127.0.0.1:3000', // reuseExistingServer: !process.env.CI, // }, -}); +}) diff --git a/src/@types/i18next.d.ts b/src/@types/i18next.d.ts index 83f8147..0c60e5e 100644 --- a/src/@types/i18next.d.ts +++ b/src/@types/i18next.d.ts @@ -1,4 +1,4 @@ -import { resources, defaultNS } from './i18n'; +import { resources, defaultNS } from './i18n' declare module 'i18next' { interface CustomTypeOptions { diff --git a/src/components/Footer/Footer.tsx b/src/components/Footer/Footer.tsx index f238086..9756a08 100644 --- a/src/components/Footer/Footer.tsx +++ b/src/components/Footer/Footer.tsx @@ -1,12 +1,12 @@ -import { FC } from 'react'; +import { FC } from 'react' import BottomNavigation from '@mui/material/BottomNavigation' import Paper from '@mui/material/Paper' -import InstagramIcon from '@mui/icons-material/Instagram'; -import LinkedInIcon from '@mui/icons-material/LinkedIn'; -import FacebookIcon from '@mui/icons-material/Facebook'; -import GitHubIcon from '@mui/icons-material/GitHub'; -import EventIcon from '@mui/icons-material/Event'; -import FooterIcon from './FooterIcon'; +import InstagramIcon from '@mui/icons-material/Instagram' +import LinkedInIcon from '@mui/icons-material/LinkedIn' +import FacebookIcon from '@mui/icons-material/Facebook' +import GitHubIcon from '@mui/icons-material/GitHub' +import EventIcon from '@mui/icons-material/Event' +import FooterIcon from './FooterIcon' const Footer: FC = () => { diff --git a/src/components/Footer/FooterIcon.tsx b/src/components/Footer/FooterIcon.tsx index 068b113..ca272f5 100644 --- a/src/components/Footer/FooterIcon.tsx +++ b/src/components/Footer/FooterIcon.tsx @@ -1,4 +1,4 @@ -import { FC } from 'react'; +import { FC } from 'react' import BottomNavigationAction from '@mui/material/BottomNavigationAction' interface FooterIconProps { diff --git a/src/components/Header/DesktopHeader.tsx b/src/components/Header/DesktopHeader.tsx index 3e18361..883c1da 100644 --- a/src/components/Header/DesktopHeader.tsx +++ b/src/components/Header/DesktopHeader.tsx @@ -1,12 +1,12 @@ -import { FC } from 'react'; +import { FC } from 'react' import Stack from '@mui/material/Stack' import Toolbar from '@mui/material/Toolbar' -import Typography from '@mui/material/Typography'; -import { styled } from '@mui/material/styles'; -import SideDrawer from '../SideDrawer/SideDrawer'; +import Typography from '@mui/material/Typography' +import { styled } from '@mui/material/styles' +import SideDrawer from '../SideDrawer/SideDrawer' import StyledNavLink from '@/components/StyledNavLink/StyledNavLink' -import { useTranslation } from 'react-i18next'; +import { useTranslation } from 'react-i18next' const StyledToolbar = styled(Toolbar)(({ theme }) => ({ @@ -23,7 +23,7 @@ const StyledToolbar = styled(Toolbar)(({ theme }) => ({ const DesktopHeader: FC = () => { - const { t } = useTranslation(); + const { t } = useTranslation() return diff --git a/src/components/Header/Header.tsx b/src/components/Header/Header.tsx index f980038..e99b03a 100644 --- a/src/components/Header/Header.tsx +++ b/src/components/Header/Header.tsx @@ -1,9 +1,9 @@ import { FC } from 'react' import AppBar from '@mui/material/AppBar' -import { useTheme } from '@mui/material/styles'; -import useMediaQuery from '@mui/material/useMediaQuery'; -import MobileHeader from './MobileHeader'; -import DesktopHeader from './DesktopHeader'; +import { useTheme } from '@mui/material/styles' +import useMediaQuery from '@mui/material/useMediaQuery' +import MobileHeader from './MobileHeader' +import DesktopHeader from './DesktopHeader' diff --git a/src/components/ImageCard/ImageCard.tsx b/src/components/ImageCard/ImageCard.tsx index bbe4c45..3287029 100644 --- a/src/components/ImageCard/ImageCard.tsx +++ b/src/components/ImageCard/ImageCard.tsx @@ -1,4 +1,4 @@ -import { FC } from 'react'; +import { FC } from 'react' import Card from '@mui/material/Card' interface ImageCardProps { diff --git a/src/components/LocaleToggle/LocaleToggle.tsx b/src/components/LocaleToggle/LocaleToggle.tsx index a39c419..bac981a 100644 --- a/src/components/LocaleToggle/LocaleToggle.tsx +++ b/src/components/LocaleToggle/LocaleToggle.tsx @@ -1,28 +1,28 @@ import { FC, useEffect, useState, useCallback } from 'react' import ToggleButton from '@mui/material/ToggleButton' import ToggleButtonGroup from '@mui/material/ToggleButtonGroup' -import { useTranslation } from 'react-i18next'; +import { useTranslation } from 'react-i18next' import Locale from '@/i18n/locales' const LocaleToggle: FC = () => { - const [locale, setLocale] = useState(Locale.EN); - const { i18n } = useTranslation(); + const [locale, setLocale] = useState(Locale.EN) + const { i18n } = useTranslation() const changeLanguage = useCallback(async (nextLocale: Locale) => { await i18n.changeLanguage(nextLocale).then(() => { - setLocale(nextLocale); - localStorage.setItem('locale', nextLocale); - }); - }, [i18n]); + setLocale(nextLocale) + localStorage.setItem('locale', nextLocale) + }) + }, [i18n]) useEffect(() => { - const savedLocale = localStorage.getItem('locale'); + const savedLocale = localStorage.getItem('locale') if (savedLocale) { changeLanguage(savedLocale as Locale).catch((e: Error) => { console.error(e) }) } - }, [changeLanguage]); + }, [changeLanguage]) const handleChange = (_: React.MouseEvent, nextLocale: Locale) => { changeLanguage(nextLocale).catch((e: Error) => { @@ -38,7 +38,7 @@ const LocaleToggle: FC = () => { English 日本語 - ); + ) } export default LocaleToggle diff --git a/src/components/LocaleToggle/__test__/LocaleToggle.test.tsx b/src/components/LocaleToggle/__test__/LocaleToggle.test.tsx index 662cef3..c4355bc 100644 --- a/src/components/LocaleToggle/__test__/LocaleToggle.test.tsx +++ b/src/components/LocaleToggle/__test__/LocaleToggle.test.tsx @@ -1,6 +1,6 @@ import { describe, expect, it } from 'vitest' import { render } from '@/tests/customRender' -import LocaleToggle from '../LocaleToggle'; +import LocaleToggle from '../LocaleToggle' import userEvent from '@testing-library/user-event' import { screen } from '@testing-library/react' @@ -8,20 +8,20 @@ describe('LocaleToggle', () => { it('renders correctly', async () => { render() - const english = await screen.findByText('English'); - const japanese = await screen.findByText('日本語'); - expect(english).toBeInTheDocument(); - expect(japanese).toBeInTheDocument(); - }); + const english = await screen.findByText('English') + const japanese = await screen.findByText('日本語') + expect(english).toBeInTheDocument() + expect(japanese).toBeInTheDocument() + }) }) it('changes locale when toggling', async () => { - render(); - const japaneseButton = screen.getByText('日本語'); + render() + const japaneseButton = screen.getByText('日本語') const user = userEvent.setup() await user.click(japaneseButton) - expect(localStorage.getItem('locale')).toBe('ja'); + expect(localStorage.getItem('locale')).toBe('ja') - localStorage.removeItem('locale'); -}); + localStorage.removeItem('locale') +}) diff --git a/src/components/SideDrawer/SideDrawer.tsx b/src/components/SideDrawer/SideDrawer.tsx index 2653624..7b0604c 100644 --- a/src/components/SideDrawer/SideDrawer.tsx +++ b/src/components/SideDrawer/SideDrawer.tsx @@ -17,11 +17,11 @@ const SideDrawer: FC = () => { ((event as React.KeyboardEvent).key === 'Tab' || (event as React.KeyboardEvent).key === 'Shift') ) { - return; + return } setOpen(open) - }; + } return <> ({ color: 'white', diff --git a/src/components/TextBlock/Body1.tsx b/src/components/TextBlock/Body1.tsx index 5f47807..0a7fe3d 100644 --- a/src/components/TextBlock/Body1.tsx +++ b/src/components/TextBlock/Body1.tsx @@ -1,5 +1,5 @@ import { FC, ReactNode } from 'react' -import Typography from '@mui/material/Typography'; +import Typography from '@mui/material/Typography' interface Body1Props { children: ReactNode diff --git a/src/i18n/config.ts b/src/i18n/config.ts index 8058636..6ede738 100644 --- a/src/i18n/config.ts +++ b/src/i18n/config.ts @@ -20,4 +20,4 @@ i18next.use(initReactI18next).init({ // if you see an error like: "Argument of type 'DefaultTFuncReturn' is not assignable to parameter of type xyz" // set returnNull to false (and also in the i18next.d.ts options) // returnNull: false, -}); +}) diff --git a/src/main.tsx b/src/main.tsx index 5dbadce..291d758 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -1,10 +1,10 @@ import React from 'react' import ReactDOM from 'react-dom/client' -import CssBaseline from '@mui/material/CssBaseline'; -import Router from './routes/Router'; -import GlobalStyles from '@mui/material/GlobalStyles'; -import CustomThemeProvider from './theme/CustomThemeProvider'; -import './i18n/config'; +import CssBaseline from '@mui/material/CssBaseline' +import Router from './routes/Router' +import GlobalStyles from '@mui/material/GlobalStyles' +import CustomThemeProvider from './theme/CustomThemeProvider' +import './i18n/config' import './index.css' import '@fontsource/noto-sans-jp/300.css' diff --git a/src/routes/BaseLayout.tsx b/src/routes/BaseLayout.tsx index 4d2de94..39ef169 100644 --- a/src/routes/BaseLayout.tsx +++ b/src/routes/BaseLayout.tsx @@ -10,7 +10,7 @@ const Loader = () => (
Loading...
-); +) const BaseLayout: FC = () => { return }> diff --git a/src/routes/CodeOfConduct/CodeOfConduct.tsx b/src/routes/CodeOfConduct/CodeOfConduct.tsx index 8583990..c60ed90 100644 --- a/src/routes/CodeOfConduct/CodeOfConduct.tsx +++ b/src/routes/CodeOfConduct/CodeOfConduct.tsx @@ -2,10 +2,10 @@ import { FC } from 'react' import Container from '@mui/material/Container' import Stack from '@mui/material/Stack' import { Typography } from '@mui/material' -import { useTranslation } from 'react-i18next'; +import { useTranslation } from 'react-i18next' const CodeOfConduct: FC = () => { - const { t } = useTranslation(); + const { t } = useTranslation() return diff --git a/src/routes/Home/Home.tsx b/src/routes/Home/Home.tsx index c782008..81b0fa2 100644 --- a/src/routes/Home/Home.tsx +++ b/src/routes/Home/Home.tsx @@ -1,12 +1,12 @@ -import { FC } from 'react'; +import { FC } from 'react' import Stack from '@mui/material/Stack' import Container from '@mui/material/Container' -import Typography from '@mui/material/Typography'; +import Typography from '@mui/material/Typography' import Button from '@mui/material/Button' -import { useTranslation } from 'react-i18next'; +import { useTranslation } from 'react-i18next' const Home: FC = () => { - const { t } = useTranslation(); + const { t } = useTranslation() return diff --git a/src/routes/ThemePreview/ColorSwatch.tsx b/src/routes/ThemePreview/ColorSwatch.tsx index dfd7933..ea2712d 100644 --- a/src/routes/ThemePreview/ColorSwatch.tsx +++ b/src/routes/ThemePreview/ColorSwatch.tsx @@ -1,5 +1,5 @@ import Paper from '@mui/material/Paper' -import { Theme, styled } from '@mui/material/styles'; +import { Theme, styled } from '@mui/material/styles' interface SwatchProps { color: string @@ -23,6 +23,6 @@ const ColorSwatch = styled(Paper)(({ theme, color }) => ({ padding: theme.spacing(4), textAlign: 'center', color: theme.palette.text.secondary, -})); +})) export default ColorSwatch diff --git a/src/routes/ThemePreview/ThemePreview.tsx b/src/routes/ThemePreview/ThemePreview.tsx index aa1ae4b..eb331f2 100644 --- a/src/routes/ThemePreview/ThemePreview.tsx +++ b/src/routes/ThemePreview/ThemePreview.tsx @@ -1,11 +1,11 @@ -import { FC } from 'react'; -import Button from '@mui/material/Button'; +import { FC } from 'react' +import Button from '@mui/material/Button' import Container from '@mui/material/Container' -import Grid from '@mui/material/Grid'; -import Stack from '@mui/material/Stack'; +import Grid from '@mui/material/Grid' +import Stack from '@mui/material/Stack' import Typography from '@mui/material/Typography' import Divider from '@mui/material/Divider' -import ColorSwatch from './ColorSwatch'; +import ColorSwatch from './ColorSwatch' import StarIcon from '@mui/icons-material/Star' diff --git a/src/tests/customRender.tsx b/src/tests/customRender.tsx index 7350a4b..375ee5f 100644 --- a/src/tests/customRender.tsx +++ b/src/tests/customRender.tsx @@ -1,9 +1,9 @@ import React, { ReactElement } from 'react' import { render, RenderOptions } from '@testing-library/react' -import CssBaseline from '@mui/material/CssBaseline'; -import CustomThemeProvider from '@/theme/CustomThemeProvider'; -import { MemoryRouter } from 'react-router-dom'; -import '@/i18n/config'; +import CssBaseline from '@mui/material/CssBaseline' +import CustomThemeProvider from '@/theme/CustomThemeProvider' +import { MemoryRouter } from 'react-router-dom' +import '@/i18n/config' // eslint-disable-next-line react-refresh/only-export-components const AllTheProviders = ({ children }: { children: React.ReactNode }) => { diff --git a/src/theme/customColorConfig.ts b/src/theme/customColorConfig.ts index c31291c..bd24639 100644 --- a/src/theme/customColorConfig.ts +++ b/src/theme/customColorConfig.ts @@ -2,7 +2,7 @@ Custom Colors in Typescript requires module augmentation Read more: https://mui.com/material-ui/customization/palette/#typescript */ -import '@mui/material'; +import '@mui/material' declare module '@mui/material/styles' { diff --git a/src/theme/theme.ts b/src/theme/theme.ts index 685c2b0..a4fce30 100644 --- a/src/theme/theme.ts +++ b/src/theme/theme.ts @@ -1,6 +1,6 @@ import createTheme from '@mui/material/styles/createTheme' -import typography from './typography/default'; -import { teal, lightBlue, deepPurple, purple, grey } from '@mui/material/colors'; +import typography from './typography/default' +import { teal, lightBlue, deepPurple, purple, grey } from '@mui/material/colors' const theme = createTheme({ palette: { @@ -38,6 +38,6 @@ const theme = createTheme({ }, typography -}); +}) export default theme diff --git a/src/theme/typography/default.ts b/src/theme/typography/default.ts index 3e873e1..1297af7 100644 --- a/src/theme/typography/default.ts +++ b/src/theme/typography/default.ts @@ -1,4 +1,4 @@ -import { TypographyOptions } from '@mui/material/styles/createTypography'; +import { TypographyOptions } from '@mui/material/styles/createTypography' const typography: TypographyOptions = { fontFamily: ['Noto Sans JP', 'serif'].join(','),