Skip to content

Commit

Permalink
Merge pull request #1 from ola-9/update
Browse files Browse the repository at this point in the history
Update
  • Loading branch information
fey authored Nov 24, 2023
2 parents 4cf6e36 + 44600f4 commit ea2c857
Show file tree
Hide file tree
Showing 14 changed files with 13,885 additions and 239 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
dist
30 changes: 30 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
module.exports = {
plugins: [
'@typescript-eslint',
],

env: {
node: true,
},
extends: [
'airbnb-base',
],
parser: '@typescript-eslint/parser',
rules: {},
overrides: [
{
extends: [
'airbnb-typescript/base',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
],
parserOptions: {
parser: '@typescript-eslint/parser',
project: './tsconfig.json',
tsconfigRootDir: __dirname,
},
files: ['*.ts', '*tsx'],
rules: {},
},
],
};
42 changes: 42 additions & 0 deletions .github/workflows/typescript.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Name of workflow
name: Typescript CI

# Trigger the workflow on push or pull request
on:
pull_request:
branches:
- main
push:
branches:
- main

env:
CI: true

jobs:
build:

# The type of machine to run the job on
runs-on: ubuntu-latest

strategy:
# Node versions list
matrix:
node-version: [20.x]

steps:
# Check-out repository under GitHub workspace
# https://github.com/actions/checkout
- uses: actions/checkout@v4
# Step's name
- name: Use Node.js ${{ matrix.node-version }}
# Configures the node version used on GitHub-hosted runners
# https://github.com/actions/setup-node
uses: actions/setup-node@v3
# The Node.js version to configure
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: make install
- run: make lint
- run: make test
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
node_modules
dist
coverage
19 changes: 17 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,2 +1,17 @@
run:
npx ts-node index.ts
install:
npm ci

develop:
npm run start:dev

build:
npm run build

start:
npm run start

test:
npm run test

lint:
npm run lint
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# typescript-package

<!-- TODO: add CI, Maintainability and Test Coverage badges -->

## Setup

```bash
make install

```
## Start

```bash
make start
```

## Run tests

```bash
make test
```

[![Hexlet Ltd. logo](https://raw.githubusercontent.com/Hexlet/assets/master/images/hexlet_logo128.png)](https://hexlet.io/?utm_source=github&utm_medium=link&utm_campaign=nodejs-package)

This repository is created and maintained by the team and the community of Hexlet, an educational project. [Read more about Hexlet](https://hexlet.io/?utm_source=github&utm_medium=link&utm_campaign=nodejs-package).

See most active contributors on [hexlet-friends](https://friends.hexlet.io/).
Empty file removed index.ts
Empty file.
6 changes: 6 additions & 0 deletions nodemon.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"watch": ["src"],
"ext": ".ts,.js",
"ignore": [],
"exec": "npx ts-node ./src/index.ts"
}
Loading

0 comments on commit ea2c857

Please sign in to comment.