Skip to content

Commit d99aea6

Browse files
committed
feat: create module
1 parent 40b8483 commit d99aea6

35 files changed

+17826
-0
lines changed

.c8rc.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"check-coverage": true,
3+
"all": true,
4+
"cache": false,
5+
"exclude": ["src/index.ts", "src/cli.ts", "**/*.d.ts"],
6+
"extension": [".ts"],
7+
"include": ["src/**/*"],
8+
"report-dir": "coverage",
9+
"lines": 85,
10+
"functions": 90
11+
}

.editorconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 4
6+
7+
[{*.ts,*.js}]
8+
insert_final_newline = true
9+
10+
[{package.json,package-lock.json}]
11+
indent_size = 2
12+
13+
[*.yml]
14+
indent_size = 2

.eslintrc.json

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
{
2+
"root": true,
3+
"env": {
4+
"node": true,
5+
"browser": false,
6+
"es6": true
7+
},
8+
"ignorePatterns": ["dist/"],
9+
"extends": [
10+
"eslint:recommended"
11+
],
12+
"globals": {
13+
"Atomics": "readonly",
14+
"SharedArrayBuffer": "readonly"
15+
},
16+
"parserOptions": {
17+
"ecmaFeatures": {
18+
"jsx": true
19+
},
20+
"ecmaVersion": 2021,
21+
"sourceType": "module"
22+
},
23+
"overrides": [{
24+
"files": ["**.ts"],
25+
"extends": [
26+
"eslint:recommended",
27+
"plugin:@typescript-eslint/recommended"
28+
],
29+
"parser": "@typescript-eslint/parser",
30+
"plugins": [
31+
"@typescript-eslint",
32+
"import",
33+
"node"
34+
],
35+
"rules": {
36+
"@typescript-eslint/explicit-module-boundary-types": ["off"],
37+
"@typescript-eslint/ban-ts-comment": ["off"],
38+
"@typescript-eslint/no-explicit-any": ["off"],
39+
"semi": ["off"],
40+
"@typescript-eslint/semi": ["warn", "always"],
41+
"@typescript-eslint/no-inferrable-types": ["off"]
42+
}
43+
}],
44+
"plugins": [
45+
"@typescript-eslint",
46+
"import",
47+
"node"
48+
],
49+
"settings": {
50+
"import/parsers": {
51+
"@typescript-eslint/parser": [".ts"]
52+
}
53+
},
54+
"rules": {
55+
"indent": ["warn", 4, {
56+
"SwitchCase": 1,
57+
"FunctionDeclaration": {
58+
"parameters": "first"
59+
}
60+
}],
61+
"eqeqeq": ["off"],
62+
"no-undef": "off",
63+
"quotes": ["warn", "double", { "avoidEscape": true }],
64+
"no-unused-vars": ["warn", {
65+
"args": "none",
66+
"ignoreRestSiblings": true,
67+
"varsIgnorePattern": "^set"
68+
}],
69+
"no-prototype-builtins": ["off"],
70+
"object-curly-spacing": ["warn", "never"],
71+
"semi": ["warn", "always"],
72+
"no-undefined": ["off"],
73+
"array-bracket-newline": ["error", "consistent"],
74+
"brace-style": ["error", "1tbs", {
75+
"allowSingleLine": false
76+
}],
77+
"comma-spacing": ["error", {
78+
"before": false,
79+
"after": true
80+
}],
81+
"comma-style": ["error", "last"],
82+
"comma-dangle": ["error", "never"],
83+
"no-var": ["error"],
84+
"import/order": ["error", {
85+
"groups": ["builtin", "external","internal", "parent", "sibling", "index", "type", "object", "unknown"],
86+
"warnOnUnassignedImports": true
87+
}],
88+
"node/file-extension-in-import": ["error", "always", {
89+
"tryExtensions": [".js", ".json"]
90+
}],
91+
"newline-per-chained-call": ["error", {
92+
"ignoreChainWithDepth": 2
93+
}],
94+
"no-confusing-arrow": ["error"],
95+
"no-const-assign": ["error"],
96+
"no-duplicate-imports": ["error", {
97+
"includeExports": true
98+
}],
99+
"camelcase": ["warn"],
100+
"jsx-quotes": ["warn"],
101+
"yoda": ["error", "never", {
102+
"exceptRange": true
103+
}],
104+
"no-eval": ["error"],
105+
"array-callback-return": ["error"],
106+
"valid-jsdoc": ["error", {
107+
"requireParamType": true,
108+
"requireReturnType": true,
109+
"requireReturn": false,
110+
"requireParamDescription": false,
111+
"requireReturnDescription": false
112+
}],
113+
"no-empty": ["error", {
114+
"allowEmptyCatch": true
115+
}],
116+
"keyword-spacing": ["warn"],
117+
"space-infix-ops": ["warn"],
118+
"spaced-comment": ["warn", "always"],
119+
"eol-last": ["warn", "always"],
120+
"max-len": ["warn", {
121+
"code": 140,
122+
"tabWidth": 4,
123+
"ignoreStrings": true
124+
}]
125+
}
126+
}

