Skip to content

Commit f46cc55

Browse files
committed
Code refactor
1 parent 8e97df0 commit f46cc55

File tree

9 files changed

+1147
-1192
lines changed

9 files changed

+1147
-1192
lines changed

.eslintrc.json

Lines changed: 58 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,60 @@
11
{
2-
"plugins": ["@typescript-eslint"],
3-
"extends": ["plugin:github/recommended"],
4-
"parser": "@typescript-eslint/parser",
5-
"parserOptions": {
6-
"ecmaVersion": 9,
7-
"sourceType": "module",
8-
"project": "./tsconfig.json"
9-
},
10-
"rules": {
11-
"i18n-text/no-en": "off",
12-
"eslint-comments/no-use": "off",
13-
"import/no-namespace": "off",
14-
"no-unused-vars": "off",
15-
"@typescript-eslint/no-unused-vars": "error",
16-
"@typescript-eslint/explicit-member-accessibility": ["error", {"accessibility": "no-public"}],
17-
"@typescript-eslint/no-require-imports": "error",
18-
"@typescript-eslint/array-type": "error",
19-
"@typescript-eslint/await-thenable": "error",
20-
"@typescript-eslint/ban-ts-comment": "error",
21-
"camelcase": "off",
22-
"@typescript-eslint/consistent-type-assertions": "error",
23-
"@typescript-eslint/explicit-function-return-type": ["error", {"allowExpressions": true}],
24-
"@typescript-eslint/func-call-spacing": ["error", "never"],
25-
"@typescript-eslint/no-array-constructor": "error",
26-
"@typescript-eslint/no-empty-interface": "error",
27-
"@typescript-eslint/no-explicit-any": "error",
28-
"@typescript-eslint/no-extraneous-class": "error",
29-
"@typescript-eslint/no-for-in-array": "error",
30-
"@typescript-eslint/no-inferrable-types": "error",
31-
"@typescript-eslint/no-misused-new": "error",
32-
"@typescript-eslint/no-namespace": "error",
33-
"@typescript-eslint/no-non-null-assertion": "warn",
34-
"@typescript-eslint/no-unnecessary-qualifier": "error",
35-
"@typescript-eslint/no-unnecessary-type-assertion": "error",
36-
"@typescript-eslint/no-useless-constructor": "error",
37-
"@typescript-eslint/no-var-requires": "error",
38-
"@typescript-eslint/prefer-for-of": "warn",
39-
"@typescript-eslint/prefer-function-type": "warn",
40-
"@typescript-eslint/prefer-includes": "error",
41-
"@typescript-eslint/prefer-string-starts-ends-with": "error",
42-
"@typescript-eslint/promise-function-async": "error",
43-
"@typescript-eslint/require-array-sort-compare": "error",
44-
"@typescript-eslint/restrict-plus-operands": "error",
45-
"semi": "off",
46-
"@typescript-eslint/semi": ["error", "never"],
47-
"@typescript-eslint/type-annotation-spacing": "error",
48-
"@typescript-eslint/unbound-method": "error"
49-
},
50-
"env": {
51-
"node": true,
52-
"es6": true
53-
}
2+
"plugins": ["@typescript-eslint"],
3+
"extends": ["plugin:github/recommended"],
4+
"parser": "@typescript-eslint/parser",
5+
"parserOptions": {
6+
"ecmaVersion": 9,
7+
"sourceType": "module",
8+
"project": "./tsconfig.json"
9+
},
10+
"rules": {
11+
"i18n-text/no-en": "off",
12+
"eslint-comments/no-use": "off",
13+
"import/no-namespace": "off",
14+
"no-unused-vars": "off",
15+
"@typescript-eslint/no-unused-vars": "error",
16+
"@typescript-eslint/explicit-member-accessibility": [
17+
"error",
18+
{"accessibility": "no-public"}
19+
],
20+
"@typescript-eslint/no-require-imports": "error",
21+
"@typescript-eslint/array-type": "error",
22+
"@typescript-eslint/await-thenable": "error",
23+
"@typescript-eslint/ban-ts-comment": "error",
24+
"camelcase": "off",
25+
"@typescript-eslint/consistent-type-assertions": "error",
26+
"@typescript-eslint/explicit-function-return-type": [
27+
"error",
28+
{"allowExpressions": true}
29+
],
30+
"@typescript-eslint/func-call-spacing": ["error", "never"],
31+
"@typescript-eslint/no-array-constructor": "error",
32+
"@typescript-eslint/no-empty-interface": "error",
33+
"@typescript-eslint/no-explicit-any": "error",
34+
"@typescript-eslint/no-extraneous-class": "error",
35+
"@typescript-eslint/no-for-in-array": "error",
36+
"@typescript-eslint/no-inferrable-types": "error",
37+
"@typescript-eslint/no-misused-new": "error",
38+
"@typescript-eslint/no-namespace": "error",
39+
"@typescript-eslint/no-non-null-assertion": "warn",
40+
"@typescript-eslint/no-unnecessary-qualifier": "error",
41+
"@typescript-eslint/no-unnecessary-type-assertion": "error",
42+
"@typescript-eslint/no-useless-constructor": "error",
43+
"@typescript-eslint/no-var-requires": "error",
44+
"@typescript-eslint/prefer-for-of": "warn",
45+
"@typescript-eslint/prefer-function-type": "warn",
46+
"@typescript-eslint/prefer-includes": "error",
47+
"@typescript-eslint/prefer-string-starts-ends-with": "error",
48+
"@typescript-eslint/promise-function-async": "error",
49+
"@typescript-eslint/require-array-sort-compare": "error",
50+
"@typescript-eslint/restrict-plus-operands": "error",
51+
"semi": "off",
52+
"@typescript-eslint/semi": ["error", "never"],
53+
"@typescript-eslint/type-annotation-spacing": "error",
54+
"@typescript-eslint/unbound-method": "error"
55+
},
56+
"env": {
57+
"node": true,
58+
"es6": true
5459
}
60+
}

.github/dependabot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ updates:
44
directory: /
55
schedule:
66
interval: monthly
7-
time: "04:00"
7+
time: '04:00'
88

99
- package-ecosystem: npm
1010
directory: /
1111
schedule:
1212
interval: monthly
13-
time: "04:00"
13+
time: '04:00'
1414
open-pull-requests-limit: 10

.github/workflows/check-dist.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,3 @@ jobs:
5050
with:
5151
name: dist
5252
path: dist/
53-

.github/workflows/test.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,3 @@ jobs:
8585
if: ${{ steps.skip_check.outputs.should_skip == 'false' }}
8686
run: |
8787
echo "Do stuff..." && sleep 30
88-

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ You can use `skip-duplicate-actions` to either skip individual steps or entire j
230230
To minimize changes to existing jobs, it is often easier to skip entire jobs.
231231

232232
> **Note**
233+
>
233234
> - You may need to use [`fromJSON`](https://docs.github.com/en/actions/learn-github-actions/expressions#fromjson) to access properties of object outputs. For example, for `skipped_by.runId`, you can use the expression: `${{ fromJSON(steps.skip_check.outputs.skipped_by).runId }}`.
234235
> - For GitHub repositories where [default permissions](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository) for `GITHUB_TOKEN` has been set to "permissive (read-only)", the following lines must be included in the workflow (see [permissions syntax](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions)):
235236
> ```yaml

0 commit comments

Comments
 (0)