ds4/eslint.config.js
Johannes Loher 6ac9f49463
feat!: migrate to v12
BREAKING CHANGE: Support for v11 has been dropped
2025-02-22 16:00:03 +01:00

65 lines
1.3 KiB
JavaScript

// 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,
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,
);