import js from '@eslint/js';
import globals from 'globals';
import eslintConfigPrettier from 'eslint-config-prettier';
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';

export default [
  js.configs.recommended,
  {
    languageOptions: {
      ecmaVersion: 2021,
      globals: {
        ...globals.browser,
        ...globals.jquery
      }
    },
    rules: {
      'no-unused-vars': 'off',
      'no-undef': 'off',
      'no-unassigned-vars': 'off',
      'prefer-const': 'error',
      'no-var': 'error'
    }
  },
  eslintConfigPrettier,
  eslintPluginPrettierRecommended
];
