Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ci workflow #76

Merged
merged 6 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 20 additions & 22 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,42 +1,40 @@
/** @type {import("eslint").Linter.Config} */
const config = {
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": true
parser: "@typescript-eslint/parser",
parserOptions: {
project: true,
},
"plugins": [
"@typescript-eslint"
],
"extends": [
plugins: ["@typescript-eslint"],
extends: [
"next/core-web-vitals",
"plugin:@typescript-eslint/recommended-type-checked",
"plugin:@typescript-eslint/stylistic-type-checked"
"plugin:@typescript-eslint/stylistic-type-checked",
],
"rules": {
rules: {
"@typescript-eslint/array-type": "off",
"@typescript-eslint/consistent-type-definitions": "off",
"@typescript-eslint/consistent-type-imports": [
"warn",
{
"prefer": "type-imports",
"fixStyle": "inline-type-imports"
}
prefer: "type-imports",
fixStyle: "inline-type-imports",
},
],
"@typescript-eslint/no-unused-vars": [
"warn",
{
"argsIgnorePattern": "^_"
}
argsIgnorePattern: "^_",
},
],
"@typescript-eslint/require-await": "off",
"@typescript-eslint/no-misused-promises": [
"error",
{
"checksVoidReturn": {
"attributes": false
}
}
]
}
}
module.exports = config;
checksVoidReturn: {
attributes: false,
},
},
],
},
};
module.exports = config;
65 changes: 65 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: ci

on:
push:
branches:
- main
pull_request:

jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- run: corepack enable
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: 20
cache: "pnpm"

- name: Install dependencies
shell: bash
run: pnpm install

- name: lint
run: pnpm run lint

prettier:
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- run: corepack enable
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: 20
cache: "pnpm"

- name: Install dependencies
shell: bash
run: pnpm install

- name: prettier
run: pnpm run format:check

typecheck:
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- run: corepack enable
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: 20
cache: "pnpm"

- name: Install dependencies
shell: bash
run: pnpm install

- name: typecheck
run: pnpm run typecheck
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm-lock.yaml
14 changes: 6 additions & 8 deletions .sanity/runtime/app.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@

// This file is auto-generated on 'sanity dev'
// Modifications to this file is automatically discarded
import {renderStudio} from "sanity"
import studioConfig from "../../sanity.config.ts"
import { renderStudio } from "sanity";
import studioConfig from "../../sanity.config.ts";

renderStudio(
document.getElementById("sanity"),
studioConfig,
{reactStrictMode: false, basePath: "/"}
)
renderStudio(document.getElementById("sanity"), studioConfig, {
reactStrictMode: false,
basePath: "/",
});
Loading