// SPDX-FileCopyrightText: 2022 Johannes Loher // SPDX-FileCopyrightText: 2022 David Archibald // // SPDX-License-Identifier: MIT module.exports = { {% if useTypeScript %} parser: '@typescript-eslint/parser', {% endif %} parserOptions: { ecmaVersion: 2020, extraFileExtensions: ['.cjs', '.mjs'], sourceType: 'module',{% if useTypeScript %} project: './tsconfig.eslint.json',{% endif %} }, env: { browser: true, }, extends: [{% if useTypeScript %} 'plugin:@typescript-eslint/recommended',{% else %} 'eslint:recommended', '@typhonjs-fvtt/eslint-config-foundry.js/0.8.0',{% endif %}{% if useTesting %} 'plugin:jest/recommended',{% endif %} 'plugin:prettier/recommended', ], plugins: [{{ eslintPlugins | join(", ") | safe }}], rules: { // Specify any specific ESLint rules. }, overrides: [{% if useTypeScript %} { files: ['./*.cjs'], rules: { '@typescript-eslint/no-var-requires': 'off', }, },{% else %} { files: ['./*.js', './*.cjs', './*.mjs'], env: { node: true, }, },{% if useTesting %} { files: ['./test/**/*.js'], env: { 'jest/globals': true, }, },{% endif %}{% endif %} ], };