Skip to content

Commit 3655e4d

Browse files
authored
Merge pull request #167 from p4535992/master
Little bug fix with debug options and add a logger helpers
2 parents f449f63 + 2b557c2 commit 3655e4d

34 files changed

+1172
-644
lines changed

.editorconfig

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
root = true
2-
3-
[*]
4-
indent_style = space
5-
indent_size = 4
6-
end_of_line = lf
7-
charset = utf-8
8-
trim_trailing_whitespace = true
9-
insert_final_newline = true
10-
[*.yml]
11-
indent_size = 2
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 4
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
[*.yml]
11+
indent_size = 2

.eslintignore

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
gulpfile.js
2+
.eslintrc.js
3+
.prettierrc.js
4+
jsconfig.json
5+
/.pnp.js
6+
/.yarn/
7+
8+
.github/
9+
dist/
10+
docs/
11+
external/
12+
src/languages/
13+
src/assets/
14+
src/lang/
15+
src/scripts/
16+
src/styles/
17+
src/templates/
18+
src/**/*.svelte

.eslintrc.json

Lines changed: 140 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,44 @@
11
{
22
"env": {
33
"browser": true,
4-
"es2022": true,
4+
"es6": true,
55
"node": true,
66
"jquery": true
77
},
8+
"extends": [
9+
"eslint:recommended",
10+
"plugin:@typescript-eslint/recommended",
11+
"prettier"
12+
],
13+
"parser": "@babel/eslint-parser",
814
"parserOptions": {
915
"requireConfigFile": false,
16+
"ecmaVersion": 2018,
1017
"sourceType": "module"
1118
},
12-
"plugins": [
13-
"jsdoc"
19+
"ignorePatterns": [
20+
"dist/"
1421
],
1522
"rules": {
23+
"prettier/prettier": "error",
24+
"no-console": "off",
25+
"no-plusplus": [
26+
"error",
27+
{
28+
"allowForLoopAfterthoughts": true
29+
}
30+
],
1631
"array-bracket-spacing": ["warn", "never"],
1732
"array-callback-return": "warn",
1833
"arrow-spacing": "warn",
19-
"comma-dangle": ["warn", "never"],
34+
"comma-dangle": ["warn", "always-multiline"],
2035
"comma-style": "warn",
2136
"computed-property-spacing": "warn",
2237
"constructor-super": "error",
2338
"default-param-last": "warn",
2439
"dot-location": ["warn", "property"],
2540
"eol-last": ["error", "always"],
26-
"eqeqeq": ["warn", "smart"],
41+
"eqeqeq": "error",
2742
"func-call-spacing": "warn",
2843
"func-names": ["warn", "never"],
2944
"getter-return": "warn",
@@ -86,7 +101,12 @@
86101
"no-unreachable-loop": "warn",
87102
"no-unsafe-negation": ["warn", {"enforceForOrderingRelations": true}],
88103
"no-unsafe-optional-chaining": ["warn", {"disallowArithmeticOperators": true}],
89-
"no-unused-expressions": "warn",
104+
"no-unused-expressions": [
105+
"error",
106+
{
107+
"allowShortCircuit": true
108+
}
109+
],
90110
"no-useless-backreference": "warn",
91111
"no-useless-call": "warn",
92112
"no-useless-catch": "warn",
@@ -121,7 +141,7 @@
121141
}],
122142
"comma-spacing": "warn",
123143
"dot-notation": "warn",
124-
"indent": ["warn", 2, {"SwitchCase": 1}],
144+
"indent": ["warn", 4, {"SwitchCase": 1}],
125145
"key-spacing": "warn",
126146
"keyword-spacing": ["warn", {"overrides": {"catch": {"before": true, "after": false}}}],
127147
"max-len": ["warn", {
@@ -153,7 +173,43 @@
153173
"named": "never",
154174
"asyncArrow": "always"
155175
}],
156-
"spaced-comment": "warn",
176+
"spaced-comment": [
177+
"error",
178+
"always",
179+
{
180+
"markers": [
181+
"/"
182+
]
183+
}
184+
],
185+
"@typescript-eslint/ban-ts-comment": "error",
186+
"@typescript-eslint/ban-types": "off",
187+
"@typescript-eslint/explicit-module-boundary-types": "off",
188+
"@typescript-eslint/lines-between-class-members": [
189+
"error",
190+
"always",
191+
{
192+
"exceptAfterSingleLine": true
193+
}
194+
],
195+
"@typescript-eslint/prefer-namespace-keyword": "off",
196+
"@typescript-eslint/no-empty-function": "off",
197+
"@typescript-eslint/no-explicit-any": "error",
198+
"@typescript-eslint/no-namespace": [
199+
"error",
200+
{
201+
"allowDeclarations": true
202+
}
203+
],
204+
"@typescript-eslint/no-non-null-assertion": "off",
205+
"@typescript-eslint/no-unsafe-declaration-merging": "off",
206+
"@typescript-eslint/no-unused-vars": "off",
207+
"@typescript-eslint/array-type": [
208+
"error",
209+
{
210+
"default": "array"
211+
}
212+
],
157213
"jsdoc/check-access": "warn",
158214
"jsdoc/check-alignment": "warn",
159215
"jsdoc/check-examples": "off",
@@ -196,6 +252,11 @@
196252
"jsdoc/require-yields-check": "warn",
197253
"jsdoc/valid-types": "off"
198254
},
255+
"plugins": [
256+
"jsdoc",
257+
"prettier",
258+
"@typescript-eslint"
259+
],
199260
"settings": {
200261
"jsdoc": {
201262
"preferredTypes": {
@@ -208,5 +269,76 @@
208269
"augments": "extends"
209270
}
210271
}
272+
},
273+
"overrides": [
274+
{
275+
"files": "tests/**/*",
276+
"rules": {
277+
"global-require": "off"
278+
}
279+
}
280+
],
281+
"globals": {
282+
"globalThis": true,
283+
"canvas": true,
284+
"Hooks": true,
285+
"game": true,
286+
"Handlebars": true,
287+
"Babele": true,
288+
"foundry": true,
289+
"CONFIG": true,
290+
"libWrapper": true,
291+
"socketlib": true,
292+
"DatabaseBackend": true,
293+
"Actor": true,
294+
"Adventure": true,
295+
"Cards": true,
296+
"ChatMessage": true,
297+
"Combat": true,
298+
"Dice": true,
299+
"FogExploration": true,
300+
"Folder": true,
301+
"Item": true,
302+
"JournalEntry": true,
303+
"Macro": true,
304+
"Playlist": true,
305+
"RollTable": true,
306+
"Scene": true,
307+
"Setting": true,
308+
"User": true,
309+
"Canvas": true,
310+
"canvasTextStyle": true,
311+
"weatherEffects": true,
312+
"controlIcons": true,
313+
"fontDefinitions": true,
314+
"_fontFamilies": true,
315+
"defaultFontFamily": true,
316+
"statusEffects": true,
317+
"specialStatusEffects": true,
318+
"sounds": true,
319+
"supportedLanguages": true,
320+
"i18n": true,
321+
"time": true,
322+
"ActiveEffect": true,
323+
"ActorDelta": true,
324+
"Card": true,
325+
"TableResult": true,
326+
"JournalEntryPage": true,
327+
"PlaylistSound": true,
328+
"AmbientLight": true,
329+
"AmbientSound": true,
330+
"Combatant": true,
331+
"Drawing": true,
332+
"MeasuredTemplate": true,
333+
"Note": true,
334+
"Tile": true,
335+
"Token": true,
336+
"Wall": true,
337+
"TinyMCE": true,
338+
"TextEditor": true,
339+
"WebRTC": true,
340+
"ui": true,
341+
"DND5E": true
211342
}
212343
}
344+

.gitattributes

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
.github export-ignore
2-
FUNDING.yml export-ignore
3-
4-
.gitattributes export-ignore
5-
README.md export-ignore
6-
preview.jpg export-ignore
7-
patchnotes.md export-ignore
1+
.github export-ignore
2+
FUNDING.yml export-ignore
3+
4+
.gitattributes export-ignore
5+
README.md export-ignore
6+
preview.jpg export-ignore
7+
patchnotes.md export-ignore

.github/FUNDING.yml

Whitespace-only changes.

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,5 +119,4 @@ foundry.js
119119
/dist
120120
/package
121121
/.vite-cache
122-
/package-lock.json
123-
/dist
122+
/package-lock.json

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
/.idea
77
.vite-cache/**
88
**/*.md
9+
/src/packs

.prettierrc

Lines changed: 0 additions & 18 deletions
This file was deleted.

.prettierrc.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"printWidth": 120,
3+
"tabWidth": 4,
4+
"overrides": [
5+
{
6+
"files": [
7+
"*.scss",
8+
"*.css"
9+
],
10+
"options": {
11+
"requirePragma": false,
12+
"parser": "scss"
13+
}
14+
},
15+
{
16+
"files": [
17+
"*.yml"
18+
],
19+
"options": {
20+
"tabWidth": 2
21+
}
22+
},
23+
{
24+
"files": "*.html",
25+
"options": {
26+
"requirePragma": false,
27+
"parser": "html",
28+
"htmlWhitespaceSensitivity": "ignore"
29+
}
30+
},
31+
{
32+
"files": "*.hbs",
33+
"options": {
34+
"requirePragma": false,
35+
"parser": "angular",
36+
"htmlWhitespaceSensitivity": "ignore"
37+
}
38+
}
39+
]
40+
}

README.md

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ This module uses the [libWrapper](https://github.com/ruipin/fvtt-lib-wrapper) li
2424

2525
### socketlib
2626

27-
This module uses the [socketlib](https://github.com/manuelVo/foundryvtt-socketlib) library for wrapping core methods. It is a optional dependency and it is recommended for the best experience and compatibility with other modules.
27+
This module uses the [socketlib](https://github.com/manuelVo/foundryvtt-socketlib) library for wrapping core methods. It is a hard dependency and it is recommended for the best experience and compatibility with other modules.
2828

2929
### Key Binds
3030
Theatre inserts now supports keybinds through the keybind API. The default keybinds are as follows (on windows):
@@ -54,19 +54,6 @@ Another button next to chat, the Megaphone, causes a black box to appear in the
5454

5555
## For a detailed list of instructions, checkout the [WIKI](/wiki/instructions/home.md)
5656

57-
# Build fast note
58-
59-
### Prepare a release
60-
61-
In the 99% of the case for prepare a release you must:
62-
63-
- Launch `npm run build` this will generate all the code under the `dist` folder.
64-
- Launch `npm package` for zip all the contents on the `dist` folder, and build the zip file with the correct name under the `package` folder.
65-
66-
### Developing a release
67-
68-
- Use `npm run build:watch` and `npm run build:link` and check some tutorial online
69-
7057
# Build
7158

7259
## Install all packages

0 commit comments

Comments
 (0)