Skip to content

Commit

Permalink
Merge pull request #167 from p4535992/master
Browse files Browse the repository at this point in the history
Little bug fix with debug options and add a logger helpers
  • Loading branch information
megahead11 authored May 4, 2024
2 parents f449f63 + 2b557c2 commit 3655e4d
Show file tree
Hide file tree
Showing 34 changed files with 1,172 additions and 644 deletions.
22 changes: 11 additions & 11 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.yml]
indent_size = 2
root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.yml]
indent_size = 2
18 changes: 18 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
gulpfile.js
.eslintrc.js
.prettierrc.js
jsconfig.json
/.pnp.js
/.yarn/

.github/
dist/
docs/
external/
src/languages/
src/assets/
src/lang/
src/scripts/
src/styles/
src/templates/
src/**/*.svelte
148 changes: 140 additions & 8 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,44 @@
{
"env": {
"browser": true,
"es2022": true,
"es6": true,
"node": true,
"jquery": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"parser": "@babel/eslint-parser",
"parserOptions": {
"requireConfigFile": false,
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": [
"jsdoc"
"ignorePatterns": [
"dist/"
],
"rules": {
"prettier/prettier": "error",
"no-console": "off",
"no-plusplus": [
"error",
{
"allowForLoopAfterthoughts": true
}
],
"array-bracket-spacing": ["warn", "never"],
"array-callback-return": "warn",
"arrow-spacing": "warn",
"comma-dangle": ["warn", "never"],
"comma-dangle": ["warn", "always-multiline"],
"comma-style": "warn",
"computed-property-spacing": "warn",
"constructor-super": "error",
"default-param-last": "warn",
"dot-location": ["warn", "property"],
"eol-last": ["error", "always"],
"eqeqeq": ["warn", "smart"],
"eqeqeq": "error",
"func-call-spacing": "warn",
"func-names": ["warn", "never"],
"getter-return": "warn",
Expand Down Expand Up @@ -86,7 +101,12 @@
"no-unreachable-loop": "warn",
"no-unsafe-negation": ["warn", {"enforceForOrderingRelations": true}],
"no-unsafe-optional-chaining": ["warn", {"disallowArithmeticOperators": true}],
"no-unused-expressions": "warn",
"no-unused-expressions": [
"error",
{
"allowShortCircuit": true
}
],
"no-useless-backreference": "warn",
"no-useless-call": "warn",
"no-useless-catch": "warn",
Expand Down Expand Up @@ -121,7 +141,7 @@
}],
"comma-spacing": "warn",
"dot-notation": "warn",
"indent": ["warn", 2, {"SwitchCase": 1}],
"indent": ["warn", 4, {"SwitchCase": 1}],
"key-spacing": "warn",
"keyword-spacing": ["warn", {"overrides": {"catch": {"before": true, "after": false}}}],
"max-len": ["warn", {
Expand Down Expand Up @@ -153,7 +173,43 @@
"named": "never",
"asyncArrow": "always"
}],
"spaced-comment": "warn",
"spaced-comment": [
"error",
"always",
{
"markers": [
"/"
]
}
],
"@typescript-eslint/ban-ts-comment": "error",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/lines-between-class-members": [
"error",
"always",
{
"exceptAfterSingleLine": true
}
],
"@typescript-eslint/prefer-namespace-keyword": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-namespace": [
"error",
{
"allowDeclarations": true
}
],
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-unsafe-declaration-merging": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/array-type": [
"error",
{
"default": "array"
}
],
"jsdoc/check-access": "warn",
"jsdoc/check-alignment": "warn",
"jsdoc/check-examples": "off",
Expand Down Expand Up @@ -196,6 +252,11 @@
"jsdoc/require-yields-check": "warn",
"jsdoc/valid-types": "off"
},
"plugins": [
"jsdoc",
"prettier",
"@typescript-eslint"
],
"settings": {
"jsdoc": {
"preferredTypes": {
Expand All @@ -208,5 +269,76 @@
"augments": "extends"
}
}
},
"overrides": [
{
"files": "tests/**/*",
"rules": {
"global-require": "off"
}
}
],
"globals": {
"globalThis": true,
"canvas": true,
"Hooks": true,
"game": true,
"Handlebars": true,
"Babele": true,
"foundry": true,
"CONFIG": true,
"libWrapper": true,
"socketlib": true,
"DatabaseBackend": true,
"Actor": true,
"Adventure": true,
"Cards": true,
"ChatMessage": true,
"Combat": true,
"Dice": true,
"FogExploration": true,
"Folder": true,
"Item": true,
"JournalEntry": true,
"Macro": true,
"Playlist": true,
"RollTable": true,
"Scene": true,
"Setting": true,
"User": true,
"Canvas": true,
"canvasTextStyle": true,
"weatherEffects": true,
"controlIcons": true,
"fontDefinitions": true,
"_fontFamilies": true,
"defaultFontFamily": true,
"statusEffects": true,
"specialStatusEffects": true,
"sounds": true,
"supportedLanguages": true,
"i18n": true,
"time": true,
"ActiveEffect": true,
"ActorDelta": true,
"Card": true,
"TableResult": true,
"JournalEntryPage": true,
"PlaylistSound": true,
"AmbientLight": true,
"AmbientSound": true,
"Combatant": true,
"Drawing": true,
"MeasuredTemplate": true,
"Note": true,
"Tile": true,
"Token": true,
"Wall": true,
"TinyMCE": true,
"TextEditor": true,
"WebRTC": true,
"ui": true,
"DND5E": true
}
}

14 changes: 7 additions & 7 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.github export-ignore
FUNDING.yml export-ignore

.gitattributes export-ignore
README.md export-ignore
preview.jpg export-ignore
patchnotes.md export-ignore
.github export-ignore
FUNDING.yml export-ignore

.gitattributes export-ignore
README.md export-ignore
preview.jpg export-ignore
patchnotes.md export-ignore
Empty file added .github/FUNDING.yml
Empty file.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -119,5 +119,4 @@ foundry.js
/dist
/package
/.vite-cache
/package-lock.json
/dist
/package-lock.json
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
/.idea
.vite-cache/**
**/*.md
/src/packs
18 changes: 0 additions & 18 deletions .prettierrc

This file was deleted.

40 changes: 40 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"printWidth": 120,
"tabWidth": 4,
"overrides": [
{
"files": [
"*.scss",
"*.css"
],
"options": {
"requirePragma": false,
"parser": "scss"
}
},
{
"files": [
"*.yml"
],
"options": {
"tabWidth": 2
}
},
{
"files": "*.html",
"options": {
"requirePragma": false,
"parser": "html",
"htmlWhitespaceSensitivity": "ignore"
}
},
{
"files": "*.hbs",
"options": {
"requirePragma": false,
"parser": "angular",
"htmlWhitespaceSensitivity": "ignore"
}
}
]
}
15 changes: 1 addition & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ This module uses the [libWrapper](https://github.com/ruipin/fvtt-lib-wrapper) li

### socketlib

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.
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.

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

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

# Build fast note

### Prepare a release

In the 99% of the case for prepare a release you must:

- Launch `npm run build` this will generate all the code under the `dist` folder.
- 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.

### Developing a release

- Use `npm run build:watch` and `npm run build:link` and check some tutorial online

# Build

## Install all packages
Expand Down
Loading

0 comments on commit 3655e4d

Please sign in to comment.