eslint-plugin-unicorn
Version:
More than 300 powerful ESLint rules
10 lines (8 loc) • 332 B
JavaScript
/**
Whether the filename is one of ESLint's placeholders for code linted without a real file on disk (`<input>` for stdin, `<text>` for `Linter#verify` with no filename).
@param {string} filename
@returns {boolean}
*/
export default function isVirtualFilename(filename) {
return filename === '<input>' || filename === '<text>';
}