From 5c8ac4df57125d130548d9fc7e685e59776b0740 Mon Sep 17 00:00:00 2001 From: mahula Date: Tue, 7 Oct 2025 11:18:15 +0200 Subject: [PATCH] a little linting --- cypress/eslint.config.mjs | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/cypress/eslint.config.mjs b/cypress/eslint.config.mjs index 80634cae..8d493cc3 100644 --- a/cypress/eslint.config.mjs +++ b/cypress/eslint.config.mjs @@ -81,12 +81,49 @@ export default tseslint.config( } }, + // Node.js CommonJS files (plugins, etc.) - exclude TypeScript rules + { + files: ['plugins/**/*.js'], + languageOptions: { + ecmaVersion: 2020, + sourceType: 'commonjs', + globals: { + require: 'readonly', + module: 'readonly', + exports: 'readonly', + process: 'readonly', + console: 'readonly', + __dirname: 'readonly', + __filename: 'readonly', + Buffer: 'readonly', + global: 'readonly' + } + }, + rules: { + // Disable TypeScript-specific rules for CommonJS files + '@typescript-eslint/no-require-imports': 'off', + '@typescript-eslint/no-var-requires': 'off', + '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/no-unused-vars': 'off', + + // Allow CommonJS patterns + 'no-undef': 'off', + 'no-console': 'off', + + // Keep basic JS rules + 'no-unused-vars': 'warn', + 'prefer-const': 'error', + 'no-var': 'error' + } + }, + { ignores: [ 'node_modules/**', 'cypress/downloads/**', 'cypress/screenshots/**', 'cypress/videos/**', + 'cypress/plugins/**', // Ignore Node.js CommonJS plugin files 'results/**', 'dist/**', 'build/**',