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

chore: #141 Add typescript CI #145

Merged
merged 13 commits into from
Jan 4, 2023
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
45 changes: 45 additions & 0 deletions .github/workflows/typescript-CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Typescript CI

on:
push:
branches: [main]
pull_request:
paths:
- "app/**"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

concurrency:
group: test-typescript-${{ github.head_ref }}
cancel-in-progress: true

jobs:
lint:
name: Lint Typescript
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Set up Nodejs
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install dependencies
working-directory: ./app
run: npm ci
- name: Type Check
working-directory: ./app
run: npm run typecheck
- name: Formatting
working-directory: ./app
run: |
npm run prettier:check
- name: Lint
working-directory: ./app
run: |
npm run lint
- name: Relay Codegen
working-directory: ./app
run: |
npm run build:relay
git diff --exit-code
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx lint-staged
24 changes: 24 additions & 0 deletions app/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// eslint-disable-next-line no-undef
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
],
overrides: [],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
},
plugins: ["react", "@typescript-eslint"],
rules: {
"react/no-unknown-property": ["error", { ignore: ["css"] }],
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
},
};
1 change: 1 addition & 0 deletions app/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__generated__
1 change: 1 addition & 0 deletions app/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Loading