Skip to content
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
4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

20 changes: 0 additions & 20 deletions .eslintrc.json

This file was deleted.

61 changes: 61 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: CI

# Security: Do not replace `pull_request` with `pull_request_target` to expose secrets or
# GITHUB_TOKEN write access to PR code. pull_request_target runs untrusted fork PR code with
# base-branch privileges.

on:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize
- reopened

env:
CI: true

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup node
uses: actions/setup-node@v6
with:
node-version-file: 'package.json'
cache: 'npm'
- name: Install dependencies
run: npm ci --prefer-offline --no-audit
- run: npm run lint

build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup node
uses: actions/setup-node@v6
with:
node-version-file: 'package.json'
cache: 'npm'
- name: Install dependencies
run: npm ci --prefer-offline --no-audit
- run: npm run build

test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup node
uses: actions/setup-node@v6
with:
node-version-file: 'package.json'
cache: 'npm'
- name: Install dependencies
run: npm ci --prefer-offline --no-audit
- run: npm run test
26 changes: 26 additions & 0 deletions .github/workflows/lockfile-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Lockfile lint

# Security: Do not replace `pull_request` with `pull_request_target` to expose secrets or
# GITHUB_TOKEN write access to PR code. pull_request_target runs untrusted fork PR code with
# base-branch privileges.

on:
pull_request:
paths:
- 'package-lock.json'
types:
- opened
- synchronize
- reopened

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

steps:
- name: Checkout
uses: actions/checkout@v6

- name: Validate package-lock.json
run: npx --yes lockfile-lint@5 --path package-lock.json --type npm --validate-https --allowed-hosts registry.npmjs.org
3 changes: 1 addition & 2 deletions codegen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ const config: CodegenConfig = {
documents: ['src/services/*.ts'],
generates: {
'./src/types/graphql.ts': {
plugins: ['typescript', 'typescript-operations'],
plugins: ['typescript-operations'],
config: {
skipTypename: true,
dedupeFragments: true,
onlyOperationTypes: true,
avoidOptionals: true,
enumsAsTypes: true,
Expand Down
27 changes: 27 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import eslint from '@eslint/js';
import globals from 'globals';
import tseslint from 'typescript-eslint';

export default tseslint.config(
{
ignores: ['dist/**', 'node_modules/**', 'src/types/graphql.ts'],
},
eslint.configs.recommended,
...tseslint.configs.recommended,
{
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
globals: {
...globals.node,
},
},
rules: {
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'no-console': 'warn',
},
}
);
Loading
Loading