Skip to content

Commit 72d3956

Browse files
committed
chore: normalize line endings and format code
1 parent ba81067 commit 72d3956

8 files changed

Lines changed: 345 additions & 432 deletions

File tree

.eslintrc.json

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,18 @@
1-
{
2-
"parser": "@typescript-eslint/parser",
3-
"extends": [
4-
"eslint:recommended",
5-
"plugin:@typescript-eslint/recommended",
6-
"prettier"
7-
],
8-
"plugins": ["@typescript-eslint"],
9-
"env": {
10-
"node": true,
11-
"es2022": true
12-
},
13-
"parserOptions": {
14-
"ecmaVersion": 2022,
15-
"sourceType": "module"
16-
},
17-
"rules": {
18-
"@typescript-eslint/explicit-function-return-type": "off",
19-
"@typescript-eslint/no-explicit-any": "warn",
20-
"@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_" }]
21-
}
22-
}
1+
{
2+
"parser": "@typescript-eslint/parser",
3+
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier"],
4+
"plugins": ["@typescript-eslint"],
5+
"env": {
6+
"node": true,
7+
"es2022": true
8+
},
9+
"parserOptions": {
10+
"ecmaVersion": 2022,
11+
"sourceType": "module"
12+
},
13+
"rules": {
14+
"@typescript-eslint/explicit-function-return-type": "off",
15+
"@typescript-eslint/no-explicit-any": "warn",
16+
"@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_" }]
17+
}
18+
}

.gitattributes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
*.ts text eol=lf
2+
*.json text eol=lf
3+
*.yml text eol=lf
4+
*.yaml text eol=lf
5+
*.md text eol=lf

.github/workflows/ci.yml

