// SPDX-FileCopyrightText: 2021 Johannes Loher
//
// SPDX-License-Identifier: MIT

module.exports = {
  parserOptions: {
    sourceType: 'module',
  },

  env: {
    browser: true,
    es2022: true,
    jquery: true,
  },

  extends: ['eslint:recommended', 'plugin:prettier/recommended'],

  globals: {
    Hooks: 'readonly',
    Actor: 'readonly',
    CONFIG: 'readonly',
    ui: 'readonly',
    Game: 'readonly',
    game: 'readonly',
    foundry: 'readonly',
    Dialog: 'readonly',
    twist: 'readonly',
  },

  rules: {},

  overrides: [
    {
      files: ['./*.cjs', './*.js', './tools/**/*'],
      env: { node: true, browser: false, jquery: false },
    },
  ],
};
