Skip to content

Commit

Permalink
setup lint/format
Browse files Browse the repository at this point in the history
  • Loading branch information
itsMapleLeaf committed Oct 17, 2023
1 parent a6a5a21 commit 49d570d
Show file tree
Hide file tree
Showing 14 changed files with 2,917 additions and 487 deletions.
14 changes: 14 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"extends": "./node_modules/@astrojs/site-kit/eslint.config.cjs",
"ignorePatterns": ["node_modules", "dist"],
"overrides": [
// disable rules in templates here so that we don't litter them with disable comments
{
"files": ["templates/studio-template-blog/src/pages/rss.xml.ts"],
"rules": {
// no cleaner way to fix this tbh
"@typescript-eslint/no-non-null-assertion": "off"
}
}
]
}
9 changes: 9 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
on:
push:
branches:
- main
pull_request:

jobs:
lint:
uses: withastro/site-kit/.github/workflows/lint.yml@reusable-lint-workflow
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pnpm-lock.yaml
.astro
18 changes: 17 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
{
"private": true
"private": true,
"type": "module",
"scripts": {
"lint": "run-s --continue-on-error lint:*",
"lint:astro-sync": "pnpm -r exec astro sync",
"lint:typegen": "pnpm -r exec studio typegen",
"lint:eslint": "eslint . --fix --cache --cache-file=node_modules/.cache/.eslintcache --report-unused-disable-directives",
"lint:prettier": "prettier . --write --cache --list-different",
"lint:tsc": "pnpm -r exec tsc -b",
"lint:astro-check": "pnpm -r exec astro check"
},
"devDependencies": {
"@astrojs/site-kit": "github:withastro/site-kit",
"npm-run-all": "^4.1.5",
"typescript": "^5.2.2"
},
"prettier": "@astrojs/site-kit/prettier"
}
Loading

0 comments on commit 49d570d

Please sign in to comment.