Skip to content

Commit 72b0cde

Browse files
authored
Merge pull request #1152 from arturcic/refactoring
Refactoring
2 parents e52685b + 081ab2c commit 72b0cde

File tree

65 files changed

+9116
-7828
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+9116
-7828
lines changed

.azure/ci.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
trigger:
22
- main
3+
34
pr:
45
- main
56

@@ -9,6 +10,14 @@ variables:
910
value: 'true'
1011
- name: DOTNET_CLI_TELEMETRY_OPTOUT
1112
value: 'true'
13+
- name: INPUT_VERSIONSPEC
14+
value: '5.x'
15+
- name: INPUT_INCLUDEPRERELEASE
16+
value: 'false'
17+
- name: INPUT_IGNOREFAILEDSOURCES
18+
value: 'true'
19+
- name: INPUT_PREFERLATESTVERSION
20+
value: 'false'
1221

1322
jobs:
1423
- job: build
@@ -37,10 +46,10 @@ jobs:
3746
displayName: 'Build code'
3847
- pwsh: |
3948
# set the inputs for the 'gitversion/setup' action
40-
$env:INPUT_VERSIONSPEC = '5.x'
41-
$env:INPUT_INCLUDEPRERELEASE = 'false'
42-
$env:INPUT_IGNOREFAILEDSOURCES = 'true'
43-
$env:INPUT_PREFERLATESTVERSION = 'false'
49+
$env:INPUT_VERSIONSPEC = "$(INPUT_VERSIONSPEC)"
50+
$env:INPUT_INCLUDEPRERELEASE = "$(INPUT_INCLUDEPRERELEASE)"
51+
$env:INPUT_IGNOREFAILEDSOURCES = "$(INPUT_IGNOREFAILEDSOURCES)"
52+
$env:INPUT_PREFERLATESTVERSION = "$(INPUT_PREFERLATESTVERSION)"
4453
4554
# run the 'gitversion/setup' action
4655
node ./gitversion/setup/bundle.js

.eslintrc.json

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
{
2+
"root": true,
3+
"plugins": [
4+
"@typescript-eslint",
5+
"vitest",
6+
"prettier"
7+
],
8+
"extends": [
9+
"plugin:github/recommended",
10+
"plugin:vitest/recommended",
11+
"plugin:prettier/recommended"
12+
],
13+
"parser": "@typescript-eslint/parser",
14+
"parserOptions": {
15+
"ecmaVersion": "latest",
16+
"sourceType": "module",
17+
"project": "./tsconfig.eslint.json"
18+
},
19+
"rules": {
20+
"prettier/prettier": [
21+
"error",
22+
{
23+
"endOfLine": "auto"
24+
}
25+
],
26+
"eslint-comments/no-use": "off",
27+
"no-constant-condition": [
28+
"error",
29+
{
30+
"checkLoops": false
31+
}
32+
],
33+
"github/no-then": "off",
34+
"import/no-namespace": "off",
35+
"no-shadow": "off",
36+
"no-console": "off",
37+
"no-unused-vars": [
38+
"error",
39+
{
40+
"argsIgnorePattern": "^_",
41+
"varsIgnorePattern": "^_"
42+
}
43+
],
44+
"i18n-text/no-en": "off",
45+
"filenames/match-regex": "off",
46+
"import/no-commonjs": "off",
47+
"import/named": "off",
48+
"no-sequences": "off",
49+
"import/no-unresolved": "off",
50+
"no-undef": "off",
51+
"no-only-tests/no-only-tests": "off",
52+
"@typescript-eslint/no-unused-vars": [
53+
"error",
54+
{
55+
"argsIgnorePattern": "^_",
56+
"varsIgnorePattern": "^_"
57+
}
58+
],
59+
"@typescript-eslint/explicit-member-accessibility": [
60+
"error",
61+
{
62+
"accessibility": "no-public"
63+
}
64+
],
65+
"@typescript-eslint/no-require-imports": "error",
66+
"@typescript-eslint/array-type": "error",
67+
"@typescript-eslint/await-thenable": "error",
68+
"@typescript-eslint/ban-ts-comment": "error",
69+
"camelcase": "off",
70+
"@typescript-eslint/camelcase": "off",
71+
"@typescript-eslint/consistent-type-assertions": "off",
72+
"@typescript-eslint/explicit-function-return-type": [
73+
"error",
74+
{
75+
"allowExpressions": true
76+
}
77+
],
78+
"@typescript-eslint/func-call-spacing": [
79+
"error",
80+
"never"
81+
],
82+
"@typescript-eslint/naming-convention": [
83+
"error",
84+
{
85+
"format": null,
86+
"filter": {
87+
// you can expand this regex as you find more cases that require quoting that you want to allow
88+
"regex": "^[A-Z][A-Za-z]*$",
89+
"match": true
90+
},
91+
"selector": "memberLike"
92+
}
93+
],
94+
"@typescript-eslint/no-array-constructor": "error",
95+
"@typescript-eslint/no-empty-interface": "error",
96+
"@typescript-eslint/no-explicit-any": "error",
97+
"@typescript-eslint/no-extraneous-class": "error",
98+
"@typescript-eslint/no-for-in-array": "error",
99+
"@typescript-eslint/no-inferrable-types": "error",
100+
"@typescript-eslint/no-misused-new": "error",
101+
"@typescript-eslint/no-namespace": "error",
102+
"@typescript-eslint/no-non-null-assertion": "warn",
103+
"@typescript-eslint/no-unnecessary-qualifier": "error",
104+
"@typescript-eslint/no-unnecessary-type-assertion": "error",
105+
"@typescript-eslint/no-useless-constructor": "error",
106+
"@typescript-eslint/no-var-requires": "error",
107+
"@typescript-eslint/prefer-for-of": "warn",
108+
"@typescript-eslint/prefer-function-type": "warn",
109+
"@typescript-eslint/prefer-includes": "error",
110+
"@typescript-eslint/prefer-string-starts-ends-with": "error",
111+
"@typescript-eslint/promise-function-async": "error",
112+
"@typescript-eslint/require-array-sort-compare": "error",
113+
"semi": "off",
114+
"@typescript-eslint/semi": [
115+
"error",
116+
"never"
117+
],
118+
"@typescript-eslint/type-annotation-spacing": "error",
119+
"@typescript-eslint/unbound-method": "error"
120+
},
121+
"ignorePatterns": [
122+
"packages/glob/__tests__/_temp/**/",
123+
"gitversion/**/",
124+
"gitreleasemanager/**/",
125+
"dist/"
126+
],
127+
"env": {
128+
"node": true,
129+
"es6": true
130+
}
131+
}