Lines changed: 123 additions & 123 deletions
Original file line numberDiff line numberDiff line change
@@ -1,123 +1,123 @@
1-
name: CI
2-
3-
on:
4-
push:
5-
branches: [main, master]
6-
pull_request:
7-
branches: [main, master]
8-
9-
jobs:
10-
lint:
11-
name: Lint
12-
runs-on: ubuntu-latest
13-
steps:
14-
- uses: actions/checkout@v4
15-
16-
- name: Setup Node.js
17-
uses: actions/setup-node@v4
18-
with:
19-
node-version: '20'
20-
cache: 'npm'
21-
22-
- name: Install dependencies
23-
run: npm ci
24-
25-
- name: Run ESLint
26-
run: npm run lint
27-
28-
- name: Check formatting
29-
run: npx prettier --check "src/**/*.ts" "tests/**/*.ts" "examples/**/*.ts"
30-
31-
typecheck:
32-
name: Type Check
33-
runs-on: ubuntu-latest
34-
steps:
35-
- uses: actions/checkout@v4
36-
37-
- name: Setup Node.js
38-
uses: actions/setup-node@v4
39-
with:
40-
node-version: '20'
41-
cache: 'npm'
42-
43-
- name: Install dependencies
44-
run: npm ci
45-
46-
- name: Run TypeScript compiler
47-
run: npm run typecheck
48-
49-
build:
50-
name: Build
51-
runs-on: ubuntu-latest
52-
steps:
53-
- uses: actions/checkout@v4
54-
55-
- name: Setup Node.js
56-
uses: actions/setup-node@v4
57-
with:
58-
node-version: '20'
59-
cache: 'npm'
60-
61-
- name: Install dependencies
62-
run: npm ci
63-
64-
- name: Build package
65-
run: npm run build
66-
67-
- name: Check build output
68-
run: |
69-
test -f dist/index.js || exit 1
70-
test -f dist/index.mjs || exit 1
71-
test -f dist/index.d.ts || exit 1
72-
73-
test:
74-
name: Test (Node ${{ matrix.node-version }})
75-
runs-on: ubuntu-latest
76-
strategy:
77-
matrix:
78-
node-version: [20, 22]
79-
steps:
80-
- uses: actions/checkout@v4
81-
82-
- name: Setup Node.js ${{ matrix.node-version }}
83-
uses: actions/setup-node@v4
84-
with:
85-
node-version: ${{ matrix.node-version }}
86-
cache: 'npm'
87-
88-
- name: Install dependencies
89-
run: npm ci
90-
91-
- name: Run unit tests
92-
run: npm run test
93-
94-
- name: Generate coverage report
95-
if: matrix.node-version == 20
96-
run: npm run test:coverage
97-
98-
- name: Upload coverage to Codecov
99-
if: matrix.node-version == 20
100-
uses: codecov/codecov-action@v4
101-
with:
102-
files: ./coverage/coverage-final.json
103-
flags: unittests
104-
name: codecov-agi-node
105-
env:
106-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
107-
108-
all-checks:
109-
name: All Checks Passed
110-
if: always()
111-
needs: [lint, typecheck, build, test]
112-
runs-on: ubuntu-latest
113-
steps:
114-
- name: Check all jobs
115-
run: |
116-
if [ "${{ needs.lint.result }}" != "success" ] || \
117-
[ "${{ needs.typecheck.result }}" != "success" ] || \
118-
[ "${{ needs.build.result }}" != "success" ] || \
119-
[ "${{ needs.test.result }}" != "success" ]; then
120-
echo "One or more checks failed"
121-
exit 1
122-
fi
123-
echo "All checks passed!"
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
branches: [main, master]
8+
9+
jobs:
10+
lint:
11+
name: Lint
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: '20'
20+
cache: 'npm'
21+
22+
- name: Install dependencies
23+
run: npm ci
24+
25+
- name: Run ESLint
26+
run: npm run lint
27+
28+
- name: Check formatting
29+
run: npx prettier --check "src/**/*.ts" "tests/**/*.ts" "examples/**/*.ts"
30+
31+
typecheck:
32+
name: Type Check
33+
runs-on: ubuntu-latest
34+
steps:
35+
- uses: actions/checkout@v4
36+
37+
- name: Setup Node.js
38+
uses: actions/setup-node@v4
39+
with:
40+
node-version: '20'
41+
cache: 'npm'
42+
43+
- name: Install dependencies
44+
run: npm ci
45+
46+
- name: Run TypeScript compiler
47+
run: npm run typecheck
48+
49+
build:
50+
name: Build
51+
runs-on: ubuntu-latest
52+
steps:
53+
- uses: actions/checkout@v4
54+
55+
- name: Setup Node.js
56+
uses: actions/setup-node@v4
57+
with:
58+
node-version: '20'
59+
cache: 'npm'
60+
61+
- name: Install dependencies
62+
run: npm ci
63+
64+
- name: Build package
65+
run: npm run build
66+
67+
- name: Check build output
68+
run: |
69+
test -f dist/index.js || exit 1
70+
test -f dist/index.mjs || exit 1
71+
test -f dist/index.d.ts || exit 1
72+
73+
test:
74+
name: Test (Node ${{ matrix.node-version }})
75+
runs-on: ubuntu-latest
76+
strategy:
77+
matrix:
78+
node-version: [20, 22]
79+
steps:
80+
- uses: actions/checkout@v4
81+
82+
- name: Setup Node.js ${{ matrix.node-version }}
83+
uses: actions/setup-node@v4
84+
with:
85+
node-version: ${{ matrix.node-version }}
86+
cache: 'npm'
87+
88+
- name: Install dependencies
89+
run: npm ci
90+
91+
- name: Run unit tests
92+
run: npm run test
93+
94+
- name: Generate coverage report
95+
if: matrix.node-version == 20
96+
run: npm run test:coverage
97+
98+
- name: Upload coverage to Codecov
99+
if: matrix.node-version == 20
100+
uses: codecov/codecov-action@v4
101+
with:
102+
files: ./coverage/coverage-final.json
103+
flags: unittests
104+
name: codecov-agi-node
105+
env:
106+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
107+
108+
all-checks:
109+
name: All Checks Passed
110+
if: always()
111+
needs: [lint, typecheck, build, test]
112+
runs-on: ubuntu-latest
113+
steps:
114+
- name: Check all jobs
115+
run: |
116+
if [ "${{ needs.lint.result }}" != "success" ] || \
117+
[ "${{ needs.typecheck.result }}" != "success" ] || \
118+
[ "${{ needs.build.result }}" != "success" ] || \
119+
[ "${{ needs.test.result }}" != "success" ]; then
120+
echo "One or more checks failed"
121+
exit 1
122+
fi
123+
echo "All checks passed!"

0 commit comments

Comments
 (0)