Skip to content

Commit

Permalink
Merge pull request #183 from chrismwilliams/update-tooling
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismwilliams authored Dec 11, 2023
2 parents 260475a + 52d6658 commit a85e0e5
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ module.exports = {
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"prettier",
"plugin:astro/recommended",
"plugin:astro/jsx-a11y-recommended",
],
Expand All @@ -30,7 +31,6 @@ module.exports = {
extraFileExtensions: [".astro"],
},
rules: {
"prettier/prettier": "off",
"astro/jsx-a11y/no-redundant-roles": [
"error",
{
Expand Down
29 changes: 14 additions & 15 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,26 @@ name: Mark stale issues and pull requests

on:
schedule:
- cron: '39 23 * * *'
- cron: "39 23 * * *"

jobs:
stale:

runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write

steps:
- uses: actions/stale@v7
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-label: 'no-issue-activity'
stale-pr-label: 'no-pr-activity'
stale-issue-message: "This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions."
stale-pr-message: "This PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions."
close-issue-message: "This issue was closed because it has been stalled for 5 days with no activity."
days-before-stale: 30
days-before-close: 5
days-before-pr-close: -1
exempt-issue-labels: "not-stale,bug,pinned,security,pending,awaiting-approval,work-in-progress"
exempt-pr-labels: "not-stale,bug,pinned,security,pending,awaiting-approval,work-in-progress"
- uses: actions/stale@v7
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-label: "no-issue-activity"
stale-pr-label: "no-pr-activity"
stale-issue-message: "This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions."
stale-pr-message: "This PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions."
close-issue-message: "This issue was closed because it has been stalled for 5 days with no activity."
days-before-stale: 30
days-before-close: 5
days-before-pr-close: -1
exempt-issue-labels: "not-stale,bug,pinned,security,pending,awaiting-approval,work-in-progress"
exempt-pr-labels: "not-stale,bug,pinned,security,pending,awaiting-approval,work-in-progress"
5 changes: 1 addition & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
{
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"[markdown]": {
"editor.wordWrap": "on",
"editor.codeActionsOnSave": {
"source.fixAll.markdownlint": true
"source.fixAll.markdownlint": "explicit"
}
},
"prettier.documentSelectors": ["**/*.astro"],
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"build": "astro build",
"postbuild": "pagefind --site dist",
"preview": "astro preview",
"format": "prettier -w --cache .",
"format": "prettier -w --cache . && prettier -w --cache **/*.astro",
"check": "astro check"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/components/blog/PostPreview.astro
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const postDate = post.data.updatedDate ?? post.data.publishDate;

<FormattedDate date={postDate} class="min-w-[120px] text-gray-600 dark:text-gray-400" />
<Tag>
{post.data.draft && <span class="text-red-500">(Draft) </span>}
{post.data.draft && <span class="text-red-500">(Draft) </span>}
<a href={`/posts/${post.slug}/`} class="cactus-link" data-astro-prefetch>
{post.data.title}
</a>
Expand Down
4 changes: 0 additions & 4 deletions src/layouts/Base.astro
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
---
import { ViewTransitions } from "astro:transitions";
import type { SiteMeta } from "@/types";
import BaseHead from "@/components/BaseHead";
import ThemeProvider from "@/components/ThemeProvider";
Expand All @@ -21,8 +19,6 @@ const {
<html lang={siteConfig.lang}>
<head>
<BaseHead title={title} description={description} ogImage={ogImage} articleDate={articleDate} />

<ViewTransitions />
</head>
<body>
<ThemeProvider />
Expand Down
2 changes: 1 addition & 1 deletion src/utils/date.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const dateFormat = new Intl.DateTimeFormat(siteConfig.date.locale, siteConfig.da

export function getFormattedDate(
date: string | number | Date,
options?: Intl.DateTimeFormatOptions
options?: Intl.DateTimeFormatOptions,
) {
if (typeof options !== "undefined") {
return new Date(date).toLocaleDateString(siteConfig.date.locale, {
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "astro/tsconfigs/strictest",
"compilerOptions": {
"baseUrl": ".",
"lib": ["DOM"],
"lib": ["es2022", "dom", "dom.iterable"],
"paths": {
"@/assets/*": ["src/assets/*"],
"@/components/*": ["src/components/*.astro"],
Expand Down

0 comments on commit a85e0e5

Please sign in to comment.