Skip to content

Commit

Permalink
Merge pull request #301 from jakemulley/add-linting
Browse files Browse the repository at this point in the history
Add ESLint and Prettier linting
  • Loading branch information
jakemulley authored Dec 17, 2023
2 parents bd0bb0f + 600c2c2 commit 4898009
Show file tree
Hide file tree
Showing 4 changed files with 2,563 additions and 105 deletions.
30 changes: 30 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
module.exports = {
env: {
es2021: true,
node: true,
},
extends: ["eslint:recommended", "plugin:astro/recommended"],
overrides: [
{
env: {
node: true,
},
files: [".eslintrc.{js,cjs}"],
parserOptions: {
sourceType: "script",
},
},
{
files: ["*.astro"],
parser: "astro-eslint-parser",
parserOptions: {
extraFileExtensions: [".astro"],
},
},
],
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
},
rules: {},
};
1 change: 1 addition & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
- uses: withastro/action@v1
with:
node-version: 20
- run: npm run lint
deploy:
if: ${{ github.ref == 'refs/heads/main' }}
needs: build
Expand Down
Loading

0 comments on commit 4898009

Please sign in to comment.