Skip to content

Commit

Permalink
fix: Issue xdy#69 Setting your own name for advantage/disadvantage.
Browse files Browse the repository at this point in the history
Also includes some general cleanup.
  • Loading branch information
xdy committed Sep 2, 2020
1 parent 0742add commit ef7e6d1
Show file tree
Hide file tree
Showing 23 changed files with 679 additions and 680 deletions.
73 changes: 11 additions & 62 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -1,71 +1,20 @@
---
env:
browser: true
es6: true
es2020: true
node: true
extends:
- eslint:recommended
- plugin:@typescript-eslint/recommended
- eslint-config-prettier
globals:
Atomics: readonly
SharedArrayBuffer: readonly
ItemSheet: readonly
game: readonly
mergeObject: readonly
CONFIG: writable
duplicate: readonly
"$": readonly
Tabs: readonly
Hooks: readonly
Items: readonly
loadTemplates: readonly
Combat: writable
canvas: readonly
ActorSheet: readonly
Actor: readonly
Actors: readonly
fetchSpell: readonly
- 'eslint:recommended'
- 'plugin:@typescript-eslint/recommended'
- 'eslint-config-prettier'
- 'plugin:prettier/recommended'
parser: '@typescript-eslint/parser'
parserOptions:
ecmaVersion: 2020
sourceType: module
rules:
prettier/prettier: error
no-restricted-syntax: 0
no-new: 0
no-underscore-dangle: 0
no-console: 0
class-methods-use-this: 0
max-classes-per-file: 0
prefer-destructuring: 0
no-plusplus: 0
no-undef: 0
prefer-rest-params: 0
"@typescript-eslint/explicit-module-boundary-types":
- error
- allowDirectConstAssertionInArrowFunctions: true
allowHigherOrderFunctions: true
allowTypedFunctionExpressions: true
curly: warn
brace-style: 1
indent: warn
settings:
import/resolver:
node:
paths:
- src
- ''
- dist
extensions:
- ".js"
- ".jsx"
- ".ts"
- ".tsx"
- ".json"
plugins:
- prettier
- "@typescript-eslint"
overrides:
- files: tests/**/*
rules:
global-require: 'off'
parser: "@typescript-eslint/parser"
rules: {
prettier/prettier: error

}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ icons/\!dox/
node_modules
foundryconfig.json
dist/*
foundry.js

6 changes: 2 additions & 4 deletions .prettierrc.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
---
trailingComma: es5
singleQuote: true
tabWidth: 2
requirePragma: true
overrides:
- files:
Expand All @@ -12,6 +10,6 @@ overrides:
parser: scss
- files: "*.html"
options:
requirePragma: false
requirePragma: true
parser: html
htmlWhitespaceSensitivity: ignore
htmlWhitespaceSensitivity: ignore
62 changes: 62 additions & 0 deletions old.eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
env:
browser: true
es6: true
extends:
- eslint:recommended
- plugin:@typescript-eslint/recommended
- eslint-config-prettier
globals:
Atomics: readonly
SharedArrayBuffer: readonly
ItemSheet: readonly
game: readonly
mergeObject: readonly
CONFIG: writable
duplicate: readonly
"$": readonly
Tabs: readonly
Hooks: readonly
Items: readonly
loadTemplates: readonly
Combat: writable
canvas: readonly
ActorSheet: readonly
Actor: readonly
Actors: readonly
fetchSpell: readonly
parserOptions:
ecmaVersion: 2020
sourceType: module
rules:
prettier/prettier: error
"@typescript-eslint/explicit-module-boundary-types":
- error
- allowDirectConstAssertionInArrowFunctions: true
allowHigherOrderFunctions: true
allowTypedFunctionExpressions: true
curly: warn
brace-style: 1
no-mixed-spaces-and-tabs: warn
indent: [2, 2]
settings:
import/resolver:
node:
paths:
- src
- ''
- dist
extensions:
- ".js"
- ".jsx"
- ".ts"
- ".tsx"
- ".json"
plugins:
- prettier
- "@typescript-eslint"
overrides:
- files: tests/**/*
rules:
global-require: 'off'
parser: "@typescript-eslint/parser"
20 changes: 10 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/compendium-imports/cepheus-skill-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
"show": false
},
"img": "icons/svg/mystery-man.svg"
}
}
7 changes: 6 additions & 1 deletion src/module/handlebars.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import {advantageDisadvantageTerm} from "./settings";

export default function registerHandlebarsHelpers():void {

//Currently none, but here is where they should reside. Earlier versions of this file/this system had some, look in the history.
Handlebars.registerHelper('advantageDisadvantageTerm', (str) => {
return advantageDisadvantageTerm(str);
});

}
Loading

0 comments on commit ef7e6d1

Please sign in to comment.