HEX
Server: Apache
System: Linux br1026.hostgator.com.br 5.14.0-687.39.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Aug 18 06:09:16 EDT 2026 x86_64
User: corre651 (6538)
PHP: 8.3.33
Disabled: NONE
Upload Files
File: //proc/self/cwd/wp-content/plugins/wpgraphql-acf/eslint.config.js
/**
 * ESLint flat config for wp-graphql-acf (admin JS + E2E tests).
 *
 * Migrated from .eslintrc.cjs for ESLint v9+ (the legacy .eslintrc / .eslintignore
 * formats were removed). Uses eslint:recommended only, to avoid optional plugin deps.
 */
const js = require( '@eslint/js' );
const globals = require( 'globals' );

module.exports = [
	// Replaces the old .eslintignore.
	{
		ignores: [
			'tests/_output/**',
			'build/**',
			'coverage/**',
			'node_modules/**',
			'vendor/**',
		],
	},

	js.configs.recommended,

	// Defaults for all linted files (mirrors the old root `env: { node, es2021 }`).
	{
		languageOptions: {
			ecmaVersion: 2021,
			sourceType: 'script',
			globals: {
				...globals.node,
				...globals.es2021,
			},
		},
	},

	// Admin/browser source.
	{
		files: [ 'src/**/*.js' ],
		languageOptions: {
			globals: {
				...globals.browser,
				$j: 'writable',
				acf: 'readonly',
				ajaxurl: 'readonly',
				jQuery: 'readonly',
				wp_graphql_acf: 'readonly',
			},
		},
		rules: {
			'no-redeclare': 'off',
			'no-unused-vars': [
				'error',
				{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
			],
			'no-var': 'warn',
		},
	},

	// Playwright E2E tests (ES modules).
	{
		files: [ 'tests/e2e/**/*.js' ],
		languageOptions: {
			ecmaVersion: 2022,
			sourceType: 'module',
			globals: {
				jQuery: 'readonly',
			},
		},
	},
];