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
26 changes: 26 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
module.exports = {
env: {
browser: true,
es2021: true,
node: true,
jest: true
},
extends: [
'eslint:recommended',
],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module'
},
rules: {
'indent': ['error', 2],
'linebreak-style': ['error', 'unix'],
'quotes': ['error', 'single'],
'semi': ['error', 'always'],
'no-console': 'warn',
'no-unused-vars': 'warn',
'prefer-const': 'error',
'no-var': 'error'
},
ignorePatterns: ['dist/', 'node_modules/', 'lib/']
};
45 changes: 45 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Test Suite

on:
push:
branches: [ main, master, feature/** ]
pull_request:
branches: [ main, master ]

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x, 20.x, 22.x]

steps:
- uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Run linting
run: npm run lint

- name: Run tests
run: npm test

- name: Run build
run: npm run build

- name: Run type checking
run: npm run typecheck

- name: Fix security vulnerabilities
run: npm audit fix --force || echo "Could not fix all vulnerabilities automatically"

- name: Run security audit
run: npm run security
67 changes: 49 additions & 18 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,30 +1,61 @@
# Dependency directories
node_modules/

# Build outputs
dist/
lib/

# IDE files
.vscode/
.idea/
*.swp
*.swo

# OS generated files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db

# Logs
logs
*.log
.vscode/

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# Environment
.env
.env.local
.env.*.local

# Temporary files
tmp/
temp/
*.tmp
*.temp

# Development artifacts
test-optimization.js
test_final.js
test_manual.js
test_source.js
simple_test.js
build.js
temp_test.js

# Node-specific
npm-debug.log*
yarn-debug.log*
yarn-error.log*
npm-shrinkwrap.json

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directory
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
node_modules

package-lock.json
73 changes: 73 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Test files
test/
tests/

# Source files (already compiled)
src/

# Build tools
rollup.config.js
vitest.config.js
babel.config.js

# Development files
*.md
!README.md
!LICENSE

# IDE files
.node
.nyc_output
coverage
.nyc_output/
coverage/

# Environment
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

# Logs
logs
*.log

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output directory
dist/
lib/
9 changes: 9 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"semi": true,
"trailingComma": "es5",
"singleQuote": true,
"printWidth": 100,
"tabWidth": 2,
"useTabs": false,
"bracketSpacing": true
}
Loading