Skip to content

Commit 41d4a10

Browse files
filipslezaklabRobert Olejnik
and
Robert Olejnik
authored
New home (#45)
* wip * up * roadmap * scroll sections animated * add click area to slider indicator * eslint fixes * fix components astro loading issues * seo add sitemap gen * cookie dialog client side only * fixes * tos and privacy * speedup slider animation * TOS * review fixes --------- Co-authored-by: Robert Olejnik <[email protected]>
1 parent 784387d commit 41d4a10

File tree

147 files changed

+5536
-2057
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

147 files changed

+5536
-2057
lines changed

.editorconfig

+3
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ insert_final_newline = true
88
charset = utf-8
99
indent_style = space
1010
indent_size = 2
11+
tab_width = 2
12+
rulers = 90
13+
insert_final_newline = true

.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v22.3
1+
v23.3

.prettierrc.mjs

+3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ export default {
55
semi: true,
66
printWidth: 90,
77
plugins: ["prettier-plugin-astro"],
8+
trailingComma: "all",
9+
endOfLine: "lf",
10+
jsxSingleQuote: false,
811
overrides: [
912
{
1013
files: "*.astro",

.vscode/settings.json

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
{
22
"cSpell.words": [
33
"dirreferent",
4-
"pricebox"
4+
"frontmatter",
5+
"pricebox",
6+
"Roadwarrior"
57
],
6-
"typescript.tsdk": "node_modules\\typescript\\lib"
8+
"typescript.tsdk": "node_modules\\typescript\\lib",
9+
"editor.tabSize": 2,
10+
"editor.insertSpaces": true,
11+
"editor.detectIndentation": false
712
}

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:22-alpine AS base
1+
FROM node:23-alpine AS base
22

33
RUN apk update
44
RUN corepack enable

Dockerfile.build

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:22-alpine AS base
1+
FROM node:23-alpine AS base
22

33
RUN apk update
44
RUN corepack enable

astro.config.mjs

+18-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import preact from "@astrojs/preact";
21
import { defineConfig } from "astro/config";
32
import path from "path";
43
import rehypeExternalLinks from "rehype-external-links";
@@ -8,15 +7,32 @@ import mdx from "@astrojs/mdx";
87

98
import playformCompress from "@playform/compress";
109

10+
import react from "@astrojs/react";
11+
12+
import sitemap from "@astrojs/sitemap";
13+
1114
const __filename = fileURLToPath(import.meta.url);
1215

1316
const __dirname = path.dirname(__filename);
1417

1518
// https://astro.build/config
1619
export default defineConfig({
1720
site: "https://defguard.net",
21+
trailingSlash: "ignore",
1822
prefetch: true,
19-
integrations: [mdx(), preact({ compat: true }), playformCompress()],
23+
integrations: [
24+
react(),
25+
mdx(),
26+
playformCompress(),
27+
sitemap({
28+
i18n: {
29+
defaultLocale: "en",
30+
locales: {
31+
en: "en-US",
32+
},
33+
},
34+
}),
35+
],
2036
markdown: {
2137
rehypePlugins: [
2238
[

eslint.config.js

+49-25
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,53 @@
1-
export default [
1+
import js from "@eslint/js";
2+
import globals from "globals";
3+
import reactHooks from "eslint-plugin-react-hooks";
4+
import tseslint from "typescript-eslint";
5+
import eslintConfigPrettier from "eslint-config-prettier";
6+
import simpleImportSort from "eslint-plugin-simple-import-sort";
7+
import react from "eslint-plugin-react";
8+
9+
export default tseslint.config(
10+
{ ignores: ["dist"] },
211
{
3-
extends: ["plugin:astro/recommended"],
4-
overrides: [
5-
{
6-
files: ["*.astro"],
7-
parser: "astro-eslint-parser",
8-
parserOptions: {
9-
parser: "@typescript-eslint/parser",
10-
extraFileExtensions: [".astro"],
11-
},
12-
rules: {
13-
"max-len": [
14-
"error",
15-
{
16-
code: 90,
17-
comments: 140,
18-
tabWidth: 2,
19-
ignorePattern: "^import .* |.*LL\\..*|.*d=.* | *from .*",
20-
ignoreComments: true,
21-
ignoreRegExpLiterals: true,
22-
ignoreTemplateLiterals: true,
23-
},
24-
],
12+
extends: [js.configs.recommended, ...tseslint.configs.strictTypeChecked],
13+
files: ["**/*.{ts,tsx}"],
14+
languageOptions: {
15+
parserOptions: {
16+
project: ["./tsconfig.json"],
17+
tsconfigRootDir: import.meta.dirname,
18+
ecmaFeatures: {
19+
jsx: true,
2520
},
2621
},
27-
],
22+
ecmaVersion: 2020,
23+
globals: globals.browser,
24+
},
25+
plugins: {
26+
react: react,
27+
"react-hooks": reactHooks,
28+
"simple-import-sort": simpleImportSort,
29+
},
30+
settings: {
31+
react: {
32+
version: "18.3",
33+
},
34+
},
35+
rules: {
36+
...react.configs.flat.recommended.rules,
37+
...react.configs.flat["jsx-runtime"].rules,
38+
...reactHooks.configs.recommended.rules,
39+
"simple-import-sort/imports": "error",
40+
"simple-import-sort/exports": "error",
41+
"@typescript-eslint/restrict-template-expressions": [
42+
"error",
43+
{
44+
allowNumber: true,
45+
allowBoolean: true,
46+
allowRegExp: true,
47+
},
48+
],
49+
"@typescript-eslint/no-unnecessary-condition": "off",
50+
},
2851
},
29-
];
52+
eslintConfigPrettier,
53+
);

package.json

+28-21
Original file line numberDiff line numberDiff line change
@@ -7,58 +7,65 @@
77
"start": "astro dev",
88
"build": "astro check && astro build",
99
"preview": "astro preview",
10-
"astro": "astro"
10+
"astro": "astro",
11+
"prettier:fix": "prettier --write src",
12+
"eslint:fix": "eslint src/**/*.{ts,tsx,astro} --fix",
13+
"fix": "pnpm prettier:fix && pnpm eslint:fix",
14+
"prettier:lint": "prettier --check src",
15+
"eslint:lint": "eslint src/**/*.{ts,tsx,astro} --max-warnings 0",
16+
"lint": "pnpm prettier:lint && pnpm tsc && pnpm eslint:lint && pnpm astro check"
1117
},
1218
"packageManager": "[email protected]",
1319
"pnpm": {
14-
"default": "9.7.1"
20+
"default": "9.14.2"
1521
},
1622
"engines": {
17-
"node": ">=22.3"
23+
"node": ">=23"
1824
},
1925
"dependencies": {
2026
"@astrojs/check": "^0.9.4",
2127
"@astrojs/mdx": "^3.1.9",
22-
"@astrojs/preact": "^3.5.3",
28+
"@astrojs/react": "^3.6.3",
29+
"@astrojs/sitemap": "^3.2.1",
2330
"@astrolib/analytics": "^0.6.1",
2431
"@floating-ui/react": "^0.26.28",
25-
"@nanostores/preact": "^0.5.2",
2632
"@playform/compress": "^0.1.6",
27-
"@preact/signals": "^1.3.0",
2833
"@tuplo/numberfmt": "^1.11.0",
29-
"@types/lodash-es": "^4.17.12",
30-
"astro": "^4.16.13",
34+
"astro": "^4.16.16",
3135
"astro-font": "^0.1.81",
3236
"astro-imagetools": "^0.9.0",
3337
"clsx": "^2.1.1",
3438
"lodash-es": "^4.17.21",
35-
"nanostores": "^0.11.3",
36-
"preact": "^10.24.3",
39+
"motion": "^11.12.0",
40+
"react": "^18.3.1",
41+
"react-dom": "^18.3.1",
3742
"react-markdown": "^9.0.1",
3843
"rehype-external-links": "^3.0.0",
3944
"rehype-raw": "^7.0.0",
4045
"sass": "^1.81.0",
4146
"sharp": "0.33.5",
4247
"short-unique-id": "^5.2.0",
4348
"typescript": "^5.6.3",
44-
"typescript-cookie": "^1.0.6",
49+
"use-breakpoint": "^4.0.5",
4550
"use-sync-external-store": "^1.2.2",
4651
"user-agent-data-types": "^0.4.2",
4752
"zustand": "^5.0.1"
4853
},
4954
"devDependencies": {
5055
"@astrojs/ts-plugin": "^1.10.4",
51-
"@typescript-eslint/parser": "^6.17.0",
52-
"eslint": "^8.56.0",
56+
"@eslint/js": "^9.15.0",
57+
"@types/lodash-es": "^4.17.12",
58+
"@types/react": "^18.3.12",
59+
"@types/react-dom": "^18.3.1",
60+
"eslint": "^9.15.0",
61+
"eslint-config-prettier": "^9.1.0",
5362
"eslint-plugin-astro": "^1.3.1",
63+
"eslint-plugin-react": "^7.37.2",
64+
"eslint-plugin-react-hooks": "5.0",
65+
"eslint-plugin-simple-import-sort": "^12.1.1",
66+
"globals": "^15.12.0",
5467
"prettier": "^3.3.3",
55-
"prettier-plugin-astro": "^0.14.1"
56-
},
57-
"overrides": {
58-
"react": "npm:@preact/compat@latest",
59-
"react-dom": "npm:@preact/compat@latest"
60-
},
61-
"volta": {
62-
"node": "21.6.1"
68+
"prettier-plugin-astro": "^0.14.1",
69+
"typescript-eslint": "^8.15.0"
6370
}
6471
}

0 commit comments

Comments
 (0)