{"record":{"id":"92880a48a69fc9ac","repo":"avajs/ava","slug":"the-helpers-override-must-be-an-array-containing","errorCode":null,"errorMessage":"The ‘helpers’ override must be an array containing glob patterns.","messagePattern":"The ‘helpers’ override must be an array containing glob patterns\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"entrypoints/eslint-plugin-helper.js","lineNumber":71,"sourceCode":"\tif (globsOrError instanceof Error) {\n\t\tthrow globsOrError;\n\t}\n\n\treturn globsOrError;\n};\n\nconst helperCache = new Map();\n\nexport function load(projectDir, overrides) {\n\tconst cacheKey = `${JSON.stringify(overrides)}\\n${projectDir}`;\n\tif (helperCache.has(cacheKey)) {\n\t\treturn helperCache.get(cacheKey);\n\t}\n\n\tlet helperPatterns = [];\n\tif (overrides && overrides.helpers !== undefined) {\n\t\tif (!Array.isArray(overrides.helpers) || overrides.helpers.length === 0) {\n\t\t\tthrow new Error('The \\u2018helpers\\u2019 override must be an array containing glob patterns.');\n\t\t}\n\n\t\thelperPatterns = normalizePatterns(overrides.helpers);\n\t}\n\n\tconst globs = resolveGlobsSync(projectDir, overrides && overrides.extensions, overrides && overrides.files);\n\n\tconst classifyForESLint = file => {\n\t\tconst {isTest} = classify(file, globs);\n\t\tlet isHelper = false;\n\t\tif (!isTest && hasExtension(globs.extensions, file)) {\n\t\t\tfile = normalizeFileForMatching(projectDir, file);\n\t\t\tisHelper = isHelperish(file) || (helperPatterns.length > 0 && matches(file, helperPatterns));\n\t\t}\n\n\t\treturn {isHelper, isTest};\n\t};\n","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/avajs/ava/blob/bbfd946322fdeca2b547a691d947fb4e18c0c67f/entrypoints/eslint-plugin-helper.js#L53-L89","documentation":"Validation guard in load(): a helpers override was supplied but is not a non-empty array of glob patterns (wrong type, null, or empty array). The input at fault is overrides.helpers; load refuses to build helper matchers from an unusable pattern list.","triggerScenarios":"Thrown at entrypoints/eslint-plugin-helper.js:71 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass helpers as an array of glob strings, e.g. {helpers: ['helpers/**/*.js']}","Remove the helpers key entirely if no helpers are needed (empty array is not accepted)","Check that the overrides object is not nested or JSON-parsed incorrectly before reaching load()"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"bbfd946322fdeca2b547a691d947fb4e18c0c67f","analyzedAt":"2026-09-02T01:24:43.834Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T06:17:21.866Z"}