Skip to content

Commit 4df68ce

Browse files
authored
Merge pull request #54 from jeffijoe/fix/sourcemaps
Fix sourcemaps + move to GHA and Eslint
2 parents ea4d7b5 + 7e22385 commit 4df68ce

15 files changed

+9171
-6161
lines changed

.eslintrc.cjs

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/* eslint-env node */
2+
module.exports = {
3+
extends: [
4+
'eslint:recommended',
5+
'plugin:@typescript-eslint/recommended',
6+
'prettier',
7+
],
8+
parser: '@typescript-eslint/parser',
9+
plugins: ['@typescript-eslint'],
10+
root: true,
11+
parserOptions: {
12+
project: true,
13+
tsconfigRootDir: __dirname,
14+
},
15+
rules: {
16+
// Only disabling this because this code is very old but also battle-tested,
17+
// and coming up with clever typings may break for consumers.
18+
'@typescript-eslint/no-explicit-any': 'off',
19+
},
20+
overrides: [
21+
{
22+
files: ['**/__tests__/*.test.ts'],
23+
rules: {
24+
// Unused vars are used for dependency resolution.
25+
'@typescript-eslint/no-unused-vars': 'off',
26+
},
27+
},
28+
],
29+
}

.github/workflows/ci.yml

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Name of the pipeline
2+
name: CI
3+
4+
# Allow the token to create releases and read pull requests.
5+
# Needed for semantic-release.
6+
permissions:
7+
contents: write
8+
pull-requests: read
9+
10+
# When pushing to `master` or when there is a PR for the branch.
11+
on:
12+
pull_request:
13+
push:
14+
branches:
15+
- 'master'
16+
17+
jobs:
18+
ci:
19+
name: Lint, Test & Release (Node ${{ matrix.version }})
20+
runs-on: ubuntu-22.04
21+
strategy:
22+
fail-fast: true
23+
matrix:
24+
version:
25+
- 16
26+
- 18
27+
- 20
28+
- current
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v3
32+
33+
- name: Setup Node
34+
uses: actions/setup-node@v3
35+
with:
36+
node-version: ${{ matrix.version }}
37+
cache: 'npm'
38+
39+
- name: Install Packages
40+
run: npm ci
41+
42+
- name: Build
43+
run: npm run build
44+
45+
- if: ${{ matrix.version == 'current' }}
46+
name: Lint
47+
run: npm run lint
48+
49+
- name: Test
50+
run: npm run cover
51+
52+
- if: ${{ matrix.version == 'current' }}
53+
name: Coveralls
54+
uses: coverallsapp/github-action@v2
55+
56+
- if: ${{ matrix.version == 'current' }}
57+
name: Semantic Release
58+
run: npm run semantic-release
59+
env:
60+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
61+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
62+
63+
# Cancel running workflows for the same branch when a new one is started.
64+
concurrency:
65+
group: ci-${{ github.ref }}
66+
cancel-in-progress: true

.travis.yml

-29
This file was deleted.

0 commit comments

Comments
 (0)