Fix eslint and lint the codebase
This commit is contained in:
parent
23a402f11a
commit
761f0b6563
6 changed files with 22 additions and 12 deletions
|
|
@ -29,7 +29,7 @@ export default [
|
||||||
|
|
||||||
// v14 Additions:
|
// v14 Additions:
|
||||||
_loc: `readonly`,
|
_loc: `readonly`,
|
||||||
_del: `reaonly`,
|
_del: `readonly`,
|
||||||
_replace: `readonly`,
|
_replace: `readonly`,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -72,7 +72,16 @@ export default [
|
||||||
"@stylistic/space-infix-ops": `warn`,
|
"@stylistic/space-infix-ops": `warn`,
|
||||||
"@stylistic/eol-last": `warn`,
|
"@stylistic/eol-last": `warn`,
|
||||||
"@stylistic/operator-linebreak": [`warn`, `before`],
|
"@stylistic/operator-linebreak": [`warn`, `before`],
|
||||||
"@stylistic/indent": [`warn`, `tab`],
|
"@stylistic/indent": [
|
||||||
|
`warn`,
|
||||||
|
`tab`,
|
||||||
|
{
|
||||||
|
SwitchCase: 1,
|
||||||
|
ignoredNodes: [
|
||||||
|
`.superClass CallExpression`,
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
"@stylistic/brace-style": [`off`],
|
"@stylistic/brace-style": [`off`],
|
||||||
"@stylistic/quotes": [`warn`, `backtick`, { "avoidEscape": true }],
|
"@stylistic/quotes": [`warn`, `backtick`, { "avoidEscape": true }],
|
||||||
"@stylistic/comma-dangle": [`warn`, { arrays: `always-multiline`, objects: `always-multiline`, imports: `always-multiline`, exports: `always-multiline`, functions: `always-multiline` }],
|
"@stylistic/comma-dangle": [`warn`, { arrays: `always-multiline`, objects: `always-multiline`, imports: `always-multiline`, exports: `always-multiline`, functions: `always-multiline` }],
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { __ID__, filePath } from "../consts.mjs";
|
import { __ID__, filePath } from "../consts.mjs";
|
||||||
import { attributeSorter } from "../utils/attributeSort.mjs";
|
|
||||||
import { ask } from "../utils/DialogManager.mjs";
|
import { ask } from "../utils/DialogManager.mjs";
|
||||||
|
import { attributeSorter } from "../utils/attributeSort.mjs";
|
||||||
import { localizer } from "../utils/localizer.mjs";
|
import { localizer } from "../utils/localizer.mjs";
|
||||||
import { toID } from "../utils/toID.mjs";
|
import { toID } from "../utils/toID.mjs";
|
||||||
|
|
||||||
|
|
@ -29,7 +29,7 @@ export class AttributeManager extends HandlebarsApplicationMixin(ApplicationV2)
|
||||||
label: `Save As Defaults`,
|
label: `Save As Defaults`,
|
||||||
visible: () => game.user.isGM,
|
visible: () => game.user.isGM,
|
||||||
action: `saveAsDefault`,
|
action: `saveAsDefault`,
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
form: {
|
form: {
|
||||||
|
|
@ -137,7 +137,7 @@ export class AttributeManager extends HandlebarsApplicationMixin(ApplicationV2)
|
||||||
const attrs = [];
|
const attrs = [];
|
||||||
for (const [id, data] of Object.entries(this.#attributes)) {
|
for (const [id, data] of Object.entries(this.#attributes)) {
|
||||||
if (data == null) { continue };
|
if (data == null) { continue };
|
||||||
if (game.release.generation >= 14 && data == _del) continue;
|
if (game.release.generation >= 14 && data == _del) {continue}
|
||||||
attrs.push({
|
attrs.push({
|
||||||
id,
|
id,
|
||||||
name: data.name,
|
name: data.name,
|
||||||
|
|
@ -150,7 +150,7 @@ export class AttributeManager extends HandlebarsApplicationMixin(ApplicationV2)
|
||||||
};
|
};
|
||||||
// #endregion Data Prep
|
// #endregion Data Prep
|
||||||
|
|
||||||
// #region Actions
|
// #region Actions
|
||||||
/**
|
/**
|
||||||
* @param {Event} event
|
* @param {Event} event
|
||||||
*/
|
*/
|
||||||
|
|
@ -227,7 +227,7 @@ export class AttributeManager extends HandlebarsApplicationMixin(ApplicationV2)
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{ type: `divider` }
|
{ type: `divider` },
|
||||||
);
|
);
|
||||||
continue;
|
continue;
|
||||||
};
|
};
|
||||||
|
|
@ -254,6 +254,7 @@ export class AttributeManager extends HandlebarsApplicationMixin(ApplicationV2)
|
||||||
switch (response.state) {
|
switch (response.state) {
|
||||||
case `errored`:
|
case `errored`:
|
||||||
ui.notifications.error(response.error);
|
ui.notifications.error(response.error);
|
||||||
|
// eslint-disable-next-line no-fallthrough
|
||||||
case `fronted`:
|
case `fronted`:
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ export class GenericItemSheet extends HandlebarsApplicationMixin(ItemSheetV2) {
|
||||||
meta: {
|
meta: {
|
||||||
idp: this.id,
|
idp: this.id,
|
||||||
editable: this.isEditable,
|
editable: this.isEditable,
|
||||||
limited: this.isLimited
|
limited: this.isLimited,
|
||||||
},
|
},
|
||||||
item: this.item,
|
item: this.item,
|
||||||
system: this.item.system,
|
system: this.item.system,
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,7 @@ export class TAFActor extends Actor {
|
||||||
// #region Getters
|
// #region Getters
|
||||||
#sortedTypes = null;
|
#sortedTypes = null;
|
||||||
get itemTypes() {
|
get itemTypes() {
|
||||||
if (this.#sortedTypes) return this.#sortedTypes;
|
if (this.#sortedTypes) { return this.#sortedTypes };
|
||||||
const types = {};
|
const types = {};
|
||||||
for (const item of this.items) {
|
for (const item of this.items) {
|
||||||
if (item.type !== `generic`) {
|
if (item.type !== `generic`) {
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
// Apps
|
// Apps
|
||||||
import { AttributeOnlyPlayerSheet } from "../apps/AttributeOnlyPlayerSheet.mjs";
|
import { AttributeOnlyPlayerSheet } from "../apps/AttributeOnlyPlayerSheet.mjs";
|
||||||
|
import { GenericItemSheet } from "../apps/GenericItemSheet.mjs";
|
||||||
import { PlayerSheet } from "../apps/PlayerSheet.mjs";
|
import { PlayerSheet } from "../apps/PlayerSheet.mjs";
|
||||||
import { SingleModePlayerSheet } from "../apps/SingleModePlayerSheet.mjs";
|
import { SingleModePlayerSheet } from "../apps/SingleModePlayerSheet.mjs";
|
||||||
import { GenericItemSheet } from "../apps/GenericItemSheet.mjs";
|
|
||||||
|
|
||||||
// Data Models
|
// Data Models
|
||||||
import { PlayerData } from "../data/Actor/player.mjs";
|
|
||||||
import { GenericItemData } from "../data/Item/generic.mjs";
|
import { GenericItemData } from "../data/Item/generic.mjs";
|
||||||
|
import { PlayerData } from "../data/Actor/player.mjs";
|
||||||
|
|
||||||
// Documents
|
// Documents
|
||||||
import { TAFActor } from "../documents/Actor.mjs";
|
import { TAFActor } from "../documents/Actor.mjs";
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { __ID__ } from "../consts.mjs";
|
import { __ID__ } from "../consts.mjs";
|
||||||
|
|
||||||
Hooks.on(`renderSettingsConfig`, (app, html, context, options) => {
|
Hooks.on(`renderSettingsConfig`, (app, html) => {
|
||||||
/*
|
/*
|
||||||
This section is used to insert a button into the settings config that unsets
|
This section is used to insert a button into the settings config that unsets
|
||||||
a world setting when it exists but doesn't allow any other form of editing it.
|
a world setting when it exists but doesn't allow any other form of editing it.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue