Skip to content

Commit 3546147

Browse files
Merge pull request #33 from PaystackOSS/feat/docs-skills
chore: add linting and clean up release step
2 parents cf0f6a5 + 0b6c68b commit 3546147

29 files changed

Lines changed: 1863 additions & 476 deletions

.github/workflows/ci.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
7+
jobs:
8+
ci:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
13+
- name: Setup Node.js
14+
uses: actions/setup-node@v4
15+
with:
16+
node-version: '20.x'
17+
cache: 'npm'
18+
19+
- name: Install dependencies
20+
run: npm ci
21+
22+
- name: Lint
23+
run: npm run lint
24+
25+
- name: Check formatting
26+
run: npm run format:check
27+
28+
- name: Build
29+
run: npm run build
30+
31+
- name: Test
32+
run: npm test

.github/workflows/release.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,24 @@ jobs:
2020

2121
- name: Install dependencies
2222
run: npm ci
23-
23+
24+
- name: Lint
25+
run: npm run lint
26+
27+
- name: Check formatting
28+
run: npm run format:check
29+
30+
- name: Test
31+
run: npm test
32+
2433
- name: Sync version with release tag
2534
run: npm version ${{ github.event.release.tag_name }} --no-git-tag-version
2635

2736
- name: Build package
2837
run: npm run build
2938

39+
- name: Audit publish contents
40+
run: npm pack --dry-run
41+
3042
- name: Publish to npmjs
3143
run: npm publish --access public

.prettierrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"singleQuote": true,
3+
"printWidth": 100,
4+
"tabWidth": 2,
5+
"trailingComma": "all"
6+
}

eslint.config.mjs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import js from '@eslint/js';
2+
import tseslint from 'typescript-eslint';
3+
import prettierConfig from 'eslint-config-prettier';
4+
5+
export default tseslint.config(
6+
js.configs.recommended,
7+
...tseslint.configs.recommended,
8+
prettierConfig,
9+
{
10+
ignores: ['build/**', 'node_modules/**'],
11+
},
12+
{
13+
rules: {
14+
'@typescript-eslint/no-explicit-any': 'warn',
15+
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
16+
},
17+
},
18+
);

0 commit comments

Comments
 (0)