Skip to content

Commit

Permalink
Create default config fro project
Browse files Browse the repository at this point in the history
  • Loading branch information
volesh committed May 3, 2024
1 parent 074f5d2 commit 7f09eb2
Show file tree
Hide file tree
Showing 13 changed files with 4,218 additions and 873 deletions.
5 changes: 5 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
dist
coverage
.husky
.github
29 changes: 29 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"root": true,
"env": {
"node": true,
"jest/globals": true
},
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "prettier", "jest"],
"extends": ["plugin:@typescript-eslint/recommended", "plugin:@typescript-eslint/recommended-requiring-type-checking", "eslint:recommended"],
"overrides": [
{
"files": ["src/**/*.ts"],
"rules": {
"prettier/prettier": "error",
"@typescript-eslint/no-floating-promises": "off",
"@typescript-eslint/no-unsafe-member-access": "off"
}
},
{
"files": ["src/**/*.test.ts"],
"plugins": ["jest"],
"extends": ["plugin:jest/recommended"]
}
],
"parserOptions": {
"project": "./tsconfig.json",
"tsconfigRootDir": "."
}
}
Empty file removed .eslintrc.json
Empty file.
28 changes: 28 additions & 0 deletions .github/workflows/CICD.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: CI/CD

on: "push"

jobs:
Tests:
runs-on: ubuntu-latest
name: Run Jest tests
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '20.x'
- run: npm ci
- run: npm run test

# DESCRIBE DEPLOYMENT HERE

# deploy:
# needs: Tests
# runs-on: ubuntu-latest
# name: Deploy project

# SPECIFY BRANCHES FOR DEPLOY HERE
# if: github.ref == 'refs/heads/main'
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-node@v3
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
node_modules/
.env


.vscode
.DS_Store
.eslintcache
coverage
dist
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
10 changes: 9 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,13 @@
"plugins": ["@trivago/prettier-plugin-sort-imports"],
"importOrder": ["^[./]"],
"importOrderSeparation": true,
"importOrderSortSpecifiers": true
"importOrderSortSpecifiers": true,
"overrides": [
{
"files": ["*.eslintrc", "*.json", "*.md"],
"options": {
"trailingComma": "none"
}
}
]
}
4 changes: 4 additions & 0 deletions jest.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"preset": "ts-jest",
"testEnvironment": "node"
}
Loading

0 comments on commit 7f09eb2

Please sign in to comment.