.github/mergify.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ pull_request_rules:
88
- name: Automatic merge on dependabot PR after success CI
99
conditions:
1010
- author~=^dependabot(|-preview)\[bot\]$
11-
- '#commits-behind=0' # Only merge up to date pull requests
11+
- '#commits-behind=0' # Only merge up-to-date pull requests
1212
actions:
1313
merge:
1414
- name: Thank contributor

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ jobs:
7979
- name: Rebuild dist and push
8080
run: |
8181
git add --verbose .
82-
git config user.name 'Artur'
83-
git config user.email 'arturcic@gmail.com'
82+
git config user.name 'Artur Stolear'
83+
git config user.email 'artur.stolear@gmail.com'
8484
git commit -m 'dist update' --allow-empty
8585
git push --force
8686
if: steps.status.outputs.has_changes == '1'

.github/workflows/examples-version.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ jobs:
2626
dir -r .azure\**\*.yml | % { update-md-files $_ -OldVersion $oldTag -NewVersion $newTag }
2727
2828
git add --verbose .
29-
git config user.name 'Artur'
30-
git config user.email 'arturcic@gmail.com'
29+
git config user.name 'Artur Stolear'
30+
git config user.email 'artur.stolear@gmail.com'
3131
git commit -m "update examples version to $newTag" --allow-empty
3232
git push --force
3333
name: Update examples version

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ dist-ssr
2828
.taskkey
2929
*.vsix
3030

31-
/dist/mock/
31+
/dist/local/
3232

3333
.debug/

.prettierignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
node_modules/
1+
node_modules/

.vscode/launch.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
{
88
"type": "node",
99
"request": "launch",
10-
"preLaunchTask": "Build-Mock",
11-
"name": "Debug Mock Setup GitVersion",
12-
"program": "${workspaceFolder}/dist/mock/gitversion/setup/bundle.js",
10+
"preLaunchTask": "Build-Local",
11+
"name": "Debug Local Setup GitVersion",
12+
"program": "${workspaceFolder}/dist/local/gitversion/setup/bundle.js",
1313
"outFiles": [ "${workspaceFolder}/**/*.js" ]
1414
},
1515
{
@@ -31,9 +31,9 @@
3131
{
3232
"type": "node",
3333
"request": "launch",
34-
"preLaunchTask": "Build-Mock",
35-
"name": "Debug Mock Execute GitVersion",
36-
"program": "${workspaceFolder}/dist/mock/gitversion/execute/bundle.js",
34+
"preLaunchTask": "Build-Local",
35+
"name": "Debug Local Execute GitVersion",
36+
"program": "${workspaceFolder}/dist/local/gitversion/execute/bundle.js",
3737
"outFiles": [ "${workspaceFolder}/**/*.js" ]
3838
},
3939
{
@@ -53,4 +53,4 @@
5353
"outFiles": [ "${workspaceFolder}/**/*.js" ]
5454
},
5555
]
56-
}
56+
}

.vscode/tasks.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
"version": "2.0.0",
55
"tasks": [
66
{
7-
"label": "Build-Mock",
7+
"label": "Build-Local",
88
"type": "npm",
9-
"script": "build:mock"
9+
"script": "build:local"
1010
},
1111
{
1212
"label": "Build-Azure",
@@ -19,4 +19,4 @@
1919
"script": "build:github"
2020
},
2121
]
22-
}
22+
}

0 commit comments

Comments
 (0)