Skip to content

Commit 491b1a8

Browse files
enhance: merge upstream/main
2 parents 003d077 + 53ef068 commit 491b1a8

File tree

170 files changed

+5340
-4482
lines changed

Some content is hidden

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

170 files changed

+5340
-4482
lines changed

.github/workflows/lint.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Code quality
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
quality:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v4
12+
13+
- name: Setup Node.js
14+
uses: actions/setup-node@v4
15+
with:
16+
node-version: 20
17+
cache: "npm"
18+
cache-dependency-path: crowdsec-docs/package-lock.json
19+
20+
21+
- name: Install dependencies
22+
run: npm ci
23+
working-directory: ./crowdsec-docs/
24+
25+
- name: Setup Biome
26+
uses: biomejs/setup-biome@v2
27+
with:
28+
version: latest
29+
30+
- name: Run Biome
31+
run: biome ci .

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.vscode
22
node_modules
3+
.history

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ Online version of this documentation is available here: https://doc.crowdsec.net
66

77
The documentation is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
88

9+
## Pre-requisites
10+
11+
- Node.js (version 20 or later)
12+
- npm (Node package manager)
13+
- VSCode with recommended extensions installed (see `.vscode/extensions.json`)
14+
915
## Installation
1016

1117
```console
@@ -28,3 +34,12 @@ npm run build
2834

2935
This command generates static content into the `build` directory and can be served using any static contents hosting service.
3036
you can also use the `npm run serve` command to test the build locally.
37+
38+
## Linting and Formatting
39+
40+
This project uses [Biomes](https://biomejs.dev/) for linting and formatting. You can run the following commands:
41+
42+
```console
43+
npm run lint
44+
npm run format
45+
```

biome.json

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/2.0.6/schema.json",
3+
"vcs": { "enabled": false, "clientKind": "git", "useIgnoreFile": false },
4+
"files": {
5+
"ignoreUnknown": false,
6+
"includes": [
7+
"crowdsec-docs/**/*.ts",
8+
"crowdsec-docs/**/*.tsx",
9+
"crowdsec-docs/**/*.css",
10+
"!**/node_modules/**",
11+
"!crowdsec-docs/plugins/**",
12+
"!crowdsec-docs/build/**"
13+
]
14+
},
15+
"formatter": {
16+
"enabled": true,
17+
"formatWithErrors": false,
18+
"indentStyle": "tab",
19+
"indentWidth": 4,
20+
"lineEnding": "lf",
21+
"lineWidth": 140,
22+
"attributePosition": "auto",
23+
"bracketSameLine": false,
24+
"bracketSpacing": true,
25+
"expand": "auto",
26+
"useEditorconfig": true
27+
},
28+
"linter": {
29+
"enabled": true,
30+
"rules": {
31+
"recommended": true,
32+
"style": {
33+
"useImportType": "off"
34+
}
35+
}
36+
},
37+
"javascript": {
38+
"formatter": {
39+
"jsxQuoteStyle": "double",
40+
"quoteProperties": "asNeeded",
41+
"trailingCommas": "es5",
42+
"semicolons": "always",
43+
"arrowParentheses": "always",
44+
"bracketSameLine": false,
45+
"quoteStyle": "double",
46+
"attributePosition": "auto",
47+
"bracketSpacing": true
48+
}
49+
},
50+
"html": { "formatter": { "selfCloseVoidElements": "always" } },
51+
"css": {
52+
"formatter": {
53+
"enabled": true,
54+
"indentStyle": "tab",
55+
"indentWidth": 4,
56+
"lineEnding": "lf",
57+
"lineWidth": 140
58+
}
59+
},
60+
"assist": {
61+
"enabled": true,
62+
"actions": { "source": { "organizeImports": "on" } }
63+
}
64+
}

crowdsec-docs/.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v20.18.1

crowdsec-docs/.prettierrc

Lines changed: 0 additions & 6 deletions
This file was deleted.

crowdsec-docs/babel.config.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

crowdsec-docs/components.json

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,19 @@
33
"tailwind": {
44
"config": "tailwind.config.js",
55
"css": "src/css/custom.css",
6-
"baseColor": "neutral",
7-
"prefix": "tw-",
8-
"cssVariables": false
6+
"baseColor": "gray",
7+
"prefix": "",
8+
"cssVariables": true
99
},
1010
"rsc": true,
1111
"aliases": {
12-
"utils": "@/src/utils",
13-
"components": "@/src/components",
14-
"ui": "@/src/ui",
15-
"hooks": "@/src/hooks",
16-
"lib": "@/src/lib"
12+
"utils": "@site/src/utils",
13+
"components": "@site/src/components",
14+
"ui": "@site/src/ui",
15+
"hooks": "@site/src/hooks",
16+
"lib": "@site/src/lib"
1717
},
18-
"style": "default"
18+
"style": "default",
19+
"iconLibrary": "lucide"
1920
}
2021

crowdsec-docs/docs/appsec/quickstart/traefik.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ id: traefik
33
title: Traefik
44
---
55

6-
import FormattedTabs from '@site/src/components/FormattedTabs';
6+
import FormattedTabs from '@site/src/components/formatted-tabs';
77

88
# CrowdSec WAF QuickStart for Traefik
99

crowdsec-docs/docs/intro.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ id: intro
44
---
55

66
import useBaseUrl from "@docusaurus/useBaseUrl"
7-
import AcademyPromo from "@site/src/components/AcademyPromo"
7+
import AcademyPromo from "@site/src/components/academy-promo"
88

99
# Security Engine Overview
1010

0 commit comments

Comments
 (0)