.gitattributes

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
*.ico filter=lfs diff=lfs merge=lfs -text
2+
*.png filter=lfs diff=lfs merge=lfs -text
3+
*.png filter=lfs diff=lfs merge=lfs -text
4+
*.jpg filter=lfs diff=lfs merge=lfs -text
5+
*.webp filter=lfs diff=lfs merge=lfs -text
6+
*.woff filter=lfs diff=lfs merge=lfs -text
7+
*.woff2 filter=lfs diff=lfs merge=lfs -text
8+
*.afdesign filter=lfs diff=lfs merge=lfs -text
9+
*.ai filter=lfs diff=lfs merge=lfs -text

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
### Description of change
2+
3+
<!--
4+
Please be clear and concise what the change is intended to do,
5+
why this change is needed, and how you've verified that it
6+
corrects what you intended to correct.
7+
8+
In some cases, it may be helpful to include the current behavior
9+
and the new behavior.
10+
11+
If the change is related to an open issue, you can link it here.
12+
If you include `Fixes #0000` (replacing `0000` with the issue number)
13+
when this is merged, it will automatically mark the issue as fixed and
14+
close it.
15+
-->
16+
17+
18+
### Pull-Request Checklist
19+
20+
<!--
21+
Please make sure to review and check all the following items:
22+
23+
If an item is not applicable, you can add "N/A" to the end.
24+
-->
25+
26+
- [ ] Code is up-to-date with the `master` branch
27+
- [ ] `npm run format` to apply prettier formatting
28+
- [ ] `npm run test` passes with this change
29+
- [ ] This pull request links relevant issues as `Fixes #0000`
30+
- [ ] There are new or updated unit tests validating the change
31+
- [ ] Documentation has been updated to reflect this change
32+
- [ ] The new commits follow conventions explained in [CONTRIBUTING.md](https://github.com/giladgd/typeorm-codebase-sync/blob/master/CONTRIBUTING.md)

.github/workflows/release.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Release
2+
on:
3+
push:
4+
branches:
5+
- master
6+
jobs:
7+
test:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v3
11+
- uses: actions/setup-node@v3
12+
with:
13+
node-version: "17"
14+
- name: Install modules
15+
run: npm ci
16+
- name: Build
17+
run: npm run build
18+
- name: Release
19+
env:
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
22+
run: npx semantic-release

.github/workflows/test.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Test
2+
on: [push]
3+
jobs:
4+
test:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v3
8+
- uses: actions/setup-node@v3
9+
with:
10+
node-version: "17"
11+
- name: Install modules
12+
run: npm ci
13+
- name: ESLint
14+
run: npx eslint --ext .js --ext .ts .
15+
- name: TypeScript validity
16+
run: npm run test:typescript
17+
- name: Coverage
18+
run: npx c8 mocha

.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/.idea
2+
/.vscode
3+
/.history
4+
5+
node_modules
6+
npm-debug.log*
7+
.DS_Store
8+
9+
/coverage
10+
/.nyc_output
11+
12+
/dist
13+
/tsconfig.tsbuildinfo

.gitlab-ci.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/node:17.7
2+
3+
stages:
4+
- test
5+
- release
6+
7+
8+
test:
9+
stage: test
10+
script:
11+
- npm ci
12+
13+
- mkdir -p ci
14+
15+
- npx eslint --ext .js --ext .ts .
16+
- npm run test:typescript
17+
- npx c8 --reporter cobertura mocha
18+
needs: []
19+
artifacts:
20+
reports:
21+
cobertura: coverage/cobertura-coverage.xml
22+
23+
release:
24+
stage: release
25+
script:
26+
- npm ci
27+
28+
- npm run build
29+
- npx semantic-release
30+
needs:
31+
- test
32+
only:
33+
refs:
34+
- master

.mochaSetup.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import chai from "chai";
2+
import chaiAsPromised from "chai-as-promised";
3+
4+
chai.should();
5+
chai.use(chaiAsPromised);

0 commit comments

Comments
 (0)