import js from "@eslint/js";
import globals from "globals";
import babelParser from "@babel/eslint-parser";

export default [
    js.configs.recommended,
    {
        files: ["frontend/src/**/*.js"],
        plugins: {},
        languageOptions: {
            ecmaVersion: 2018,
            globals: {
                ...globals.browser,
                ...globals.es6,
                ...globals.node,
                ...globals.jasmine,
                Atomics: "readonly",
                SharedArrayBuffer: "readonly",
                flatpickr: "readonly",
                $: "readonly",
            },
            parser: babelParser,
        },
        rules: {
            "no-console": "off",
            "no-extra-semi": "off",
            "semi": ["error", "always"],
            "comma-dangle": ["error", "always-multiline"],
            "quotes": ["error", "single"],
            "no-var": "error",
        },
    },
];