diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 193093eb..e4b73103 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -1,12 +1,19 @@ module.exports = { + parser: '@typescript-eslint/parser', extends: [ 'plugin:@next/next/recommended', + 'plugin:@typescript-eslint/recommended', 'plugin:jest/recommended', 'plugin:prettier/recommended', 'plugin:@tanstack/eslint-plugin-query/recommended', 'plugin:react-hooks/recommended', ], - plugins: ['testing-library', 'jest'], + plugins: ['@typescript-eslint', 'testing-library', 'jest'], + env: { + browser: true, + node: true, + es2022: true, + }, overrides: [ { files: ['**/?(*.)+(spec|test).[jt]s?(x)'], @@ -14,6 +21,11 @@ module.exports = { }, ], parserOptions: { + ecmaVersion: 2022, + sourceType: 'module', + ecmaFeatures: { + jsx: true, + }, project: './tsconfig.json', }, rules: { diff --git a/.prettierrc.cjs b/.prettierrc.cjs index 7819c2d6..6177ae0d 100644 --- a/.prettierrc.cjs +++ b/.prettierrc.cjs @@ -1,10 +1,11 @@ /** @type {import('prettier').Options} */ module.exports = { - ...baseConfig, semi: false, singleQuote: true, trailingComma: 'all', arrowParens: 'avoid', + printWidth: 100, + tabWidth: 2, + useTabs: false, plugins: ['prettier-plugin-tailwindcss'], - tailwindConfig: './tailwind.config.cjs', } diff --git a/.stylelintignore b/.stylelintignore deleted file mode 100644 index 2b3533c7..00000000 --- a/.stylelintignore +++ /dev/null @@ -1,2 +0,0 @@ -.next -out diff --git a/.stylelintrc.json b/.stylelintrc.json deleted file mode 100644 index 201106dc..00000000 --- a/.stylelintrc.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "extends": ["stylelint-config-standard"], - "rules": { - "at-rule-no-unknown": [ - true, - { - "ignoreAtRules": ["tailwind", "apply", "layer"] - } - ], - "at-rule-no-deprecated": null, - "custom-property-pattern": null, - "selector-class-pattern": null, - "declaration-empty-line-before": null, - "declaration-block-no-redundant-longhand-properties": null, - "alpha-value-notation": null, - "custom-property-empty-line-before": null, - "property-no-vendor-prefix": null, - "color-function-notation": null, - "length-zero-no-unit": null, - "selector-not-notation": null, - "no-descending-specificity": null, - "comment-empty-line-before": null, - "value-keyword-case": null, - "media-feature-range-notation": null, - "selector-pseudo-class-no-unknown": [ - true, - { - "ignorePseudoClasses": ["global"] - } - ] - } -} diff --git a/LICENCE b/LICENCE index e5e19fc9..9a24f81b 100644 --- a/LICENCE +++ b/LICENCE @@ -1 +1 @@ -Copyright (c) 2024 Alexander Shenshin, Leonid Shirokov +Copyright (c) 2025 Alexander Shenshin, Leonid Shirokov diff --git a/README.md b/README.md index 1c110f77..7e6ce39e 100644 --- a/README.md +++ b/README.md @@ -2,16 +2,10 @@ ## Antique Barometers Collection -This repository includes the source code for a website dedicated to showcasing the private collection of antique barometers, assembled by Leo Shirokov. +This repository includes the source code for a website dedicated to showcasing the private collection of antique barometers, assembled by Leo Shirokov. The site is built using TypeScript and the Next.js framework and is hosted on Vercel at [barometers.info](https://www.barometers.info/). ## Project Contributors - **Collection Owner, Text and Concept** — Leo Shirokov -- **Development and Implementation, "Design"** — Alexander Shenshin - - Clear image cache - - ```shell - rm -rf /var/cache/nginx/imgcache/* - ``` +- **Development and Implementation, Design** — Alexander Shenshin diff --git a/app/about/page.tsx b/app/about/page.tsx index 13c751ef..1f383b29 100644 --- a/app/about/page.tsx +++ b/app/about/page.tsx @@ -23,7 +23,7 @@ export default function About() { height={125} sizes="(max-width: 768px) 100vw, 50vw" src="/shared/leo-shirokov.png" - className="float-left h-[300px] w-full object-contain xs:w-fit sm:h-[400px]" + className="xs:w-fit float-left h-[300px] w-full object-contain sm:h-[400px]" /> I am a collector and restorer of antique barometers, a member of the Society for the History of Technology (SHOT), European Society for Environmental History (ESEH) and the @@ -35,7 +35,7 @@ export default function About() { has also inspired me to write Barometer Odyssey*, a book that explores the evolution of barometers over time.

-
+
- + diff --git a/app/collection/items/[slug]/components/edit-fields/manufacturer-image-edit.tsx b/app/collection/items/[slug]/components/edit-fields/manufacturer-image-edit.tsx index 0e00bc7f..036ae9ec 100644 --- a/app/collection/items/[slug]/components/edit-fields/manufacturer-image-edit.tsx +++ b/app/collection/items/[slug]/components/edit-fields/manufacturer-image-edit.tsx @@ -45,7 +45,7 @@ function SortableImage({ > @@ -154,7 +154,7 @@ export function InaccuracyReport({ barometer, ...props }: Props) { {errors.description && (

{errors.description.message}

)} -

+

{descriptionValue.length > 0 && descriptionValue.length <= maxFeedbackLen ? `${symbolsLeft} symbol${symbolsLeft === 1 ? '' : 's'} remaining` : descriptionValue.length > maxFeedbackLen diff --git a/app/collection/items/[slug]/components/property-card/property-card.tsx b/app/collection/items/[slug]/components/property-card/property-card.tsx index 2949c6c8..2e936d65 100644 --- a/app/collection/items/[slug]/components/property-card/property-card.tsx +++ b/app/collection/items/[slug]/components/property-card/property-card.tsx @@ -29,16 +29,16 @@ function PropertyCardCore({ -

+
-

{title}

+

{title}

{typeof children === 'object' ? ( children ) : ( diff --git a/app/collection/items/[slug]/components/swiper-styles.css b/app/collection/items/[slug]/components/swiper-styles.css index a7685143..217f3d06 100644 --- a/app/collection/items/[slug]/components/swiper-styles.css +++ b/app/collection/items/[slug]/components/swiper-styles.css @@ -1,3 +1,5 @@ +@reference "../../../../globals.css"; + /* This file contains the styles necessary for Swiper Pagination */ .swiper { width: 100%; @@ -25,7 +27,7 @@ } .swiper-pagination-bullet { - @apply h-5 w-5 translate-y-[150%] bg-input text-xs leading-normal opacity-100 shadow-[0_0_1px_.5px_hsl(var(--muted-foreground))]; + @apply bg-input h-5 w-5 translate-y-[150%] text-xs leading-normal opacity-100 shadow-[0_0_1px_.5px_hsl(var(--muted-foreground))]; } .swiper-pagination-bullet-active { diff --git a/app/components/barometer-card/barometer-card-icon.tsx b/app/components/barometer-card/barometer-card-icon.tsx index b881b162..fff96c7b 100644 --- a/app/components/barometer-card/barometer-card-icon.tsx +++ b/app/components/barometer-card/barometer-card-icon.tsx @@ -26,7 +26,7 @@ export function BarometerCardWithIcon({ return (
- + @@ -47,9 +47,9 @@ export async function BarometerCard({

No image

)}
-

{name}

+

{name}

{manufacturer && manufacturer.toLowerCase() !== 'unknown' && ( -

+

{manufacturer}

)} diff --git a/app/components/category-card/category-card.tsx b/app/components/category-card/category-card.tsx index d9d31f01..2133141c 100644 --- a/app/components/category-card/category-card.tsx +++ b/app/components/category-card/category-card.tsx @@ -22,11 +22,11 @@ export const CategoryCard: FC = ({ name, link, image, priorit
- + {image && ( = ({ name, link, image, priorit

{name} diff --git a/app/components/category-icon/index.tsx b/app/components/category-icon/index.tsx index 79110cd7..23327001 100644 --- a/app/components/category-icon/index.tsx +++ b/app/components/category-icon/index.tsx @@ -15,8 +15,8 @@ export function CategoryIcon({ category, className, ...props }: CategoryLetterPr
{ e.preventDefault() }} diff --git a/app/components/footer/footer.tsx b/app/components/footer/footer.tsx index e78148ed..7469774b 100644 --- a/app/components/footer/footer.tsx +++ b/app/components/footer/footer.tsx @@ -7,10 +7,10 @@ export function Footer() {