chore(deps): bump eslint to v9
This commit is contained in:
parent
588b828879
commit
0688aed679
9 changed files with 372 additions and 357 deletions
|
@ -1,7 +0,0 @@
|
||||||
# SPDX-FileCopyrightText: 2021 Johannes Loher
|
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
/dist
|
|
||||||
client
|
|
||||||
common
|
|
1
.vscode/settings.json
vendored
1
.vscode/settings.json
vendored
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
"typescript.tsdk": "node_modules/typescript/lib",
|
"typescript.tsdk": "node_modules/typescript/lib",
|
||||||
"typescript.enablePromptUseWorkspaceTsdk": true,
|
"typescript.enablePromptUseWorkspaceTsdk": true,
|
||||||
|
"eslint.useFlatConfig": true
|
||||||
}
|
}
|
||||||
|
|
67
eslint.config.js
Normal file
67
eslint.config.js
Normal file
|
@ -0,0 +1,67 @@
|
||||||
|
// SPDX-FileCopyrightText: 2025 Johannes Loher
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
// @ts-check
|
||||||
|
|
||||||
|
import eslint from "@eslint/js";
|
||||||
|
import eslintConfigPrettier from "eslint-config-prettier";
|
||||||
|
import tseslint from "typescript-eslint";
|
||||||
|
import globals from "globals";
|
||||||
|
|
||||||
|
const foundryGlobals = {
|
||||||
|
ActiveEffect: false,
|
||||||
|
ActiveEffectConfig: false,
|
||||||
|
Actor: false,
|
||||||
|
ActorSheet: false,
|
||||||
|
canvas: false,
|
||||||
|
Canvas: false,
|
||||||
|
ChatMessage: false,
|
||||||
|
CONFIG: false,
|
||||||
|
DocumentSheetConfig: false,
|
||||||
|
game: false,
|
||||||
|
Game: false,
|
||||||
|
Hooks: false,
|
||||||
|
Item: false,
|
||||||
|
ItemSheet: false,
|
||||||
|
Macro: false,
|
||||||
|
Notifications: false,
|
||||||
|
ui: false,
|
||||||
|
loadTemplates: false,
|
||||||
|
foundry: false,
|
||||||
|
Dialog: false,
|
||||||
|
renderTemplate: false,
|
||||||
|
TokenDocument: false,
|
||||||
|
Roll: false,
|
||||||
|
PoolTerm: false,
|
||||||
|
DiceTerm: false,
|
||||||
|
TextEditor: false,
|
||||||
|
CONST: false,
|
||||||
|
getProperty: false,
|
||||||
|
fromUuid: false,
|
||||||
|
};
|
||||||
|
|
||||||
|
export default tseslint.config(
|
||||||
|
{
|
||||||
|
ignores: ["dist/**", "client", "common"],
|
||||||
|
},
|
||||||
|
eslint.configs.recommended,
|
||||||
|
tseslint.configs.recommended,
|
||||||
|
{
|
||||||
|
languageOptions: {
|
||||||
|
parserOptions: {
|
||||||
|
ecmaVersion: 2020,
|
||||||
|
sourceType: "module",
|
||||||
|
},
|
||||||
|
globals: { ...globals.browser, ...globals.jquery, ...foundryGlobals },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: ["tools/**", "*"],
|
||||||
|
languageOptions: {
|
||||||
|
parserOptions: {},
|
||||||
|
globals: globals.node,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
eslintConfigPrettier,
|
||||||
|
);
|
14
package.json
14
package.json
|
@ -47,9 +47,8 @@
|
||||||
"clean": "run-p clean:files clean:link",
|
"clean": "run-p clean:files clean:link",
|
||||||
"clean:files": "rimraf dist",
|
"clean:files": "rimraf dist",
|
||||||
"clean:link": "node ./tools/link-package.js --clean",
|
"clean:link": "node ./tools/link-package.js --clean",
|
||||||
"lint": "pnpm eslint",
|
"lint": "eslint .",
|
||||||
"lint:fix": "pnpm eslint --fix",
|
"lint:fix": "eslint . --fix",
|
||||||
"eslint": "eslint --ext .ts,.js,.cjs,.mjs .",
|
|
||||||
"format": "pnpm prettier --write",
|
"format": "pnpm prettier --write",
|
||||||
"format:check": "pnpm prettier --check",
|
"format:check": "pnpm prettier --check",
|
||||||
"prettier": "prettier './**/*.(ts|js|cjs|mjs|json|scss|yml|yaml)'",
|
"prettier": "prettier './**/*.(ts|js|cjs|mjs|json|scss|yml|yaml)'",
|
||||||
|
@ -65,30 +64,31 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@commitlint/cli": "19.7.1",
|
"@commitlint/cli": "19.7.1",
|
||||||
"@commitlint/config-conventional": "19.7.1",
|
"@commitlint/config-conventional": "19.7.1",
|
||||||
|
"@eslint/js": "9.20.0",
|
||||||
"@foundryvtt/foundryvtt-cli": "0.0.9",
|
"@foundryvtt/foundryvtt-cli": "0.0.9",
|
||||||
"@guanghechen/rollup-plugin-copy": "6.0.4",
|
"@guanghechen/rollup-plugin-copy": "6.0.4",
|
||||||
"rollup-plugin-styler": "2.0.0",
|
|
||||||
"@swc/core": "1.10.16",
|
"@swc/core": "1.10.16",
|
||||||
"@types/fs-extra": "11.0.4",
|
"@types/fs-extra": "11.0.4",
|
||||||
"@types/jquery": "3.5.32",
|
"@types/jquery": "3.5.32",
|
||||||
"@types/node": "18.19.76",
|
"@types/node": "18.19.76",
|
||||||
"@typescript-eslint/eslint-plugin": "7.18.0",
|
|
||||||
"@typescript-eslint/parser": "7.18.0",
|
|
||||||
"conventional-changelog-cli": "5.0.0",
|
"conventional-changelog-cli": "5.0.0",
|
||||||
"conventional-changelog-conventionalcommits": "8.0.0",
|
"conventional-changelog-conventionalcommits": "8.0.0",
|
||||||
"eslint": "8.57.1",
|
"eslint": "9.20.1",
|
||||||
"eslint-config-prettier": "10.0.1",
|
"eslint-config-prettier": "10.0.1",
|
||||||
"fs-extra": "11.3.0",
|
"fs-extra": "11.3.0",
|
||||||
|
"globals": "15.15.0",
|
||||||
"handlebars": "4.7.8",
|
"handlebars": "4.7.8",
|
||||||
"npm-run-all": "4.1.5",
|
"npm-run-all": "4.1.5",
|
||||||
"prettier": "3.5.1",
|
"prettier": "3.5.1",
|
||||||
"rimraf": "6.0.1",
|
"rimraf": "6.0.1",
|
||||||
"rollup": "4.34.7",
|
"rollup": "4.34.7",
|
||||||
|
"rollup-plugin-styler": "2.0.0",
|
||||||
"rollup-plugin-swc3": "0.12.1",
|
"rollup-plugin-swc3": "0.12.1",
|
||||||
"sass": "1.85.0",
|
"sass": "1.85.0",
|
||||||
"semver": "7.7.1",
|
"semver": "7.7.1",
|
||||||
"tslib": "2.8.1",
|
"tslib": "2.8.1",
|
||||||
"typescript": "5.7.3",
|
"typescript": "5.7.3",
|
||||||
|
"typescript-eslint": "8.24.0",
|
||||||
"vite": "6.1.0",
|
"vite": "6.1.0",
|
||||||
"vitest": "3.0.5",
|
"vitest": "3.0.5",
|
||||||
"yargs": "17.7.2"
|
"yargs": "17.7.2"
|
||||||
|
|
632
pnpm-lock.yaml
632
pnpm-lock.yaml
File diff suppressed because it is too large
Load diff
|
@ -68,7 +68,7 @@ export class DS4ActiveEffect extends ActiveEffect {
|
||||||
change.value = Roll.replaceFormulaData(change.value, document);
|
change.value = Roll.replaceFormulaData(change.value, document);
|
||||||
try {
|
try {
|
||||||
change.value = DS4ActiveEffect.safeEval(change.value).toString();
|
change.value = DS4ActiveEffect.safeEval(change.value).toString();
|
||||||
} catch (e) {
|
} catch {
|
||||||
// this is a valid case, e.g., if the effect change simply is a string
|
// this is a valid case, e.g., if the effect change simply is a string
|
||||||
}
|
}
|
||||||
return super.apply(document, change);
|
return super.apply(document, change);
|
||||||
|
|
|
@ -118,7 +118,7 @@ export class DS4Actor extends Actor {
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
static replaceFormulaData(formula, data) {
|
static replaceFormulaData(formula, data) {
|
||||||
const dataRgx = new RegExp(/@([a-z.0-9_\-]+)/gi);
|
const dataRgx = new RegExp(/@([a-z.0-9_-]+)/gi);
|
||||||
try {
|
try {
|
||||||
return formula.replace(dataRgx, (_, term) => {
|
return formula.replace(dataRgx, (_, term) => {
|
||||||
const value = foundry.utils.getProperty(data, term);
|
const value = foundry.utils.getProperty(data, term);
|
||||||
|
|
|
@ -38,8 +38,6 @@ async function migrateItem(item) {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return updateData;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const migrateActor = getActorMigrator(migrateItem);
|
const migrateActor = getActorMigrator(migrateItem);
|
||||||
|
|
|
@ -29,7 +29,7 @@ async function migrateItem(item) {
|
||||||
if (item.type === "spell") {
|
if (item.type === "spell") {
|
||||||
const spellCategory = item.system?.spellCategory;
|
const spellCategory = item.system?.spellCategory;
|
||||||
const spellGroups = migrateSpellCategory(spellCategory);
|
const spellGroups = migrateSpellCategory(spellCategory);
|
||||||
const bonus = itemData.system?.bonus;
|
const bonus = item.system?.bonus;
|
||||||
const spellModifier = migrateBonus(bonus);
|
const spellModifier = migrateBonus(bonus);
|
||||||
await item.update({
|
await item.update({
|
||||||
system: {
|
system: {
|
||||||
|
|
Loading…
Reference in a new issue