Skip to content

Commit

Permalink
Add libWrapper and GURPS to eslint globals
Browse files Browse the repository at this point in the history
  • Loading branch information
mclemente committed Oct 8, 2023
1 parent ec52c26 commit 86dd052
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ module.exports = {
],
},

globals: {
libWrapper: false,
GURPS: false,
},

overrides: [
{
files: ["./*.js", "./*.cjs", "./*.mjs"],
Expand Down
2 changes: 0 additions & 2 deletions src/module/LanguageProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -2150,13 +2150,11 @@ export class gurpsLanguageProvider extends LanguageProvider {
getUserLanguages(actor) {
let knownLanguages = new Set();
let literateLanguages = new Set();
// eslint-disable-next-line no-undef
if (GURPS) {
const languageRegex = game.settings.get("polyglot", "LanguageRegex");
// window.GURPS set when the GURPS game system is loaded
let npat1 = ": +(?<name>[^\\(]+)";
let npat2 = " +\\((?<name>[^\\)]+)\\)";
// eslint-disable-next-line no-undef
GURPS.recurselist(actor.system.ads, (advantage) => {
if (!this.updateForPattern(advantage, new RegExp(languageRegex + npat1, "i"), knownLanguages, literateLanguages))
if (!this.updateForPattern(advantage, new RegExp(languageRegex + npat2, "i"), knownLanguages, literateLanguages))
Expand Down
1 change: 0 additions & 1 deletion src/module/logic.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export class Polyglot {
}
Polyglot.handleTinyMCE();

// eslint-disable-next-line no-undef
libWrapper.register(
"polyglot",
"ChatBubbles.prototype.say",
Expand Down

0 comments on commit 86dd052

Please sign in to comment.