Skip to content

Commit

Permalink
Merge pull request #12 from levino/feature/lint-in-ci
Browse files Browse the repository at this point in the history
feat: run lint in ci
  • Loading branch information
levino authored Nov 24, 2023
2 parents 7dc1562 + a16cf89 commit fa55bbc
Show file tree
Hide file tree
Showing 17 changed files with 100 additions and 83 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: CI

on:
push:
branches: ["master"]
pull_request:
types: [opened, synchronize]

jobs:
build:
name: Build and Test
timeout-minutes: 15
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 2
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: 18
cache: "pnpm"

- name: Install dependencies
run: pnpm install

- name: Lint
run: pnpm lint
2 changes: 1 addition & 1 deletion apps/registry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"dev": "next dev --port 3002",
"build": "prisma generate && next build",
"start": "next start",
"lint": "next lint",
"lint": "next lint --max-warnings=0",
"postinstall": "prisma generate --data-proxy",
"db:generate": "prisma generate"
},
Expand Down
4 changes: 3 additions & 1 deletion apps/registry/pages/api/formatters/json.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ const format = async function format(resume) {
return { content: JSON.stringify(resume, undefined, 4), headers: [] };
};

export default { format };
const exports = { format };

export default exports;
4 changes: 3 additions & 1 deletion apps/registry/pages/api/formatters/qr.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,6 @@ export const format = async function format(resume, { username }) {
};
};

export default { format };
const exports = { format };

export default exports;
4 changes: 3 additions & 1 deletion apps/registry/pages/api/formatters/template.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,6 @@ const format = async function (resume, options) {
};
};

export default { format };
const exports = { format };

export default exports;
4 changes: 3 additions & 1 deletion apps/registry/pages/api/formatters/tex.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ const format = async function format(resume) {
return { content: 'Unsupported Latex', headers: [] };
};

export default { format };
const exports = { format };

export default exports;
4 changes: 3 additions & 1 deletion apps/registry/pages/api/formatters/text.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,6 @@ ${(skill.keywords ?? []).map((keyword) => `+ ${keyword}`).join('\n')}
return { content, headers: [] };
};

export default { format };
const exports = { format };

export default exports;
4 changes: 3 additions & 1 deletion apps/registry/pages/api/formatters/yaml.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ const format = async function format(resume) {
return { content, headers: [] };
};

export default { format };
const exports = { format };

export default exports;
4 changes: 3 additions & 1 deletion apps/registry/pages/api/schema.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default {
const schema = {
$schema: 'http://json-schema.org/draft-04/schema#',
additionalProperties: false,
definitions: {
Expand Down Expand Up @@ -519,3 +519,5 @@ export default {
title: 'Resume Schema',
type: 'object',
};

export default schema;
2 changes: 1 addition & 1 deletion apps/registry/pages/interview.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ export default function Talk() {
setReply("");
textInput?.current?.focus();
}
}, [replying]);
}, [messages, position, reply, replying]);

console.log({ messages });

Expand Down
2 changes: 1 addition & 1 deletion apps/registry/pages/jobs.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export default function Talk() {
};

fetchData();
}, []);
}, [username]);

return (
<Layout>
Expand Down
2 changes: 1 addition & 1 deletion apps/registry/pages/letter.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default function Letter() {
};

fetchData();
}, []);
}, [username]);

return (
<Layout>
Expand Down
2 changes: 1 addition & 1 deletion apps/registry/pages/resumes.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const Resumes = () => {
return (
<div key={resume.updated_at}>
<a href={`https://registry.jsonresume.org/${resume.username}`}>
<Image src={resume.image} />
<Image alt="The user"src={resume.image} />
</a>
<div>{resume.label?.substr(0, 30)}</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion apps/registry/pages/suggestions.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default function Talk() {
};

fetchData();
}, []);
}, [username]);

return (
<Layout>
Expand Down
1 change: 1 addition & 0 deletions apps/registry/pages/themes.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ const Resumes = () => {
<div key={resume}>
<a href={resume}>
<Image
alt="Screenshot"
src={`https://screenshot-peach-beta.vercel.app/api?url=${resume}&height=720&width=1280`}
/>
</a>
Expand Down
7 changes: 5 additions & 2 deletions packages/eslint-config-custom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@
"dependencies": {
"eslint-config-next": "latest",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-react": "7.28.0",
"eslint-config-turbo": "latest"
"eslint-config-turbo": "latest",
"eslint-plugin-react": "7.28.0"
},
"publishConfig": {
"access": "public"
},
"devDependencies": {
"next": "13.4.4"
}
}
Loading

1 comment on commit fa55bbc

@vercel
Copy link

@vercel vercel bot commented on fa55bbc Nov 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.