Skip to content

Commit db5fc63

Browse files
feat: check & lint script
1 parent e509c20 commit db5fc63

5 files changed

Lines changed: 31 additions & 3 deletions

File tree

site/.prettierignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules/
2+
dist/
3+
.astro/
4+
*.lock
5+
pnpm-lock.yaml
6+
package-lock.json

site/.prettierrc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@
33
"semi": false,
44
"singleQuote": true,
55
"printWidth": 120,
6-
"plugins": ["prettier-plugin-astro", "prettier-plugin-tailwindcss", "prettier-plugin-css-order"],
7-
"pluginSearchDirs": false
6+
"plugins": ["prettier-plugin-astro", "prettier-plugin-tailwindcss", "prettier-plugin-css-order"]
87
}

site/package.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,13 @@
1010
"dev": "astro dev",
1111
"start": "astro dev",
1212
"build": "astro build",
13-
"preview": "astro preview"
13+
"preview": "astro preview",
14+
"lint": "eslint .",
15+
"lint:fix": "eslint . --fix",
16+
"format": "prettier --write .",
17+
"format:check": "prettier --check .",
18+
"typecheck": "tsc --noEmit",
19+
"check": "pnpm format:check && pnpm lint && pnpm typecheck"
1420
},
1521
"keywords": [
1622
"astro",

site/scripts/check

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/sh -e
2+
3+
echo "-> Formatting check..."
4+
pnpm prettier --check .
5+
6+
echo "-> Linting..."
7+
pnpm eslint .
8+
9+
echo "-> Type checking..."
10+
pnpm tsc --noEmit

site/scripts/lint

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh -e
2+
3+
echo "-> Formatting..."
4+
pnpm prettier --write .
5+
6+
echo "-> Linting (with fixes)..."
7+
pnpm eslint --fix .

0 commit comments

Comments
 (0)