Skip to content

Commit

Permalink
Transfer repo to GitHub
Browse files Browse the repository at this point in the history
  • Loading branch information
vladbasin committed Nov 12, 2024
0 parents commit 05f833c
Show file tree
Hide file tree
Showing 82 changed files with 11,225 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dist
node_modules
coverage
.build
62 changes: 62 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
module.exports = {
env: {
es2021: true,
node: true,
jest: true,
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'airbnb-base',
'plugin:prettier/recommended',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript',
'prettier',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 12,
sourceType: 'module',
},
plugins: ['@typescript-eslint', 'prettier', 'import'],
rules: {
'prettier/prettier': ['error', { endOfLine: 'auto' }],
'import/extensions': 'off',
'import/no-unresolved': 'error',
'no-console': 'off',
'no-unused-vars': ['off', { args: 'all', argsIgnorePattern: '^_' }],
'@typescript-eslint/no-unused-vars': ['off', { args: 'all', argsIgnorePattern: '^_' }],
'import/prefer-default-export': 'off',
'import/order': [
'error',
{
'newlines-between': 'never',
groups: [
['builtin', 'external'],
['internal', 'parent', 'sibling', 'index'],
],
},
],
'no-shadow': 'off',
'@typescript-eslint/no-shadow': 'error',
'no-underscore-dangle': ['error', { allowAfterThis: true }],
'class-methods-use-this': 'off',
'import/no-cycle': 'off',
},
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts'],
},
'import/resolver': {
typescript: {
alwaysTryTypes: true, // always try to resolve types under `<root>@types` directory even it doesn't contain any source code, like `@types/unist`

// Choose from one of the "project" configs below or omit to use <root>/tsconfig.json by default

// use <root>/path/to/folder/tsconfig.json
project: './tsconfig.json',
},
},
},
};
29 changes: 29 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [21.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm install
- run: npm test
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# OSX
#
.DS_Store

# node.js
#
node_modules/
npm-debug.log
yarn-error.log

# Output
#
dist/**/*
coverage/
5 changes: 5 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.DS_Store
.vscode
src
tsconfig.json
coverage
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"tabWidth": 4,
"printWidth": 120,
"singleQuote": true,
"trailingComma": "es5",
"arrowParens": "avoid",
"semi": true
}
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"editor.formatOnSave": true,
"explorer.autoReveal": false,
"files.exclude": {
"dist/": true,
},
}
23 changes: 23 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Watch",
"type": "typescript",
"tsconfig": "tsconfig.json",
"option": "watch",
"problemMatcher": [
"$tsc-watch"
],
"group": "build",
"isBackground": true,
},
{
"label": "Publish",
"type": "shell",
"command": "npm publish --access public",
"group": "build",
"isBackground": true,
},
]
}
Loading

0 comments on commit 05f833c

Please sign in to comment.