Skip to content

Commit

Permalink
First implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
macno committed Feb 26, 2024
1 parent d02bb57 commit 43b173e
Show file tree
Hide file tree
Showing 26 changed files with 6,586 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# http://editorconfig.org

root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
77 changes: 77 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
module.exports = {
plugins: [
"@typescript-eslint",
"node",
"prettier"
],
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:prettier/recommended"],
parser: "@typescript-eslint/parser",
parserOptions: {
"project": "./tsconfig.json"
},
rules: {
"quotes": ["error", "single", { "avoidEscape": true }],
"eqeqeq": [
"error",
"smart"
],
"prefer-rest-params": "off",
"no-console": "error",
"no-process-env": "error",
"node/no-deprecated-api": ["warn"],
'prettier/prettier': [
'error',
{
arrowParens: 'avoid',
printWidth: 120,
tabWidth: 2,
singleQuote: true,
trailingComma: 'none',
bracketSpacing: true,
parser: 'typescript'
}
]
},
overrides: [
{
files: ['*.ts'],
rules: {
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-this-alias": "off",
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "memberLike",
"modifiers": ["private", "protected"],
"format": ["camelCase"],
"leadingUnderscore": "require"
}
],
"@typescript-eslint/no-unused-vars": ["error", {"argsIgnorePattern": "^_", "args": "after-used"}],
"@typescript-eslint/no-inferrable-types": ["error", { ignoreProperties: true }],
"@typescript-eslint/no-empty-function": ["off"],
"@typescript-eslint/ban-types": ["warn", {
"types": {
"Function": null,
}
}],
"@typescript-eslint/no-shadow": ["warn"],
}
},
{
files: ["tests/**/*.ts"],
rules: {
"no-empty": "off",
"@typescript-eslint/ban-ts-ignore": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-shadow": ["off"],
"@typescript-eslint/no-floating-promises": ["off"],
"@typescript-eslint/no-non-null-assertion": ["off"],
"@typescript-eslint/explicit-module-boundary-types": ["off"]
}
}
]
};
12 changes: 12 additions & 0 deletions .github/workflows/node-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: publish to npm

on:
push:
tags:
- 'v*.*.*'

jobs:
node-publish:
uses: fluidware-team/.github/.github/workflows/node-publish.yml@v1
secrets:
npm_token: ${{ secrets.NPM_TOKEN }}
7 changes: 7 additions & 0 deletions .github/workflows/node-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: lint test compile

on: push

jobs:
node-lint-test-compile:
uses: fluidware-team/.github/.github/workflows/node-test.yml@v1
70 changes: 70 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# version.ts file is automatically generated at compile time

version.ts

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Filter Logs singal files
!experimental/examples/logs

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# 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 (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/
build/

# TypeScript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# next.js build output
.next

# docs files
docs

.nyc_output
3 changes: 3 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fund=false
engine-strict=true
update-notifier=false
7 changes: 7 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
collectCoverage: true,
reporters: ['default']
};
Loading

0 comments on commit 43b173e

Please sign in to comment.