I like the idea of allowing some variables only in some files. Other linteres have a `/* global */` special comment, where you can define variables which are passed into the file: https://eslint.org/docs/rules/no-undef https://www.jslint.com/help.html#global I know phpcs-variable-analysis has an `validUnusedVariableNames` option. But this is for all files and can not be set on a per-file basis.