Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
11 changes: 11 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +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
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
344 changes: 344 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,344 @@
{
"env": {
"browser": 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"
},
"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", "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": "error",
"func-call-spacing": "warn",
"func-names": ["warn", "never"],
"getter-return": "warn",
"lines-between-class-members": "warn",
"new-parens": ["warn", "always"],
"no-alert": "warn",
"no-array-constructor": "warn",
"no-class-assign": "warn",
"no-compare-neg-zero": "warn",
"no-cond-assign": "warn",
"no-const-assign": "error",
"no-constant-condition": "warn",
"no-constructor-return": "warn",
"no-delete-var": "warn",
"no-dupe-args": "warn",
"no-dupe-class-members": "warn",
"no-dupe-keys": "warn",
"no-duplicate-case": "warn",
"no-duplicate-imports": ["warn", {"includeExports": true}],
"no-empty": ["warn", {"allowEmptyCatch": true}],
"no-empty-character-class": "warn",
"no-empty-pattern": "warn",
"no-func-assign": "warn",
"no-global-assign": "warn",
"no-implicit-coercion": ["warn", {"allow": ["!!"]}],
"no-implied-eval": "warn",
"no-import-assign": "warn",
"no-invalid-regexp": "warn",
"no-irregular-whitespace": "warn",
"no-iterator": "warn",
"no-lone-blocks": "warn",
"no-lonely-if": "off",
"no-loop-func": "warn",
"no-misleading-character-class": "warn",
"no-mixed-operators": "warn",
"no-multi-str": "warn",
"no-multiple-empty-lines": "warn",
"no-new-func": "warn",
"no-new-object": "warn",
"no-new-symbol": "warn",
"no-new-wrappers": "warn",
"no-nonoctal-decimal-escape": "warn",
"no-obj-calls": "warn",
"no-octal": "warn",
"no-octal-escape": "warn",
"no-promise-executor-return": "warn",
"no-proto": "warn",
"no-regex-spaces": "warn",
"no-script-url": "warn",
"no-self-assign": "warn",
"no-self-compare": "warn",
"no-setter-return": "warn",
"no-sequences": "warn",
"no-template-curly-in-string": "warn",
"no-this-before-super": "error",
"no-unexpected-multiline": "warn",
"no-unmodified-loop-condition": "warn",
"no-unneeded-ternary": "warn",
"no-unreachable": "warn",
"no-unreachable-loop": "warn",
"no-unsafe-negation": ["warn", {"enforceForOrderingRelations": true}],
"no-unsafe-optional-chaining": ["warn", {"disallowArithmeticOperators": true}],
"no-unused-expressions": [
"error",
{
"allowShortCircuit": true
}
],
"no-useless-backreference": "warn",
"no-useless-call": "warn",
"no-useless-catch": "warn",
"no-useless-computed-key": ["warn", {"enforceForClassMembers": true}],
"no-useless-concat": "warn",
"no-useless-constructor": "warn",
"no-useless-rename": "warn",
"no-useless-return": "warn",
"no-var": "warn",
"no-void": "warn",
"no-whitespace-before-property": "warn",
"prefer-numeric-literals": "warn",
"prefer-object-spread": "warn",
"prefer-regex-literals": "warn",
"prefer-spread": "warn",
"rest-spread-spacing": ["warn", "never"],
"semi-spacing": "warn",
"semi-style": ["warn", "last"],
"space-unary-ops": ["warn", {"words": true, "nonwords": false}],
"switch-colon-spacing": "warn",
"symbol-description": "warn",
"template-curly-spacing": ["warn", "never"],
"unicode-bom": ["warn", "never"],
"use-isnan": ["warn", {"enforceForSwitchCase": true, "enforceForIndexOf": true}],
"valid-typeof": ["warn", {"requireStringLiterals": true}],
"wrap-iife": ["warn", "inside"],

"arrow-parens": ["warn", "as-needed", {"requireForBlockBody": false}],
"capitalized-comments": ["warn", "always", {
"ignoreConsecutiveComments": true,
"ignorePattern": "noinspection"
}],
"comma-spacing": "warn",
"dot-notation": "warn",
"indent": ["warn", 4, {"SwitchCase": 1}],
"key-spacing": "warn",
"keyword-spacing": ["warn", {"overrides": {"catch": {"before": true, "after": false}}}],
"max-len": ["warn", {
"code": 120,
"ignoreTrailingComments": true,
"ignoreUrls": true,
"ignoreStrings": true,
"ignoreTemplateLiterals": true
}],
"no-extra-boolean-cast": ["warn", {"enforceForLogicalOperands": true}],
"no-extra-semi": "warn",
"no-multi-spaces": ["warn", {"ignoreEOLComments": true}],
"no-tabs": "warn",
"no-throw-literal": "error",
"no-trailing-spaces": "warn",
"no-useless-escape": "warn",
"nonblock-statement-body-position": ["warn", "beside"],
"one-var": ["warn", "never"],
"operator-linebreak": ["warn", "before", {
"overrides": {"=": "after", "+=": "after", "-=": "after"}
}],
"prefer-template": "warn",
"quote-props": ["warn", "as-needed", {"keywords": false}],
"quotes": ["warn", "double", {"avoidEscape": true, "allowTemplateLiterals": false}],
"semi": "warn",
"space-before-blocks": ["warn", "always"],
"space-before-function-paren": ["warn", {
"anonymous": "never",
"named": "never",
"asyncArrow": "always"
}],
"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",
"jsdoc/check-indentation": "off",
"jsdoc/check-line-alignment": "off",
"jsdoc/check-param-names": "warn",
"jsdoc/check-property-names": "warn",
"jsdoc/check-syntax": "off",
"jsdoc/check-tag-names": ["warn", { "definedTags": ["category"] }],
"jsdoc/check-types": "warn",
"jsdoc/check-values": "warn",
"jsdoc/empty-tags": "warn",
"jsdoc/implements-on-classes": "warn",
"jsdoc/match-description": "off",
"jsdoc/newline-after-description": "off",
"jsdoc/no-bad-blocks": "warn",
"jsdoc/no-defaults": "off",
"jsdoc/no-types": "off",
"jsdoc/no-undefined-types": "off",
"jsdoc/require-description": "warn",
"jsdoc/require-description-complete-sentence": "off",
"jsdoc/require-example": "off",
"jsdoc/require-file-overview": "off",
"jsdoc/require-hyphen-before-param-description": ["warn", "never"],
"jsdoc/require-jsdoc": "warn",
"jsdoc/require-param": "warn",
"jsdoc/require-param-description": "off",
"jsdoc/require-param-name": "warn",
"jsdoc/require-param-type": "warn",
"jsdoc/require-property": "warn",
"jsdoc/require-property-description": "off",
"jsdoc/require-property-name": "warn",
"jsdoc/require-property-type": "warn",
"jsdoc/require-returns": "off",
"jsdoc/require-returns-check": "warn",
"jsdoc/require-returns-description": "off",
"jsdoc/require-returns-type": "warn",
"jsdoc/require-throws": "off",
"jsdoc/require-yields": "warn",
"jsdoc/require-yields-check": "warn",
"jsdoc/valid-types": "off"
},
"plugins": [
"jsdoc",
"prettier",
"@typescript-eslint"
],
"settings": {
"jsdoc": {
"preferredTypes": {
".<>": "<>",
"object": "Object",
"Object": "object"
},
"mode": "typescript",
"tagNamePreference": {
"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
}
}

8 changes: 7 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
tokenmagic/packs/** binary
.github export-ignore
FUNDING.yml export-ignore

.gitattributes export-ignore
README.md export-ignore
preview.jpg export-ignore
patchnotes.md export-ignore
Loading