Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Mtillmann committed Mar 8, 2024
0 parents commit 81c72da
Show file tree
Hide file tree
Showing 75 changed files with 15,311 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
module.exports = {
"env": {
"browser": true,
"es2022": true,
"node": true
},
"extends": "standard-with-typescript",
"overrides": [
{
"env": {
"node": true
},
"files": [
".eslintrc.{js,cjs}"
],
"parserOptions": {
"sourceType": "script"
}
}
],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"rules": {
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/strict-boolean-expressions": "off",
}
}
14 changes: 14 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Tests
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'npm'
- run: npm ci
- run: npm test
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
lib
coverage
node_modules
.idea
dist
12 changes: 12 additions & 0 deletions babel.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"presets": [
[
"@babel/preset-env",
{
"targets": {
"node": "current"
}
}
]
]
}
12 changes: 12 additions & 0 deletions jest-env-jsdom.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { TextEncoder, TextDecoder } from "util";
import pkg from 'jest-environment-jsdom';
const { default: $JSDOMEnvironment } = pkg;
export default class JSDOMEnvironment extends $JSDOMEnvironment {
constructor(...args) {
const { global } = super(...args);
if (!global.TextEncoder)
global.TextEncoder = TextEncoder;
if (!global.TextDecoder)
global.TextDecoder = TextDecoder;
}
}
33 changes: 33 additions & 0 deletions jest.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/** @type {import('ts-jest').JestConfigWithTsJest} */

module.exports = {
preset: "ts-jest",
testEnvironment: "jsdom",
moduleFileExtensions: ["js", "jsx", "ts", "tsx"],
testPathIgnorePatterns: ["/node_modules/"],
testRegex: ".*.(test|spec).(j|t)s[x]?$",
transform: {
"node_modules/(react-dnd|dnd-core|@react-dnd)/.+\\.(j|t)sx?$": "ts-jest",
"^.+\\.js$": "babel-jest",
},
testEnvironment: "./jest-env-jsdom.js",
transformIgnorePatterns: [`/node_modules/(?!(filenamify)|filename-reserved-regex)`],
}

/*
module.exports = {
transform: {'^.+\\.ts?$': 'ts-jest'},
testRegex: '/tests/.*\\.(test|spec)?\\.(ts|tsx)$',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
//testEnvironment: "./jest-env-jsdom.js",
extensionsToTreatAsEsm: ['.ts'],
transformIgnorePatterns: [
"node_modules/(filenamify)"
]
};
*/
Loading

0 comments on commit 81c72da

Please sign in to comment.