Skip to content

Commit 3127439

Browse files
committed
mtasa-typescript#42 In Progress
GitHub: - Fixed templates for issues - Add `eslint`, `prettier` sections into GitHub actions NPM Packages: - Removed `package-lock.json` (Expected, that lock will be created by user) - Add `eslint` packages, configs and script - Add `new-resource` script - Add `.prettierignore`; ignored auto-generated directories - TypeScript version froze (see mtasa-typescript/mtasa-lua-utils#33) - Misc `tsconfig.json` improvements
1 parent 0d5d816 commit 3127439

12 files changed

+106
-1643
lines changed

.eslintrc.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
env:
2+
es2021: true
3+
extends:
4+
- 'eslint:recommended'
5+
- 'plugin:@typescript-eslint/recommended'
6+
parser: '@typescript-eslint/parser'
7+
parserOptions:
8+
ecmaVersion: 12
9+
sourceType: module
10+
plugins:
11+
- '@typescript-eslint'
12+
rules: {}

.github/ISSUE_TEMPLATE/----bug-report.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: '⚠️ Bug report'
33
about: Create a report to help us improve
4-
title: '⚠️ InsertIssueName'
4+
title: '⚠️ Name of the issue'
55
labels: bug
66
assignees: ''
77
---

.github/ISSUE_TEMPLATE/---feature-request.md

+14-4
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,24 @@ labels: enhancement
66
assignees: ''
77
---
88

9-
**Is your feature request related to a problem? Please describe.**
9+
# Description
10+
11+
A clear description of the feature
12+
13+
## Is your feature request related to a problem? Please describe.
14+
1015
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
1116

12-
**Describe the solution you'd like**
17+
# Suggestion
18+
19+
## Describe the solution you'd like
20+
1321
A clear and concise description of what you want to happen.
1422

15-
**Describe alternatives you've considered**
23+
## Describe alternatives you've considered
24+
1625
A clear and concise description of any alternative solutions or features you've considered.
1726

18-
**Additional context**
27+
# Additional context
28+
1929
Add any other context or screenshots about the feature request here.

.github/dependabot.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ updates:
1515
prefix: fix
1616
prefix-development: chore
1717
include: scope
18-
# Fetch and update latest `github-actions` pkgs
18+
# Fetch and update latest `github-actions` packages
1919
- package-ecosystem: github-actions
2020
directory: '/'
2121
schedule:

.github/workflows/package.yml

+48-3
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- uses: actions/checkout@v2
16-
- name: Setup node 12
16+
- name: Setup node 14
1717
uses: actions/[email protected]
1818
with:
19-
node-version: 12.x
19+
node-version: 14.x
2020
- name: Cache Node files
2121
uses: actions/[email protected]
2222
env:
@@ -31,5 +31,50 @@ jobs:
3131
${{ runner.os }}-build-
3232
${{ runner.os }}-
3333
- run: npm ci
34-
- run: npm run prettier
3534
- run: npm run build
35+
prettier:
36+
runs-on: ubuntu-latest
37+
steps:
38+
- uses: actions/checkout@v2
39+
- name: Setup node 14
40+
uses: actions/[email protected]
41+
with:
42+
node-version: 14.x
43+
- name: Cache Node files
44+
uses: actions/[email protected]
45+
env:
46+
cache-name: cache-node-modules
47+
with:
48+
# npm cache files are stored in `~/.npm` on Linux/macOS
49+
path: |
50+
~/.npm
51+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
52+
restore-keys: |
53+
${{ runner.os }}-build-${{ env.cache-name }}-
54+
${{ runner.os }}-build-
55+
${{ runner.os }}-
56+
- run: npm ci
57+
- run: npm run prettier
58+
eslint:
59+
runs-on: ubuntu-latest
60+
steps:
61+
- uses: actions/checkout@v2
62+
- name: Setup node 14
63+
uses: actions/[email protected]
64+
with:
65+
node-version: 14.x
66+
- name: Cache Node files
67+
uses: actions/[email protected]
68+
env:
69+
cache-name: cache-node-modules
70+
with:
71+
# npm cache files are stored in `~/.npm` on Linux/macOS
72+
path: |
73+
~/.npm
74+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
75+
restore-keys: |
76+
${{ runner.os }}-build-${{ env.cache-name }}-
77+
${{ runner.os }}-build-
78+
${{ runner.os }}-
79+
- run: npm ci
80+
- run: npm run eslint

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
.vs
22
node_modules
3-
\[lua\]
3+
\[lua\]
4+
.idea

.prettierignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.vs
2+
.idea
3+
node_modules
4+
\[lua\]

.prettierrc.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
"singleQuote": true,
55
"trailingComma": "all",
66
"tabWidth": 4,
7-
"printWidth": 120,
7+
"printWidth": 80,
88
"semi": true
99
}

mtasa-meta.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,6 @@ scripts:
1717
- src: utils.ts
1818
type: shared
1919
cache: false
20-
# You can add more resources. Just type --- and continue
20+
#
21+
# You can add more resources. Use `npm run new-resource`
22+
#

0 commit comments

Comments
 (0)