Skip to content

Commit

Permalink
chore(initial): initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
temarusanov committed Aug 30, 2022
0 parents commit 1a63aae
Show file tree
Hide file tree
Showing 53 changed files with 10,429 additions and 0 deletions.
110 changes: 110 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module',
},
plugins: ['@typescript-eslint/eslint-plugin'],
extends: [
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'prettier'
],
root: true,
env: {
node: true,
jest: true,
},
rules: {
"array-callback-return": "error",
"brace-style": [ "error","1tbs", { "allowSingleLine": false }],
"camelcase": "off",
'curly': [ 'error', 'all' ],
"no-return-await": "off",
"no-invalid-this": "off",
'no-empty-pattern': "error",
"no-magic-numbers": "off",
"no-unused-vars": "off",
"semi": "off",
"space-before-blocks": "error",
'@typescript-eslint/array-type': 'error',
'@typescript-eslint/explicit-function-return-type': 'error',
"@typescript-eslint/explicit-member-accessibility": ["error", { accessibility: 'no-public' }],
'@typescript-eslint/interface-name-prefix': 'off',
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "default",
"format": ["camelCase"]
},
{
"selector": "variable",
"types": ["function"],
"format": ["camelCase", "PascalCase"]
},
{
"selector": "variable",
"format": ["camelCase", "UPPER_CASE", "PascalCase"],
"filter": {
"regex": "^(.*-.*)$",
"match": false
},
"leadingUnderscore": "allow"
},
{
"selector": "enumMember",
"format": ["camelCase", "PascalCase", "UPPER_CASE" ],
},
{
"selector": "parameter",
"format": ["camelCase"],
"leadingUnderscore": "allow"
},
{
"selector": "memberLike",
"format": ["camelCase"],
"leadingUnderscore": "allow"
},
{
"selector": "memberLike",
"format": null,
"filter": {
"regex": "[- ]",
"match": true
},
},
{
"selector": "memberLike",
"modifiers": ["private"],
"format": ["camelCase"],
"leadingUnderscore": "require"
},
{
"selector": "typeLike",
"format": ["PascalCase"]
}
],
'@typescript-eslint/no-explicit-any': ['error', { ignoreRestArgs: true }],
"@typescript-eslint/no-invalid-this": "error",
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/no-for-in-array": "error",
"@typescript-eslint/no-misused-promises": "warn",
"@typescript-eslint/no-magic-numbers": [
"error",
{
"ignoreEnums": true,
"ignoreArrayIndexes": true,
"ignoreNumericLiteralTypes": true,
"ignoreReadonlyClassProperties": true,
"ignore": [ 0, 1]
}
],
"@typescript-eslint/no-unused-vars": ["warn", { "argsIgnorePattern": "^(_|type)" }],
"@typescript-eslint/return-await": "off",
"@typescript-eslint/semi": ["error", "never"],
},
"ignorePatterns": [
".eslintrc.js",
"index.*"
],
};
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: Bug report
about: Create a report to help us improve
title: bug
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**Configuration**
1. NodeJS Version:
2. NPM Version:

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/pull_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
17 changes: 17 additions & 0 deletions .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Node.js PL Build

on:
pull_request:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14
- uses: borales/[email protected]
with:
cmd: install --frozen-lockfile
32 changes: 32 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: NPM Release

on:
workflow_dispatch:
branches: ["main"]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14
- uses: borales/[email protected]
with:
cmd: install --frozen-lockfile
release:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14
- uses: borales/[email protected]
with:
cmd: install --frozen-lockfile
- run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
36 changes: 36 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# compiled output
/dist
/node_modules
*.tgz

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# OS
.DS_Store

# Tests
/coverage
/.nyc_output

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v14.17.1
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# package and lock files
/package*

# changelog
CHANGELOG.md
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"singleQuote": true,
"trailingComma": "all",
"tabWidth": 4,
"semi": false
}
15 changes: 15 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"branches": ["main"],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
["@semantic-release/npm", {
"tarballDir": "release"
}],
["@semantic-release/github", {
"assets": "release/*.tgz"
}],
"@semantic-release/git"
]
}
Empty file added CHANGELOG.md
Empty file.
21 changes: 21 additions & 0 deletions LICENCE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 iLink

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
![Logo](https://i.postimg.cc/Qxt01Pq2/167322528-4602761833073521-2811105515199118326-n-1.png)

# Common lib

A library that collects all the code that we use very often in NestJS. This includes: scalars, interfaces, types, modules, services, decorators, helpers, guards, etc.

## Documentation

[Documentation](/docs/DOCUMENTATION.md)

## License

[MIT](https://choosealicense.com/licenses/mit/)
Loading

0 comments on commit 1a63aae

Please sign in to comment.