module.exports = { // ESLint configs are prone to particular choices, so if the first config // below doesn't work for you then replace // with one that you do prefer. The second config defines globals defined // in `foundry.js` for use w/ `no-shadow`. extends: [ 'standard', '@typhonjs-fvtt/eslint-config-foundry.js' ], // Defines / overrides a few more environment parameters not // provided in the configs above. overrides: [ ], env: { jquery: true, es2021: true, browser: true }, parserOptions: { ecmaVersion: 'latest', sourceType: 'module' }, // Prevents overwriting any built in // globals particularly from // `@typhonjs-fvtt/eslint-config-foundry.js`, // but also // node & browser environments. `event / // window.event` shadowing is allowed due // to being a common variable name and // an uncommonly used browser feature. // // Note: if you are using // Typescript you must use // `@typescript-eslint/no-shadow` rules: { 'no-shadow': [ 'error', { builtinGlobals: true, hoist: 'all', allow: ['origin', 'name', 'event'] } ] } }