Skip to content

Commit

Permalink
initial setup
Browse files Browse the repository at this point in the history
  • Loading branch information
43081j committed Mar 9, 2024
1 parent 97d0e14 commit 6b0e16f
Show file tree
Hide file tree
Showing 19 changed files with 3,065 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .c8rc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"reporter": ["lcov"],
"include": ["lib/**/*.js"],
"exclude": ["lib/test/**/*.js"]
}
7 changes: 7 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
root = true

[*]
end_of_line = lf
indent_size = 2
indent_style = space
trim_trailing_whitespace = true
31 changes: 31 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build & Test

on:
push:
branches: [master]
pull_request:

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Node v${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: Test
run: npm run test
- name: Report Test Coverage
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/lib
/node_modules
*.swp
/coverage
10 changes: 10 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"bracketSpacing": false,
"printWidth": 80,
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "none",
"useTabs": false,
"arrowParens": "always"
}
20 changes: 20 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const {configs: eslintConfigs} = require('@eslint/js');
const {configs: tseslintConfigs} = require('typescript-eslint');
const pluginRecommended = require('eslint-plugin-eslint-plugin/configs/recommended');
const googleConfig = require('eslint-config-google');

module.exports = [
{
...eslintConfigs.recommended,
...googleConfig,
files: ['src/**/*.ts'],
},
{
rules: {
'comma-dangle': ['error', 'never'],
'indent': 'off'
}
},
pluginRecommended,
...tseslintConfigs.strict
];
Loading

0 comments on commit 6b0e16f

Please sign in to comment.