Skip to content

Commit c3dcf5e

Browse files
committed
fix yarn setup, setup prettier w/ astro
1 parent 3807985 commit c3dcf5e

7 files changed

Lines changed: 84 additions & 78 deletions

File tree

.github/workflows/lint.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ jobs:
1919
uses: actions/setup-node@v4
2020
with:
2121
node-version: "24"
22-
cache: "yarn"
22+
cache: "npm"
2323

2424
- name: Install dependencies
25-
run: yarn install --frozen-lockfile
25+
run: npm ci
2626

2727
- name: Run linters
28-
run: yarn lint
28+
run: npm run lint

.prettierignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
_site
22
node_modules
3-
yarn.lock
3+
package-lock.json

.prettierrc.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
{
22
"singleQuote": false,
3-
"trailingComma": "all"
3+
"trailingComma": "all",
4+
"plugins": ["prettier-plugin-astro"],
5+
"overrides": [
6+
{
7+
"files": "*.astro",
8+
"options": {
9+
"parser": "astro"
10+
}
11+
}
12+
]
413
}

.stylelintrc.json

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

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
default: setup clean lintfix serve
22

33
setup:
4-
yarn check || yarn
4+
npm ci
55
bundle check || bundle
66
make update
77

88
lint:
9-
yarn lint
9+
npm run lint
1010
make lint-ruby
1111

1212
lintfix:
13-
yarn lintfix
13+
npm run lintfix
1414
make lintfix-ruby
1515

1616
lint-ruby:

package-lock.json

Lines changed: 60 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,17 @@
99
"preview": "astro preview",
1010
"astro": "astro",
1111
"update-data": "ruby bin/data-update",
12-
"build:full": "npm run update-data && npm run build"
12+
"build:full": "npm run update-data && npm run build",
13+
"lint": "prettier --check 'src/**/*.{astro,js,ts,jsx,tsx,css,scss,md,mdx}'",
14+
"lintfix": "prettier --write 'src/**/*.{astro,js,ts,jsx,tsx,css,scss,md,mdx}'"
1315
},
1416
"dependencies": {
1517
"@astrojs/starlight": "^0.35.3",
1618
"astro": "^5.6.1",
1719
"sharp": "^0.34.2"
1820
},
19-
"devDependencies": {}
21+
"devDependencies": {
22+
"prettier": "^3.0.0",
23+
"prettier-plugin-astro": "^0.14.0"
24+
}
2025
}

0 commit comments

Comments
 (0)